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

Unified Diff: Source/core/css/invalidation/InvalidationSet.h

Issue 1349543004: CSS: Avoid invalidating style when only descendants need updating (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/css/invalidation/InvalidationSet.h
diff --git a/Source/core/css/invalidation/InvalidationSet.h b/Source/core/css/invalidation/InvalidationSet.h
index fcc8fbc592924058354873997ec069a6a8f84dc8..1c9ed70231b126853c12a5d451da56e08fd9b46c 100644
--- a/Source/core/css/invalidation/InvalidationSet.h
+++ b/Source/core/css/invalidation/InvalidationSet.h
@@ -66,6 +66,9 @@ public:
void addTagName(const AtomicString& tagName);
void addAttribute(const AtomicString& attributeLocalName);
+ void setAppliesDirectly() { m_appliesDirectly = true; }
+ bool appliesDirectly() const { return m_appliesDirectly; }
+
void setWholeSubtreeInvalid();
bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; }
@@ -102,6 +105,9 @@ private:
OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_tagNames;
OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_attributes;
+ // Indicates the element itself is invalid.
Timothy Loh 2015/09/16 04:30:49 Maybe "must be invalidated" for consistency with o
+ unsigned m_appliesDirectly : 1;
rune 2015/09/16 08:44:32 I think there should be a better name, preferably
+
// If true, all descendants might be invalidated, so a full subtree recalc is required.
unsigned m_allDescendantsMightBeInvalid : 1;

Powered by Google App Engine
This is Rietveld 408576698