Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutImage.cpp

Issue 1367193003: NOT FOR LANDING Allocate SVGImageForContainer on demand (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some NeedsRebaseline and revived some LayoutListMarker code that turned out to be important Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 81810151bf3ef564658fbe8d077bf6425da70581..31309d4b18452a587f6b252d541c876f9691bed4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
@@ -137,15 +137,6 @@ 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();
@@ -176,16 +167,7 @@ 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()->image() && imageResource()->image()->maybeAnimated())
+ if (imageResource() && imageResource()->maybeAnimated())
setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull);
else
setShouldDoFullPaintInvalidation(PaintInvalidationFull);
@@ -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);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImage.h ('k') | third_party/WebKit/Source/core/layout/LayoutImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698