Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / RenderImage.cpp
index 0a68e45..7e7e5ea 100644 (file)
@@ -160,10 +160,6 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
     if (newImage != m_imageResource->imagePtr())
         return;
 
-    // FIXME: this is a quick fix for crbug.com/328069. Perhaps this is reasonable to keep for the long term, or
-    // perhaps it's too aggressive, and we need to identify when the image *really* changed before issuing this call?
-    document().view()->scheduleAnimation();
-
     // Per the spec, we let the server-sent header override srcset/other sources of dpr.
     // https://github.com/igrigorik/http-client-hints/blob/master/draft-grigorik-http-client-hints-01.txt#L255
     if (m_imageResource->cachedImage() && m_imageResource->cachedImage()->hasDevicePixelRatioHeaderValue())
@@ -222,7 +218,7 @@ void RenderImage::imageDimensionsChanged(bool imageSizeChanged, const IntRect* r
         bool hasOverrideSize = hasOverrideHeight() || hasOverrideWidth();
         if (!hasOverrideSize && !imageSizeChanged) {
             LogicalExtentComputedValues computedValues;
-            computeLogicalWidthInRegion(computedValues);
+            computeLogicalWidth(computedValues);
             LayoutUnit newWidth = computedValues.m_extent;
             computeLogicalHeight(height(), 0, computedValues);
             LayoutUnit newHeight = computedValues.m_extent;
@@ -264,7 +260,11 @@ void RenderImage::imageDimensionsChanged(bool imageSizeChanged, const IntRect* r
         } else
             repaintRect = contentBoxRect();
 
-        repaintRectangle(repaintRect);
+        {
+            // FIXME: We should not be allowing repaint during layout. crbug.com/339584
+            AllowRepaintScope scoper(frameView());
+            repaintRectangle(repaintRect);
+        }
 
         // Tell any potential compositing layers that the image needs updating.
         contentChanged(ImageChanged);