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

Unified Diff: third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp

Issue 1317533002: Sibling invalidation sets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oilpan Created 5 years, 2 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: third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
diff --git a/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp b/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
index f9750d938fd5ac56c5c8f26f1c39b7bdda6109cb..a324786050cf826b56b2610f37580376bd5444c1 100644
--- a/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
@@ -269,4 +269,18 @@ void InvalidationSet::show() const
}
#endif // NDEBUG
+SiblingInvalidationSet::SiblingInvalidationSet()
+ : m_maxDirectAdjacentSelectors(1)
+ , m_descendantInvalidationSet(DescendantInvalidationSet::create())
+{
+}
+
+void SiblingInvalidationSet::combine(const SiblingInvalidationSet& other)
+{
+ m_maxDirectAdjacentSelectors = std::max(m_maxDirectAdjacentSelectors, other.m_maxDirectAdjacentSelectors);
+ m_descendantInvalidationSet->combine(other.descendants());
+
+ InvalidationSet::combine(other);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698