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

Unified Diff: Source/core/rendering/RenderObject.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/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 1de82be21a94517a11222fe0a1bc68bee7563242..c3b70da2488aee6087194550716341a5062a3f36 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -616,6 +616,19 @@ RenderFlowThread* RenderObject::locateFlowThreadContainingBlock() const
return 0;
}
+bool RenderObject::skipInvalidationWhenLaidOutChildren() const
+{
+ if (!neededLayoutBecauseOfChildren())
+ return false;
+
+ // SVG renderers need to be invalidated when their children are laid out.
+ // RenderBlocks with line boxes are responsible to invalidate them so we can't ignore them.
+ if (isSVG() || (isRenderBlock() && toRenderBlock(this)->firstLineBox()))
+ return false;
+
+ return rendererHasNoBoxEffect();
+}
+
RenderBlock* RenderObject::firstLineBlock() const
{
return 0;
@@ -3504,6 +3517,7 @@ void RenderObject::clearPaintInvalidationState()
setShouldDoFullPaintInvalidationAfterLayout(false);
setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false);
setOnlyNeededPositionedMovementLayout(false);
+ setNeededLayoutBecauseOfChildren(false);
setShouldInvalidateOverflowForPaint(false);
setLayoutDidGetCalled(false);
setMayNeedPaintInvalidation(false);

Powered by Google App Engine
This is Rietveld 408576698