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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Switch away from typed enums which Windows clang does not like Created 4 years 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: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2049367d76af354817202b78d02a37dc94f97772..2e5d49956ccb987cb43e61b87bfcba2847fb71d8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2734,8 +2734,17 @@ void LayoutObject::willBeRemovedFromTree() {
void LayoutObject::setNeedsPaintPropertyUpdate() {
m_bitfields.setNeedsPaintPropertyUpdate(true);
+ // |paintInvalidationParent()| is used to ensure we continue marking across
+ // frame boundaries.
+ if (LayoutObject* ancestor = paintInvalidationParent())
+ ancestor->setDescendantNeedsPaintPropertyUpdate();
+}
+
+void LayoutObject::setDescendantNeedsPaintPropertyUpdate() {
+ if (m_bitfields.descendantNeedsPaintPropertyUpdate())
+ return;
+ m_bitfields.setDescendantNeedsPaintPropertyUpdate(true);
- // Mark all ancestors as having a descendant needing paint property updates.
// |paintInvalidationParent()| is used to ensure we continue marking across
// frame boundaries.
LayoutObject* ancestor = paintInvalidationParent();

Powered by Google App Engine
This is Rietveld 408576698