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

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

Issue 758523002: Store :last/first-child state as restyle flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed assert Created 6 years, 1 month 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/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index 52c67e84f844d49852c644fde1c122b7ffef64bf..b883311724178a50c25cfdc1429627498a362f0e 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -50,8 +50,10 @@ enum DynamicRestyleFlags {
ChildrenAffectedByIndirectAdjacentRules = 1 << 7,
ChildrenAffectedByForwardPositionalRules = 1 << 8,
ChildrenAffectedByBackwardPositionalRules = 1 << 9,
+ AffectedByFirstChildRules = 1 << 10,
+ AffectedByLastChildRules = 1 << 11,
- NumberOfDynamicRestyleFlags = 10,
+ NumberOfDynamicRestyleFlags = 12,
};
enum SubtreeModificationAction {
@@ -147,6 +149,12 @@ public:
bool childrenAffectedByBackwardPositionalRules() const { return hasRestyleFlag(ChildrenAffectedByBackwardPositionalRules); }
void setChildrenAffectedByBackwardPositionalRules() { setRestyleFlag(ChildrenAffectedByBackwardPositionalRules); }
+ bool affectedByFirstChildRules() const { return hasRestyleFlag(AffectedByFirstChildRules); }
+ void setAffectedByFirstChildRules() { setRestyleFlag(AffectedByFirstChildRules); }
+
+ bool affectedByLastChildRules() const { return hasRestyleFlag(AffectedByLastChildRules); }
+ void setAffectedByLastChildRules() { setRestyleFlag(AffectedByLastChildRules); }
+
// FIXME: These methods should all be renamed to something better than "check",
// since it's not clear that they alter the style bits of siblings and children.
void checkForChildrenAdjacentRuleChanges();

Powered by Google App Engine
This is Rietveld 408576698