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

Unified Diff: Source/core/dom/Node.h

Issue 143873016: Implement style invalidation tree walk for targeted style recalc upon class change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 8b4965a07ed5cf164a655850ed5fac17583278fe..cf698b39ff0c6e8352310168f729723a209a7ff1 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -371,6 +371,13 @@ public:
void clearChildNeedsDistributionRecalc() { clearFlag(ChildNeedsDistributionRecalc); }
void markAncestorsWithChildNeedsDistributionRecalc();
+ bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInvalidation); }
+ void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation); }
+ void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalidation); }
+ void markAncestorsWithChildNeedsStyleInvalidation();
+ bool needsStyleInvalidation() { return getFlag(NeedsStyleInvalidation); }
+ void setNeedsStyleInvalidation();
+
void recalcDistribution();
bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(NotifyRendererWithIdenticalStyles); }
@@ -714,10 +721,13 @@ private:
CustomElement = 1 << 27,
CustomElementUpgraded = 1 << 28,
+ ChildNeedsStyleInvalidation = 1 << 29,
+ NeedsStyleInvalidation = 1 << 30,
+
DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalcFlag | NeedsReattachStyleChange
};
- // 4 bits remaining.
+ // 2 bits remaining.
bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698