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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 204843002: Reduce invalidation on children-needs-layout containers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined and updated awesomeness! Created 6 years, 6 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/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 82ad9b84a965d0a9050590052bf5337c0038ba51..7f4ba56e305628b532c3f8c8c18af5d2e08b26e9 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1600,14 +1600,16 @@ void RenderBox::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInv
setShouldDoFullPaintInvalidationAfterLayout(true);
}
- const LayoutRect& newPaintInvalidationRect = previousPaintInvalidationRect();
- const LayoutPoint& newPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
- bool didFullPaintInvalidation = invalidatePaintAfterLayoutIfNeeded(&newPaintInvalidationContainer,
- shouldDoFullPaintInvalidationAfterLayout(), oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer,
- &newPaintInvalidationRect, &newPositionFromPaintInvalidationContainer);
+ if ((layoutDidGetCalled() && !skipInvalidationWhenLaidOutChildren()) || mayNeedPaintInvalidation()) {
+ const LayoutRect& newPaintInvalidationRect = previousPaintInvalidationRect();
+ const LayoutPoint& newPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
+ bool didFullPaintInvalidation = invalidatePaintAfterLayoutIfNeeded(&newPaintInvalidationContainer,
+ shouldDoFullPaintInvalidationAfterLayout(), oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer,
+ &newPaintInvalidationRect, &newPositionFromPaintInvalidationContainer);
- if (!didFullPaintInvalidation)
- invalidatePaintForOverflowIfNeeded();
+ if (!didFullPaintInvalidation)
+ invalidatePaintForOverflowIfNeeded();
+ }
// Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
if (enclosingLayer()) {
@@ -4142,7 +4144,7 @@ void RenderBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
void RenderBox::addVisualEffectOverflow()
{
- if (!style()->boxShadow() && !style()->hasBorderImageOutsets() && !style()->hasOutline())
+ if (!style()->hasVisualOverflowingEffect())
return;
bool isFlipped = style()->isFlippedBlocksWritingMode();

Powered by Google App Engine
This is Rietveld 408576698