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

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

Issue 1287413002: Fix paint invalidation rect tracking within composited scrolling layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index 82bde7e69164df0063623b8a83b209648da038f2..b4a6c7c00261bca4a4d7c9d30c38388b2aa34fed 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -746,11 +746,6 @@ bool LayoutBox::canBeProgramaticallyScrolled() const
return node && node->hasEditableStyle();
}
-bool LayoutBox::usesCompositedScrolling() const
-{
- return hasOverflowClip() && hasLayer() && layer()->scrollableArea()->usesCompositedScrolling();
-}
-
void LayoutBox::autoscroll(const IntPoint& positionInRootFrame)
{
LocalFrame* frame = this->frame();
@@ -1402,7 +1397,7 @@ PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat
}
// This is for the next invalidatePaintIfNeeded so must be at the end.
- savePreviousBoxSizesIfNeeded();
+ savePreviousBoxSizesIfNeeded(newPaintInvalidationContainer);
return reason;
}
@@ -4580,13 +4575,13 @@ void LayoutBox::setPageLogicalOffset(LayoutUnit offset)
ensureRareData().m_pageLogicalOffset = offset;
}
-bool LayoutBox::needToSavePreviousBoxSizes()
+bool LayoutBox::needToSavePreviousBoxSizes(const LayoutBoxModelObject& paintInvalidationContainer)
{
// If m_rareData is already created, always save.
if (m_rareData)
return true;
- LayoutSize paintInvalidationSize = previousPaintInvalidationRect().size();
+ LayoutSize paintInvalidationSize = previousPaintInvalidationRectIncludingCompositedScrolling(paintInvalidationContainer).size();
// Don't save old box sizes if the paint rect is empty because we'll
// full invalidate once the paint rect becomes non-empty.
if (paintInvalidationSize.isEmpty())
@@ -4610,9 +4605,9 @@ bool LayoutBox::needToSavePreviousBoxSizes()
return false;
}
-void LayoutBox::savePreviousBoxSizesIfNeeded()
+void LayoutBox::savePreviousBoxSizesIfNeeded(const LayoutBoxModelObject& paintInvalidationContainer)
{
- if (!needToSavePreviousBoxSizes())
+ if (!needToSavePreviousBoxSizes(paintInvalidationContainer))
return;
LayoutBoxRareData& rareData = ensureRareData();

Powered by Google App Engine
This is Rietveld 408576698