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

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

Issue 1339183003: NOT FOR LANDING Experiment with allocating SVGImageForContainer on demand (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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
« no previous file with comments | « Source/core/layout/LayoutImage.h ('k') | Source/core/layout/LayoutImageResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutImage.cpp
diff --git a/Source/core/layout/LayoutImage.cpp b/Source/core/layout/LayoutImage.cpp
index 53fa66bdae50ef55887434f8153c654b47680a81..14eccc0b048595d5e834f1586a9d068ba0d47bcf 100644
--- a/Source/core/layout/LayoutImage.cpp
+++ b/Source/core/layout/LayoutImage.cpp
@@ -138,15 +138,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();
@@ -177,15 +168,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()->image() && imageResource()->image()->maybeAnimated())
setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull);
else
@@ -301,12 +283,6 @@ bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca
return inside;
}
-void LayoutImage::layout()
-{
- LayoutReplaced::layout();
- updateInnerContentRect();
-}
-
bool LayoutImage::updateImageLoadingPriorities()
{
if (!m_imageResource || !m_imageResource->cachedImage() || m_imageResource->cachedImage()->isLoaded())
« no previous file with comments | « Source/core/layout/LayoutImage.h ('k') | Source/core/layout/LayoutImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698