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 |