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

Side by Side Diff: Source/core/dom/ElementRareData.h

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Sync Created 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void setChildrenAffectedByLastChildRules(bool value) { m_childrenAffectedByL astChildRules = value; } 88 void setChildrenAffectedByLastChildRules(bool value) { m_childrenAffectedByL astChildRules = value; }
89 bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffect edByDirectAdjacentRules; } 89 bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffect edByDirectAdjacentRules; }
90 void setChildrenAffectedByDirectAdjacentRules(bool value) { m_childrenAffect edByDirectAdjacentRules = value; } 90 void setChildrenAffectedByDirectAdjacentRules(bool value) { m_childrenAffect edByDirectAdjacentRules = value; }
91 bool childrenAffectedByForwardPositionalRules() const { return m_childrenAff ectedByForwardPositionalRules; } 91 bool childrenAffectedByForwardPositionalRules() const { return m_childrenAff ectedByForwardPositionalRules; }
92 void setChildrenAffectedByForwardPositionalRules(bool value) { m_childrenAff ectedByForwardPositionalRules = value; } 92 void setChildrenAffectedByForwardPositionalRules(bool value) { m_childrenAff ectedByForwardPositionalRules = value; }
93 bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAf fectedByBackwardPositionalRules; } 93 bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAf fectedByBackwardPositionalRules; }
94 void setChildrenAffectedByBackwardPositionalRules(bool value) { m_childrenAf fectedByBackwardPositionalRules = value; } 94 void setChildrenAffectedByBackwardPositionalRules(bool value) { m_childrenAf fectedByBackwardPositionalRules = value; }
95 unsigned childIndex() const { return m_childIndex; } 95 unsigned childIndex() const { return m_childIndex; }
96 void setChildIndex(unsigned index) { m_childIndex = index; } 96 void setChildIndex(unsigned index) { m_childIndex = index; }
97 97
98 bool renderStyleWatchedSelectorsRepresentedInSelectorWatch() const { return m_renderStyleWatchedSelectorsRepresentedInSelectorWatch; }
99 void setRenderStyleWatchedSelectorsRepresentedInSelectorWatch(bool value) { m_renderStyleWatchedSelectorsRepresentedInSelectorWatch = value; }
100
98 void clearShadow() { m_shadow = nullptr; } 101 void clearShadow() { m_shadow = nullptr; }
99 ElementShadow* shadow() const { return m_shadow.get(); } 102 ElementShadow* shadow() const { return m_shadow.get(); }
100 ElementShadow* ensureShadow() 103 ElementShadow* ensureShadow()
101 { 104 {
102 if (!m_shadow) 105 if (!m_shadow)
103 m_shadow = ElementShadow::create(); 106 m_shadow = ElementShadow::create();
104 return m_shadow.get(); 107 return m_shadow.get();
105 } 108 }
106 109
107 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } 110 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 unsigned m_childrenAffectedByDrag : 1; 163 unsigned m_childrenAffectedByDrag : 1;
161 // Bits for dynamic child matching. 164 // Bits for dynamic child matching.
162 // We optimize for :first-child and :last-child. The other positional child selectors like nth-child or 165 // We optimize for :first-child and :last-child. The other positional child selectors like nth-child or
163 // *-child-of-type, we will just give up and re-evaluate whenever children c hange at all. 166 // *-child-of-type, we will just give up and re-evaluate whenever children c hange at all.
164 unsigned m_childrenAffectedByFirstChildRules : 1; 167 unsigned m_childrenAffectedByFirstChildRules : 1;
165 unsigned m_childrenAffectedByLastChildRules : 1; 168 unsigned m_childrenAffectedByLastChildRules : 1;
166 unsigned m_childrenAffectedByDirectAdjacentRules : 1; 169 unsigned m_childrenAffectedByDirectAdjacentRules : 1;
167 unsigned m_childrenAffectedByForwardPositionalRules : 1; 170 unsigned m_childrenAffectedByForwardPositionalRules : 1;
168 unsigned m_childrenAffectedByBackwardPositionalRules : 1; 171 unsigned m_childrenAffectedByBackwardPositionalRules : 1;
169 172
173 unsigned m_renderStyleWatchedSelectorsRepresentedInSelectorWatch : 1;
esprehn 2013/09/04 06:08:28 There's no free bitfields on RenderStyle?
Jeffrey Yasskin 2013/09/12 22:09:59 This was tracking whether a RenderStyle had been p
174
170 unsigned m_isInsideRegion : 1; 175 unsigned m_isInsideRegion : 1;
171 RegionOversetState m_regionOversetState; 176 RegionOversetState m_regionOversetState;
172 177
173 LayoutSize m_minimumSizeForResizing; 178 LayoutSize m_minimumSizeForResizing;
174 IntSize m_savedLayerScrollOffset; 179 IntSize m_savedLayerScrollOffset;
175 RefPtr<RenderStyle> m_computedStyle; 180 RefPtr<RenderStyle> m_computedStyle;
176 181
177 OwnPtr<DatasetDOMStringMap> m_dataset; 182 OwnPtr<DatasetDOMStringMap> m_dataset;
178 OwnPtr<ClassList> m_classList; 183 OwnPtr<ClassList> m_classList;
179 OwnPtr<ElementShadow> m_shadow; 184 OwnPtr<ElementShadow> m_shadow;
(...skipping 26 matching lines...) Expand all
206 , m_isInTopLayer(false) 211 , m_isInTopLayer(false)
207 , m_hasPendingResources(false) 212 , m_hasPendingResources(false)
208 , m_childrenAffectedByHover(false) 213 , m_childrenAffectedByHover(false)
209 , m_childrenAffectedByActive(false) 214 , m_childrenAffectedByActive(false)
210 , m_childrenAffectedByDrag(false) 215 , m_childrenAffectedByDrag(false)
211 , m_childrenAffectedByFirstChildRules(false) 216 , m_childrenAffectedByFirstChildRules(false)
212 , m_childrenAffectedByLastChildRules(false) 217 , m_childrenAffectedByLastChildRules(false)
213 , m_childrenAffectedByDirectAdjacentRules(false) 218 , m_childrenAffectedByDirectAdjacentRules(false)
214 , m_childrenAffectedByForwardPositionalRules(false) 219 , m_childrenAffectedByForwardPositionalRules(false)
215 , m_childrenAffectedByBackwardPositionalRules(false) 220 , m_childrenAffectedByBackwardPositionalRules(false)
221 , m_renderStyleWatchedSelectorsRepresentedInSelectorWatch(false)
216 , m_isInsideRegion(false) 222 , m_isInsideRegion(false)
217 , m_regionOversetState(RegionUndefined) 223 , m_regionOversetState(RegionUndefined)
218 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) 224 , m_minimumSizeForResizing(defaultMinimumSizeForResizing())
219 { 225 {
220 } 226 }
221 227
222 inline ElementRareData::~ElementRareData() 228 inline ElementRareData::~ElementRareData()
223 { 229 {
224 ASSERT(!m_shadow); 230 ASSERT(!m_shadow);
225 ASSERT(!m_generatedBefore); 231 ASSERT(!m_generatedBefore);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 setChildrenAffectedByFirstChildRules(false); 297 setChildrenAffectedByFirstChildRules(false);
292 setChildrenAffectedByLastChildRules(false); 298 setChildrenAffectedByLastChildRules(false);
293 setChildrenAffectedByDirectAdjacentRules(false); 299 setChildrenAffectedByDirectAdjacentRules(false);
294 setChildrenAffectedByForwardPositionalRules(false); 300 setChildrenAffectedByForwardPositionalRules(false);
295 setChildrenAffectedByBackwardPositionalRules(false); 301 setChildrenAffectedByBackwardPositionalRules(false);
296 } 302 }
297 303
298 } // namespace 304 } // namespace
299 305
300 #endif // ElementRareData_h 306 #endif // ElementRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698