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

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: With expectations. Created 6 years, 7 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/rendering/RenderObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 45651e735992acb0c0dabfcb51ffd305888decb6..a466887b76de4901d7ced2815f29805d8e222900 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 (!shouldCheckForInvalidationAfterLayout())
+ 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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698