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

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

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 45651e735992acb0c0dabfcb51ffd305888decb6..a20505c27025377f16e26c1c86e02e12a1af0372 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1512,6 +1512,11 @@ const char* RenderObject::invalidationReasonToString(InvalidationReason reason)
void RenderObject::repaintTreeAfterLayout()
{
+ // If we didn't need invalidation then our children don't need as well.
+ // Skip walking down the tree as everything should be fine below us.
+ if (!mayNeedInvalidation())
+ return;
+
clearRepaintState();
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
@@ -3398,6 +3403,7 @@ void RenderObject::clearRepaintState()
setShouldDoFullRepaintIfSelfPaintingLayer(false);
setShouldRepaintOverflow(false);
setLayoutDidGetCalled(false);
+ setMayNeedInvalidation(false);
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698