Index: third_party/WebKit/Source/core/layout/LayoutImage.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
index 8e8ecfc4efdcdef3d600ced56feedc4b4b1c6769..7e0adfc64b0c1608a9619f976b3ae1a5f47a7970 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
@@ -137,19 +137,10 @@ void LayoutImage::updateIntrinsicSizeIfNeeded(const LayoutSize& newSize) |
setIntrinsicSize(newSize); |
} |
-void LayoutImage::updateInnerContentRect() |
-{ |
- // Propagate container size to the image resource. |
- LayoutRect containerRect = replacedContentRect(); |
- IntSize containerSize(containerRect.width(), containerRect.height()); |
- if (!containerSize.isEmpty()) |
- m_imageResource->setContainerSizeForLayoutObject(containerSize); |
-} |
- |
void LayoutImage::invalidatePaintAndMarkForLayoutIfNeeded() |
{ |
LayoutSize oldIntrinsicSize = intrinsicSize(); |
- LayoutSize newIntrinsicSize = m_imageResource->intrinsicSize(style()->effectiveZoom()); |
+ LayoutSize newIntrinsicSize = m_imageResource->imageSize(style()->effectiveZoom()); |
updateIntrinsicSizeIfNeeded(newIntrinsicSize); |
// In the case of generated image content using :before/:after/content, we might not be |
@@ -176,15 +167,6 @@ void LayoutImage::invalidatePaintAndMarkForLayoutIfNeeded() |
return; |
} |
- // The image hasn't changed in size or its style constrains its size, so a paint invalidation will suffice. |
- if (everHadLayout() && !selfNeedsLayout()) { |
- // The inner content rectangle is calculated during layout, but may need an update now |
- // (unless the box has already been scheduled for layout). In order to calculate it, we |
- // may need values from the containing block, though, so make sure that we're not too |
- // early. It may be that layout hasn't even taken place once yet. |
- updateInnerContentRect(); |
- } |
- |
if (imageResource() && imageResource()->maybeAnimated()) |
setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull); |
else |
@@ -300,12 +282,6 @@ bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca |
return inside; |
} |
-void LayoutImage::layout() |
-{ |
- LayoutReplaced::layout(); |
- updateInnerContentRect(); |
-} |
- |
void LayoutImage::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, double& intrinsicRatio) const |
{ |
LayoutReplaced::computeIntrinsicRatioInformation(intrinsicSize, intrinsicRatio); |