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

Side by Side Diff: Source/core/dom/shadow/ShadowRootRareData.h

Issue 198783003: Recalc sibling styles for forward positional rules on mutations only. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issue. Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class ShadowRootRareData { 40 class ShadowRootRareData {
41 public: 41 public:
42 ShadowRootRareData() 42 ShadowRootRareData()
43 : m_descendantShadowElementCount(0) 43 : m_descendantShadowElementCount(0)
44 , m_descendantContentElementCount(0) 44 , m_descendantContentElementCount(0)
45 , m_childShadowRootCount(0) 45 , m_childShadowRootCount(0)
46 , m_childrenAffectedByDirectAdjacentRules(false) 46 , m_childrenAffectedByDirectAdjacentRules(false)
47 , m_childrenAffectedByIndirectAdjacentRules(false)
47 , m_childrenAffectedByForwardPositionalRules(false) 48 , m_childrenAffectedByForwardPositionalRules(false)
48 , m_childrenAffectedByBackwardPositionalRules(false) 49 , m_childrenAffectedByBackwardPositionalRules(false)
49 , m_childrenAffectedByFirstChildRules(false) 50 , m_childrenAffectedByFirstChildRules(false)
50 , m_childrenAffectedByLastChildRules(false) 51 , m_childrenAffectedByLastChildRules(false)
51 { 52 {
52 } 53 }
53 54
54 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const { return m_shadowInsertionPointOfYoungerShadowRoot.get(); } 55 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const { return m_shadowInsertionPointOfYoungerShadowRoot.get(); }
55 void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtr<HTMLShadowElement > shadowInsertionPoint) { m_shadowInsertionPointOfYoungerShadowRoot = shadowInse rtionPoint; } 56 void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtr<HTMLShadowElement > shadowInsertionPoint) { m_shadowInsertionPointOfYoungerShadowRoot = shadowInse rtionPoint; }
56 57
(...skipping 13 matching lines...) Expand all
70 71
71 const Vector<RefPtr<InsertionPoint> >& descendantInsertionPoints() { return m_descendantInsertionPoints; } 72 const Vector<RefPtr<InsertionPoint> >& descendantInsertionPoints() { return m_descendantInsertionPoints; }
72 void setDescendantInsertionPoints(Vector<RefPtr<InsertionPoint> >& list) { m _descendantInsertionPoints.swap(list); } 73 void setDescendantInsertionPoints(Vector<RefPtr<InsertionPoint> >& list) { m _descendantInsertionPoints.swap(list); }
73 void clearDescendantInsertionPoints() { m_descendantInsertionPoints.clear(); } 74 void clearDescendantInsertionPoints() { m_descendantInsertionPoints.clear(); }
74 75
75 StyleSheetList* styleSheets() { return m_styleSheetList.get(); } 76 StyleSheetList* styleSheets() { return m_styleSheetList.get(); }
76 void setStyleSheets(PassRefPtrWillBeRawPtr<StyleSheetList> styleSheetList) { m_styleSheetList = styleSheetList; } 77 void setStyleSheets(PassRefPtrWillBeRawPtr<StyleSheetList> styleSheetList) { m_styleSheetList = styleSheetList; }
77 78
78 bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffect edByDirectAdjacentRules; } 79 bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffect edByDirectAdjacentRules; }
79 void setChildrenAffectedByDirectAdjacentRules(bool value) { m_childrenAffect edByDirectAdjacentRules = value; } 80 void setChildrenAffectedByDirectAdjacentRules(bool value) { m_childrenAffect edByDirectAdjacentRules = value; }
81
82 bool childrenAffectedByIndirectAdjacentRules() const { return m_childrenAffe ctedByIndirectAdjacentRules; }
83 void setChildrenAffectedByIndirectAdjacentRules(bool value) { m_childrenAffe ctedByIndirectAdjacentRules = value; }
84
80 bool childrenAffectedByForwardPositionalRules() const { return m_childrenAff ectedByForwardPositionalRules; } 85 bool childrenAffectedByForwardPositionalRules() const { return m_childrenAff ectedByForwardPositionalRules; }
81 void setChildrenAffectedByForwardPositionalRules(bool value) { m_childrenAff ectedByForwardPositionalRules = value; } 86 void setChildrenAffectedByForwardPositionalRules(bool value) { m_childrenAff ectedByForwardPositionalRules = value; }
82 87
83 bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAf fectedByBackwardPositionalRules; } 88 bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAf fectedByBackwardPositionalRules; }
84 void setChildrenAffectedByBackwardPositionalRules(bool value) { m_childrenAf fectedByBackwardPositionalRules = value; } 89 void setChildrenAffectedByBackwardPositionalRules(bool value) { m_childrenAf fectedByBackwardPositionalRules = value; }
85 90
86 bool childrenAffectedByFirstChildRules() const { return m_childrenAffectedBy FirstChildRules; } 91 bool childrenAffectedByFirstChildRules() const { return m_childrenAffectedBy FirstChildRules; }
87 void setChildrenAffectedByFirstChildRules(bool value) { m_childrenAffectedBy FirstChildRules = value; } 92 void setChildrenAffectedByFirstChildRules(bool value) { m_childrenAffectedBy FirstChildRules = value; }
88 93
89 bool childrenAffectedByLastChildRules() const { return m_childrenAffectedByL astChildRules; } 94 bool childrenAffectedByLastChildRules() const { return m_childrenAffectedByL astChildRules; }
90 void setChildrenAffectedByLastChildRules(bool value) { m_childrenAffectedByL astChildRules = value; } 95 void setChildrenAffectedByLastChildRules(bool value) { m_childrenAffectedByL astChildRules = value; }
91 96
92 private: 97 private:
93 RefPtr<HTMLShadowElement> m_shadowInsertionPointOfYoungerShadowRoot; 98 RefPtr<HTMLShadowElement> m_shadowInsertionPointOfYoungerShadowRoot;
94 unsigned m_descendantShadowElementCount; 99 unsigned m_descendantShadowElementCount;
95 unsigned m_descendantContentElementCount; 100 unsigned m_descendantContentElementCount;
96 unsigned m_childShadowRootCount; 101 unsigned m_childShadowRootCount;
97 Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints; 102 Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints;
98 RefPtrWillBePersistent<StyleSheetList> m_styleSheetList; 103 RefPtrWillBePersistent<StyleSheetList> m_styleSheetList;
99 104
100 unsigned m_childrenAffectedByDirectAdjacentRules : 1; 105 unsigned m_childrenAffectedByDirectAdjacentRules : 1;
106 unsigned m_childrenAffectedByIndirectAdjacentRules : 1;
101 unsigned m_childrenAffectedByForwardPositionalRules : 1; 107 unsigned m_childrenAffectedByForwardPositionalRules : 1;
102 unsigned m_childrenAffectedByBackwardPositionalRules : 1; 108 unsigned m_childrenAffectedByBackwardPositionalRules : 1;
103 unsigned m_childrenAffectedByFirstChildRules : 1; 109 unsigned m_childrenAffectedByFirstChildRules : 1;
104 unsigned m_childrenAffectedByLastChildRules : 1; 110 unsigned m_childrenAffectedByLastChildRules : 1;
105 }; 111 };
106 112
107 inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point) 113 inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
108 { 114 {
109 ASSERT(point); 115 ASSERT(point);
110 if (isHTMLShadowElement(*point)) 116 if (isHTMLShadowElement(*point))
(...skipping 14 matching lines...) Expand all
125 else 131 else
126 ASSERT_NOT_REACHED(); 132 ASSERT_NOT_REACHED();
127 133
128 ASSERT(m_descendantContentElementCount >= 0); 134 ASSERT(m_descendantContentElementCount >= 0);
129 ASSERT(m_descendantShadowElementCount >= 0); 135 ASSERT(m_descendantShadowElementCount >= 0);
130 } 136 }
131 137
132 } // namespace WebCore 138 } // namespace WebCore
133 139
134 #endif 140 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698