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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h

Issue 2488633002: Remove ShadowRoot::numberOfStyles(). (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 unsigned descendantShadowElementCount() const; 111 unsigned descendantShadowElementCount() const;
112 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const; 112 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const;
113 void setShadowInsertionPointOfYoungerShadowRoot(HTMLShadowElement*); 113 void setShadowInsertionPointOfYoungerShadowRoot(HTMLShadowElement*);
114 void didAddInsertionPoint(InsertionPoint*); 114 void didAddInsertionPoint(InsertionPoint*);
115 void didRemoveInsertionPoint(InsertionPoint*); 115 void didRemoveInsertionPoint(InsertionPoint*);
116 const HeapVector<Member<InsertionPoint>>& descendantInsertionPoints(); 116 const HeapVector<Member<InsertionPoint>>& descendantInsertionPoints();
117 117
118 // For Internals, don't use this. 118 // For Internals, don't use this.
119 unsigned childShadowRootCount() const { return m_childShadowRootCount; } 119 unsigned childShadowRootCount() const { return m_childShadowRootCount; }
120 unsigned numberOfStyles() const { return m_numberOfStyles; }
121 120
122 void recalcStyle(StyleRecalcChange); 121 void recalcStyle(StyleRecalcChange);
123 122
124 void registerScopedHTMLStyleChild(); 123 void registerScopedHTMLStyleChild();
125 void unregisterScopedHTMLStyleChild(); 124 void unregisterScopedHTMLStyleChild();
126 125
127 SlotAssignment& ensureSlotAssignment(); 126 SlotAssignment& ensureSlotAssignment();
128 127
129 void distributeV1(); 128 void distributeV1();
130 129
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 --m_childShadowRootCount; 162 --m_childShadowRootCount;
164 } 163 }
165 void invalidateDescendantInsertionPoints(); 164 void invalidateDescendantInsertionPoints();
166 165
167 // ShadowRoots should never be cloned. 166 // ShadowRoots should never be cloned.
168 Node* cloneNode(bool) override { return nullptr; } 167 Node* cloneNode(bool) override { return nullptr; }
169 168
170 Member<ShadowRootRareDataV0> m_shadowRootRareDataV0; 169 Member<ShadowRootRareDataV0> m_shadowRootRareDataV0;
171 Member<StyleSheetList> m_styleSheetList; 170 Member<StyleSheetList> m_styleSheetList;
172 Member<SlotAssignment> m_slotAssignment; 171 Member<SlotAssignment> m_slotAssignment;
173 unsigned m_numberOfStyles : 14;
174 unsigned m_childShadowRootCount : 13; 172 unsigned m_childShadowRootCount : 13;
175 unsigned m_type : 2; 173 unsigned m_type : 2;
176 unsigned m_registeredWithParentShadowRoot : 1; 174 unsigned m_registeredWithParentShadowRoot : 1;
177 unsigned m_descendantInsertionPointsIsValid : 1; 175 unsigned m_descendantInsertionPointsIsValid : 1;
178 unsigned m_delegatesFocus : 1; 176 unsigned m_delegatesFocus : 1;
179 }; 177 };
180 178
181 inline Element* ShadowRoot::activeElement() const { 179 inline Element* ShadowRoot::activeElement() const {
182 return adjustedFocusedElement(); 180 return adjustedFocusedElement();
183 } 181 }
(...skipping 11 matching lines...) Expand all
195 treeScope, 193 treeScope,
196 treeScope->rootNode().isShadowRoot(), 194 treeScope->rootNode().isShadowRoot(),
197 treeScope.rootNode().isShadowRoot()); 195 treeScope.rootNode().isShadowRoot());
198 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true); 196 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true);
199 197
200 CORE_EXPORT std::ostream& operator<<(std::ostream&, const ShadowRootType&); 198 CORE_EXPORT std::ostream& operator<<(std::ostream&, const ShadowRootType&);
201 199
202 } // namespace blink 200 } // namespace blink
203 201
204 #endif // ShadowRoot_h 202 #endif // ShadowRoot_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698