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

Side by Side Diff: Source/core/dom/ElementRareData.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: Rebased. 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
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void setChildrenAffectedByActive(bool value) { m_childrenAffectedByActive = value; } 77 void setChildrenAffectedByActive(bool value) { m_childrenAffectedByActive = value; }
78 bool childrenAffectedByDrag() const { return m_childrenAffectedByDrag; } 78 bool childrenAffectedByDrag() const { return m_childrenAffectedByDrag; }
79 void setChildrenAffectedByDrag(bool value) { m_childrenAffectedByDrag = valu e; } 79 void setChildrenAffectedByDrag(bool value) { m_childrenAffectedByDrag = valu e; }
80 80
81 bool childrenAffectedByFirstChildRules() const { return m_childrenAffectedBy FirstChildRules; } 81 bool childrenAffectedByFirstChildRules() const { return m_childrenAffectedBy FirstChildRules; }
82 void setChildrenAffectedByFirstChildRules(bool value) { m_childrenAffectedBy FirstChildRules = value; } 82 void setChildrenAffectedByFirstChildRules(bool value) { m_childrenAffectedBy FirstChildRules = value; }
83 bool childrenAffectedByLastChildRules() const { return m_childrenAffectedByL astChildRules; } 83 bool childrenAffectedByLastChildRules() const { return m_childrenAffectedByL astChildRules; }
84 void setChildrenAffectedByLastChildRules(bool value) { m_childrenAffectedByL astChildRules = value; } 84 void setChildrenAffectedByLastChildRules(bool value) { m_childrenAffectedByL astChildRules = value; }
85 bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffect edByDirectAdjacentRules; } 85 bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffect edByDirectAdjacentRules; }
86 void setChildrenAffectedByDirectAdjacentRules(bool value) { m_childrenAffect edByDirectAdjacentRules = value; } 86 void setChildrenAffectedByDirectAdjacentRules(bool value) { m_childrenAffect edByDirectAdjacentRules = value; }
87 bool childrenAffectedByIndirectAdjacentRules() const { return m_childrenAffe ctedByIndirectAdjacentRules; }
88 void setChildrenAffectedByIndirectAdjacentRules(bool value) { m_childrenAffe ctedByIndirectAdjacentRules = value; }
87 bool childrenAffectedByForwardPositionalRules() const { return m_childrenAff ectedByForwardPositionalRules; } 89 bool childrenAffectedByForwardPositionalRules() const { return m_childrenAff ectedByForwardPositionalRules; }
88 void setChildrenAffectedByForwardPositionalRules(bool value) { m_childrenAff ectedByForwardPositionalRules = value; } 90 void setChildrenAffectedByForwardPositionalRules(bool value) { m_childrenAff ectedByForwardPositionalRules = value; }
89 bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAf fectedByBackwardPositionalRules; } 91 bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAf fectedByBackwardPositionalRules; }
90 void setChildrenAffectedByBackwardPositionalRules(bool value) { m_childrenAf fectedByBackwardPositionalRules = value; } 92 void setChildrenAffectedByBackwardPositionalRules(bool value) { m_childrenAf fectedByBackwardPositionalRules = value; }
91 unsigned childIndex() const { return m_childIndex; } 93 unsigned childIndex() const { return m_childIndex; }
92 void setChildIndex(unsigned index) { m_childIndex = index; } 94 void setChildIndex(unsigned index) { m_childIndex = index; }
93 95
94 CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement); 96 CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement);
95 97
96 void clearShadow() { m_shadow = nullptr; } 98 void clearShadow() { m_shadow = nullptr; }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 unsigned m_childrenAffectedByFocus : 1; 162 unsigned m_childrenAffectedByFocus : 1;
161 unsigned m_childrenAffectedByHover : 1; 163 unsigned m_childrenAffectedByHover : 1;
162 unsigned m_childrenAffectedByActive : 1; 164 unsigned m_childrenAffectedByActive : 1;
163 unsigned m_childrenAffectedByDrag : 1; 165 unsigned m_childrenAffectedByDrag : 1;
164 // Bits for dynamic child matching. 166 // Bits for dynamic child matching.
165 // We optimize for :first-child and :last-child. The other positional child selectors like nth-child or 167 // We optimize for :first-child and :last-child. The other positional child selectors like nth-child or
166 // *-child-of-type, we will just give up and re-evaluate whenever children c hange at all. 168 // *-child-of-type, we will just give up and re-evaluate whenever children c hange at all.
167 unsigned m_childrenAffectedByFirstChildRules : 1; 169 unsigned m_childrenAffectedByFirstChildRules : 1;
168 unsigned m_childrenAffectedByLastChildRules : 1; 170 unsigned m_childrenAffectedByLastChildRules : 1;
169 unsigned m_childrenAffectedByDirectAdjacentRules : 1; 171 unsigned m_childrenAffectedByDirectAdjacentRules : 1;
172 unsigned m_childrenAffectedByIndirectAdjacentRules : 1;
170 unsigned m_childrenAffectedByForwardPositionalRules : 1; 173 unsigned m_childrenAffectedByForwardPositionalRules : 1;
171 unsigned m_childrenAffectedByBackwardPositionalRules : 1; 174 unsigned m_childrenAffectedByBackwardPositionalRules : 1;
172 175
173 LayoutSize m_minimumSizeForResizing; 176 LayoutSize m_minimumSizeForResizing;
174 IntSize m_savedLayerScrollOffset; 177 IntSize m_savedLayerScrollOffset;
175 RefPtr<RenderStyle> m_computedStyle; 178 RefPtr<RenderStyle> m_computedStyle;
176 179
177 OwnPtr<DatasetDOMStringMap> m_dataset; 180 OwnPtr<DatasetDOMStringMap> m_dataset;
178 OwnPtr<ClassList> m_classList; 181 OwnPtr<ClassList> m_classList;
179 OwnPtr<ElementShadow> m_shadow; 182 OwnPtr<ElementShadow> m_shadow;
(...skipping 25 matching lines...) Expand all
205 , m_containsFullScreenElement(false) 208 , m_containsFullScreenElement(false)
206 , m_isInTopLayer(false) 209 , m_isInTopLayer(false)
207 , m_hasPendingResources(false) 210 , m_hasPendingResources(false)
208 , m_childrenAffectedByFocus(false) 211 , m_childrenAffectedByFocus(false)
209 , m_childrenAffectedByHover(false) 212 , m_childrenAffectedByHover(false)
210 , m_childrenAffectedByActive(false) 213 , m_childrenAffectedByActive(false)
211 , m_childrenAffectedByDrag(false) 214 , m_childrenAffectedByDrag(false)
212 , m_childrenAffectedByFirstChildRules(false) 215 , m_childrenAffectedByFirstChildRules(false)
213 , m_childrenAffectedByLastChildRules(false) 216 , m_childrenAffectedByLastChildRules(false)
214 , m_childrenAffectedByDirectAdjacentRules(false) 217 , m_childrenAffectedByDirectAdjacentRules(false)
218 , m_childrenAffectedByIndirectAdjacentRules(false)
215 , m_childrenAffectedByForwardPositionalRules(false) 219 , m_childrenAffectedByForwardPositionalRules(false)
216 , m_childrenAffectedByBackwardPositionalRules(false) 220 , m_childrenAffectedByBackwardPositionalRules(false)
217 , m_minimumSizeForResizing(defaultMinimumSizeForResizing()) 221 , m_minimumSizeForResizing(defaultMinimumSizeForResizing())
218 { 222 {
219 } 223 }
220 224
221 inline ElementRareData::~ElementRareData() 225 inline ElementRareData::~ElementRareData()
222 { 226 {
223 ASSERT(!m_shadow); 227 ASSERT(!m_shadow);
224 ASSERT(!m_generatedBefore); 228 ASSERT(!m_generatedBefore);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 287
284 inline void ElementRareData::resetDynamicRestyleObservations() 288 inline void ElementRareData::resetDynamicRestyleObservations()
285 { 289 {
286 setChildrenAffectedByFocus(false); 290 setChildrenAffectedByFocus(false);
287 setChildrenAffectedByHover(false); 291 setChildrenAffectedByHover(false);
288 setChildrenAffectedByActive(false); 292 setChildrenAffectedByActive(false);
289 setChildrenAffectedByDrag(false); 293 setChildrenAffectedByDrag(false);
290 setChildrenAffectedByFirstChildRules(false); 294 setChildrenAffectedByFirstChildRules(false);
291 setChildrenAffectedByLastChildRules(false); 295 setChildrenAffectedByLastChildRules(false);
292 setChildrenAffectedByDirectAdjacentRules(false); 296 setChildrenAffectedByDirectAdjacentRules(false);
297 setChildrenAffectedByIndirectAdjacentRules(false);
293 setChildrenAffectedByForwardPositionalRules(false); 298 setChildrenAffectedByForwardPositionalRules(false);
294 setChildrenAffectedByBackwardPositionalRules(false); 299 setChildrenAffectedByBackwardPositionalRules(false);
295 } 300 }
296 301
297 } // namespace 302 } // namespace
298 303
299 #endif // ElementRareData_h 304 #endif // ElementRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698