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

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

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.cpp
diff --git a/Source/core/css/invalidation/InvalidationSet.cpp b/Source/core/css/invalidation/InvalidationSet.cpp
index 617e9b974e5a946d7dfabd2307c2c5c4e39b0b1e..426f23ddc02181a3eb06057a55c4c0a3d578b618 100644
--- a/Source/core/css/invalidation/InvalidationSet.cpp
+++ b/Source/core/css/invalidation/InvalidationSet.cpp
@@ -52,7 +52,8 @@ void InvalidationSet::cacheTracingFlag()
}
InvalidationSet::InvalidationSet()
- : m_allDescendantsMightBeInvalid(false)
+ : m_appliesDirectly(false)
+ , m_allDescendantsMightBeInvalid(false)
, m_customPseudoInvalid(false)
, m_treeBoundaryCrossing(false)
, m_insertionPointCrossing(false)
@@ -98,6 +99,9 @@ bool InvalidationSet::invalidatesElement(Element& element) const
void InvalidationSet::combine(const InvalidationSet& other)
{
+ if (other.appliesDirectly())
+ setAppliesDirectly();
rune 2015/09/16 08:44:32 The existing code did an early return on wholeSubt
Eric Willigers 2015/09/16 13:32:08 Moved. The original positioning, and the original
+
// No longer bother combining data structures, since the whole subtree is deemed invalid.
if (wholeSubtreeInvalid())
return;

Powered by Google App Engine
This is Rietveld 408576698