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

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

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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index bd0ba94ac49d929f860c99b9eaa2e8d88e60a75e..64396778858193a6e7e58400067e306386a1cabd 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1702,6 +1702,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void setNeedsPaintPropertyUpdate() {
m_layoutObject.setNeedsPaintPropertyUpdate();
}
+ void setNeedsPaintPropertyUpdateWithoutMarkingAncestors() {
+ m_layoutObject.setNeedsPaintPropertyUpdateWithoutMarkingAncestors();
+ }
void clearNeedsPaintPropertyUpdate() {
m_layoutObject.clearNeedsPaintPropertyUpdate();
}
@@ -1741,6 +1744,12 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// descendant needs an update too. This bit is up the tree, crossing frames,
// when calling |setNeedsPaintPropertyUpdate|.
void setNeedsPaintPropertyUpdate();
+ // Same as |setNeedsPaintPropertyUpdate| but does not notify ancestors as
+ // having a descendant needing a paint property update.
+ void setNeedsPaintPropertyUpdateWithoutMarkingAncestors() {
+ DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
+ m_bitfields.setNeedsPaintPropertyUpdate(true);
+ }
bool needsPaintPropertyUpdate() const {
return m_bitfields.needsPaintPropertyUpdate();
}
@@ -1748,6 +1757,8 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
m_bitfields.setNeedsPaintPropertyUpdate(false);
}
+ // Sets |descendantNeedsPaintPropertyUpdate| on this object and all ancestors.
+ void setDescendantNeedsPaintPropertyUpdate();
bool descendantNeedsPaintPropertyUpdate() const {
return m_bitfields.descendantNeedsPaintPropertyUpdate();
}

Powered by Google App Engine
This is Rietveld 408576698