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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More assert fixes Created 4 years, 6 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #ifndef StyleEngine_h 28 #ifndef StyleEngine_h
29 #define StyleEngine_h 29 #define StyleEngine_h
30 30
31 #include "core/CoreExport.h" 31 #include "core/CoreExport.h"
32 #include "core/css/CSSFontSelectorClient.h" 32 #include "core/css/CSSFontSelectorClient.h"
33 #include "core/css/CSSGlobalRuleSet.h"
33 #include "core/css/invalidation/StyleInvalidator.h" 34 #include "core/css/invalidation/StyleInvalidator.h"
34 #include "core/css/resolver/StyleResolver.h" 35 #include "core/css/resolver/StyleResolver.h"
35 #include "core/css/resolver/StyleResolverStats.h" 36 #include "core/css/resolver/StyleResolverStats.h"
36 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
37 #include "core/dom/DocumentOrderedList.h" 38 #include "core/dom/DocumentOrderedList.h"
38 #include "core/dom/DocumentStyleSheetCollection.h" 39 #include "core/dom/DocumentStyleSheetCollection.h"
39 #include "core/dom/StyleEngineContext.h" 40 #include "core/dom/StyleEngineContext.h"
40 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
41 #include "wtf/Allocator.h" 42 #include "wtf/Allocator.h"
42 #include "wtf/ListHashSet.h" 43 #include "wtf/ListHashSet.h"
43 #include "wtf/TemporaryChange.h" 44 #include "wtf/TemporaryChange.h"
44 #include "wtf/Vector.h" 45 #include "wtf/Vector.h"
45 #include "wtf/text/WTFString.h" 46 #include "wtf/text/WTFString.h"
46 47
47 namespace blink { 48 namespace blink {
48 49
49 class CSSFontSelector; 50 class CSSFontSelector;
50 class CSSStyleSheet; 51 class CSSStyleSheet;
52 class MediaQueryEvaluator;
51 class Node; 53 class Node;
52 class RuleFeatureSet; 54 class RuleFeatureSet;
53 class ShadowTreeStyleSheetCollection; 55 class ShadowTreeStyleSheetCollection;
54 class StyleRuleFontFace; 56 class StyleRuleFontFace;
55 class StyleSheet; 57 class StyleSheet;
56 class StyleSheetContents; 58 class StyleSheetContents;
59 class ViewportStyleResolver;
57 60
58 class CORE_EXPORT StyleEngine final : public GarbageCollectedFinalized<StyleEngi ne>, public CSSFontSelectorClient { 61 class CORE_EXPORT StyleEngine final : public GarbageCollectedFinalized<StyleEngi ne>, public CSSFontSelectorClient {
59 USING_GARBAGE_COLLECTED_MIXIN(StyleEngine); 62 USING_GARBAGE_COLLECTED_MIXIN(StyleEngine);
60 public: 63 public:
61 64
62 class IgnoringPendingStylesheet : public TemporaryChange<bool> { 65 class IgnoringPendingStylesheet : public TemporaryChange<bool> {
63 DISALLOW_NEW(); 66 DISALLOW_NEW();
64 public: 67 public:
65 IgnoringPendingStylesheet(StyleEngine& engine) 68 IgnoringPendingStylesheet(StyleEngine& engine)
66 : TemporaryChange<bool>(engine.m_ignorePendingStylesheets, true) 69 : TemporaryChange<bool>(engine.m_ignorePendingStylesheets, true)
67 { 70 {
68 } 71 }
69 }; 72 };
70 73
71 friend class IgnoringPendingStylesheet; 74 friend class IgnoringPendingStylesheet;
72 75
73 static StyleEngine* create(Document& document) { return new StyleEngine(docu ment); } 76 static StyleEngine* create(Document& document) { return new StyleEngine(docu ment); }
74 77
75 ~StyleEngine(); 78 ~StyleEngine();
76 79
77 const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList(TreeScope &); 80 const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList(TreeScope &);
81 const HeapVector<Member<CSSStyleSheet>>& injectedAuthorStyleSheets() const { return m_injectedAuthorStyleSheets; }
82 const ActiveStyleSheetVector activeStyleSheetsForInspector();
78 83
79 const HeapVector<Member<CSSStyleSheet>>& injectedAuthorStyleSheets() const { return m_injectedAuthorStyleSheets; } 84 void setNeedsActiveStyleUpdate(TreeScope&);
85 void setNeedsGlobalRuleSetUpdate() { m_needsGlobalRuleSetUpdate = true; }
86 bool needsActiveStyleUpdate() const { return needsActiveStyleSheetUpdate() | | m_needsGlobalRuleSetUpdate; }
87 void updateActiveStyle();
80 88
81 const HeapVector<Member<CSSStyleSheet>> activeStyleSheetsForInspector() cons t;
82
83 void setNeedsActiveStyleUpdate(StyleSheet*, StyleResolverUpdateMode);
84 void addStyleSheetCandidateNode(Node*); 89 void addStyleSheetCandidateNode(Node*);
85 void removeStyleSheetCandidateNode(Node*); 90 void removeStyleSheetCandidateNode(Node*);
86 void removeStyleSheetCandidateNode(Node*, TreeScope&); 91 void removeStyleSheetCandidateNode(Node*, TreeScope&);
87 void modifiedStyleSheetCandidateNode(Node*); 92 void modifiedStyleSheetCandidateNode(Node*);
93
88 void watchedSelectorsChanged(); 94 void watchedSelectorsChanged();
89
90 void injectAuthorSheet(StyleSheetContents* authorSheet); 95 void injectAuthorSheet(StyleSheetContents* authorSheet);
91 96
92 void clearMediaQueryRuleSetStyleSheets(); 97 void mediaQueryAffectingValueChanged();
93 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector) ; 98 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector) ;
94 void updateActiveStyleSheets(StyleResolverUpdateMode);
95 99
96 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; } 100 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; }
97 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; } 101 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; }
98 void setPreferredStylesheetSetNameIfNotSet(const String&); 102 void setPreferredStylesheetSetNameIfNotSet(const String&);
99 void setSelectedStylesheetSetName(const String&); 103 void setSelectedStylesheetSetName(const String&);
100 void setHttpDefaultStyle(const String&); 104 void setHttpDefaultStyle(const String&);
101 105
102 void addPendingSheet(StyleEngineContext&); 106 void addPendingSheet(StyleEngineContext&);
103 void removePendingSheet(Node* styleSheetCandidateNode, const StyleEngineCont ext&); 107 void removePendingSheet(Node* styleSheetCandidateNode, const StyleEngineCont ext&);
104 108
105 bool hasPendingScriptBlockingSheets() const { return m_pendingScriptBlocking Stylesheets > 0; } 109 bool hasPendingScriptBlockingSheets() const { return m_pendingScriptBlocking Stylesheets; }
106 bool hasPendingRenderBlockingSheets() const { return m_pendingRenderBlocking Stylesheets > 0; } 110 bool hasPendingRenderBlockingSheets() const { return m_pendingRenderBlocking Stylesheets; }
107 bool haveScriptBlockingStylesheetsLoaded() const { return !hasPendingScriptB lockingSheets() || m_ignorePendingStylesheets; } 111 bool haveScriptBlockingStylesheetsLoaded() const { return !hasPendingScriptB lockingSheets() || m_ignorePendingStylesheets; }
108 bool haveRenderBlockingStylesheetsLoaded() const { return !hasPendingRenderB lockingSheets() || m_ignorePendingStylesheets; } 112 bool haveRenderBlockingStylesheetsLoaded() const { return !hasPendingRenderB lockingSheets() || m_ignorePendingStylesheets; }
109 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; } 113 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; }
110 114
111 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; }
112 bool usesSiblingRules() const { return m_usesSiblingRules; }
113 bool usesFirstLineRules() const { return m_usesFirstLineRules; }
114 bool usesWindowInactiveSelector() const { return m_usesWindowInactiveSelecto r; }
115
116 bool usesRemUnits() const { return m_usesRemUnits; } 115 bool usesRemUnits() const { return m_usesRemUnits; }
117 void setUsesRemUnit(bool b) { m_usesRemUnits = b; } 116 void setUsesRemUnit(bool b) { m_usesRemUnits = b; }
118 117
119 void resetCSSFeatureFlags(const RuleFeatureSet&); 118 unsigned maxDirectAdjacentSelectors() const { return m_globalRuleSet.m_featu res.maxDirectAdjacentSelectors(); }
119 bool usesSiblingRules() const { return m_globalRuleSet.m_features.usesSiblin gRules(); }
120 bool usesFirstLineRules() const { return m_globalRuleSet.m_features.usesFirs tLineRules(); }
121 bool usesWindowInactiveSelector() const { return m_globalRuleSet.m_features. usesWindowInactiveSelector(); }
122 RuleSet* watchedSelectorsRuleSet() { return m_globalRuleSet.m_watchedSelecto rsRuleSet; }
120 123
121 void didRemoveShadowRoot(ShadowRoot*); 124 void didRemoveShadowRoot(ShadowRoot*);
122 void shadowRootRemovedFromDocument(ShadowRoot*); 125 void shadowRootRemovedFromDocument(ShadowRoot*);
123 void appendActiveAuthorStyleSheets(); 126 void markAllTreeScopesDirty() { m_allTreeScopesDirty = true; }
127 void addTreeBoundaryCrossingScope(ContainerNode& scope);
128
129 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const;
130
131 RuleSet& ensureRuleSetForSheet(CSSStyleSheet&);
124 132
125 StyleResolver* resolver() const 133 StyleResolver* resolver() const
126 { 134 {
127 return m_resolver.get(); 135 return m_resolver.get();
128 } 136 }
129 137
130 StyleResolver& ensureResolver() 138 StyleResolver& ensureResolver()
131 { 139 {
132 if (!m_resolver) { 140 updateActiveStyle();
141 if (!m_resolver)
133 createResolver(); 142 createResolver();
134 } else if (m_resolver->hasPendingAuthorStyleSheets()) {
135 m_resolver->appendPendingAuthorStyleSheets();
136 }
137 return *m_resolver.get(); 143 return *m_resolver.get();
138 } 144 }
139 145
140 bool hasResolver() const { return m_resolver.get(); } 146 bool hasResolver() const { return m_resolver.get(); }
141 void clearResolver(); 147 void clearResolver();
142 void clearMasterResolver();
143 148
144 StyleInvalidator& styleInvalidator() { return m_styleInvalidator; } 149 StyleInvalidator& styleInvalidator() { return m_styleInvalidator; }
150 MediaQueryEvaluator& ensureMediaQueryEvaluator();
151 bool mediaQueryAffectedByViewportChange();
152 bool mediaQueryAffectedByDeviceChange();
153 bool hasViewportDependentMediaQueries() const { return !m_globalRuleSet.m_fe atures.viewportDependentMediaQueryResults.isEmpty(); }
145 154
146 CSSFontSelector* fontSelector() { return m_fontSelector.get(); } 155 CSSFontSelector* fontSelector() { return m_fontSelector.get(); }
147 void setFontSelector(CSSFontSelector*); 156 void setFontSelector(CSSFontSelector*);
148 157
149 void removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&) ; 158 void removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&) ;
159 void removeFontFaceRules(const HeapVector<Member<StyleRuleFontFace>>&);
150 void clearFontCache(); 160 void clearFontCache();
151 // updateGenericFontFamilySettings is used from WebSettingsImpl. 161 // updateGenericFontFamilySettings is used from WebSettingsImpl.
152 void updateGenericFontFamilySettings(); 162 void updateGenericFontFamilySettings();
153 163
164 ViewportStyleResolver& ensureViewportStyleResolver();
165
154 void didDetach(); 166 void didDetach();
155 bool shouldClearResolver() const; 167 bool shouldClearResolver() const;
156 void resolverChanged(StyleResolverUpdateMode);
157 168
158 CSSStyleSheet* createSheet(Element*, const String& text, TextPosition startP osition, StyleEngineContext&); 169 CSSStyleSheet* createSheet(Element*, const String& text, TextPosition startP osition, StyleEngineContext&);
159 void removeSheet(StyleSheetContents*); 170 void removeSheet(StyleSheetContents*);
160 171
161 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const;
162 void ensureFullscreenUAStyle();
163
164 void platformColorsChanged(); 172 void platformColorsChanged();
165 173
174 bool hasRulesForId(const AtomicString& id) const;
166 void classChangedForElement(const SpaceSplitString& changedClasses, Element& ); 175 void classChangedForElement(const SpaceSplitString& changedClasses, Element& );
167 void classChangedForElement(const SpaceSplitString& oldClasses, const SpaceS plitString& newClasses, Element&); 176 void classChangedForElement(const SpaceSplitString& oldClasses, const SpaceS plitString& newClasses, Element&);
168 void attributeChangedForElement(const QualifiedName& attributeName, Element& ); 177 void attributeChangedForElement(const QualifiedName& attributeName, Element& );
169 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI d, Element&); 178 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI d, Element&);
170 void pseudoStateChangedForElement(CSSSelector::PseudoType, Element&); 179 void pseudoStateChangedForElement(CSSSelector::PseudoType, Element&);
180 void scheduleInvalidationsForRuleSets(TreeScope&, const HeapVector<Member<Ru leSet>>&);
181
182 void ensureUAStyleForFullscreen();
183 void ensureUAStyleForElement(const Element&);
184
185 PassRefPtr<ComputedStyle> findSharedStyle(const ElementResolveContext&);
186
187 const DocumentOrderedList& treeBoundaryCrossingScopes() const { return m_tre eBoundaryCrossingScopes; }
171 188
172 unsigned styleForElementCount() const { return m_styleForElementCount; } 189 unsigned styleForElementCount() const { return m_styleForElementCount; }
173 void incStyleForElementCount() { m_styleForElementCount++; } 190 void incStyleForElementCount() { m_styleForElementCount++; }
174 191
175 StyleResolverStats* stats() { return m_styleResolverStats.get(); } 192 StyleResolverStats* stats() { return m_styleResolverStats.get(); }
176 void setStatsEnabled(bool); 193 void setStatsEnabled(bool);
177 194
178 DECLARE_VIRTUAL_TRACE(); 195 DECLARE_VIRTUAL_TRACE();
179 196
180 DECLARE_TRACE_WRAPPERS(); 197 DECLARE_TRACE_WRAPPERS();
181 198
182 private: 199 private:
183 // CSSFontSelectorClient implementation. 200 // CSSFontSelectorClient implementation.
184 void fontsNeedUpdate(CSSFontSelector*) override; 201 void fontsNeedUpdate(CSSFontSelector*) override;
185 202
186 private: 203 private:
187 StyleEngine(Document&); 204 StyleEngine(Document&);
188 205
206 void updateViewport();
207 void updateActiveStyleSheets();
208 void updateGlobalRuleSet();
209
210 bool needsActiveStyleSheetUpdate() const { return m_allTreeScopesDirty || m_ documentScopeDirty || m_dirtyTreeScopes.size(); }
211
189 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); 212 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
190 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); 213 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&);
191 bool shouldUpdateDocumentStyleSheetCollection(StyleResolverUpdateMode) const ; 214 bool shouldUpdateDocumentStyleSheetCollection() const;
192 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode) con st; 215 bool shouldUpdateShadowTreeStyleSheetCollection() const;
193 216
194 void markDocumentDirty(); 217 void markDocumentDirty();
195 void markTreeScopeDirty(TreeScope&); 218 void markTreeScopeDirty(TreeScope&);
196 219
197 bool isMaster() const { return m_isMaster; } 220 bool isMaster() const { return m_isMaster; }
198 Document* master(); 221 Document* master();
199 Document& document() const { return *m_document; } 222 Document& document() const { return *m_document; }
200 223
201 typedef HeapHashSet<Member<TreeScope>> UnorderedTreeScopeSet; 224 typedef HeapHashSet<Member<TreeScope>> UnorderedTreeScopeSet;
202 225
203 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(UnorderedTreeScopeSet&); 226 void mediaQueryAffectingValueChanged(UnorderedTreeScopeSet&);
227 const RuleFeatureSet& ruleFeatureSet() const { return m_globalRuleSet.m_feat ures; }
204 228
205 void createResolver(); 229 void createResolver();
206 230
207 static CSSStyleSheet* parseSheet(Element*, const String& text, TextPosition startPosition); 231 CSSStyleSheet* parseSheet(Element*, const String& text, TextPosition startPo sition);
208 232
209 const DocumentStyleSheetCollection* documentStyleSheetCollection() const 233 const DocumentStyleSheetCollection* documentStyleSheetCollection() const
210 { 234 {
211 return m_documentStyleSheetCollection.get(); 235 return m_documentStyleSheetCollection.get();
212 } 236 }
213 237
214 DocumentStyleSheetCollection* documentStyleSheetCollection() 238 DocumentStyleSheetCollection* documentStyleSheetCollection()
215 { 239 {
216 return m_documentStyleSheetCollection.get(); 240 return m_documentStyleSheetCollection.get();
217 } 241 }
218 242
219 void updateActiveStyleSheetsInShadow(StyleResolverUpdateMode, TreeScope*, Un orderedTreeScopeSet& treeScopesRemoved); 243 void updateActiveStyleSheetsInShadow(TreeScope*, UnorderedTreeScopeSet& tree ScopesRemoved);
220 244
221 bool shouldSkipInvalidationFor(const Element&) const; 245 bool shouldSkipInvalidationFor(const Element&) const;
246 void scheduleRuleSetInvalidationsForElement(Element&, const HeapVector<Membe r<RuleSet>>&);
222 247
223 Member<Document> m_document; 248 Member<Document> m_document;
224 bool m_isMaster; 249 bool m_isMaster;
225 250
226 // Track the number of currently loading top-level stylesheets needed for la yout. 251 // Track the number of currently loading top-level stylesheets needed for la yout.
227 // Sheets loaded using the @import directive are not included in this count. 252 // Sheets loaded using the @import directive are not included in this count.
228 // We use this count of pending sheets to detect when we can begin attaching 253 // We use this count of pending sheets to detect when we can begin attaching
229 // elements and when it is safe to execute scripts. 254 // elements and when it is safe to execute scripts.
230 int m_pendingScriptBlockingStylesheets = 0; 255 unsigned m_pendingScriptBlockingStylesheets = 0;
231 int m_pendingRenderBlockingStylesheets = 0; 256 unsigned m_pendingRenderBlockingStylesheets = 0;
232 257
233 HeapVector<Member<CSSStyleSheet>> m_injectedAuthorStyleSheets; 258 HeapVector<Member<CSSStyleSheet>> m_injectedAuthorStyleSheets;
234
235 Member<DocumentStyleSheetCollection> m_documentStyleSheetCollection; 259 Member<DocumentStyleSheetCollection> m_documentStyleSheetCollection;
236 260
237 typedef HeapHashMap<WeakMember<TreeScope>, Member<ShadowTreeStyleSheetCollec tion>> StyleSheetCollectionMap; 261 using StyleSheetCollectionMap = HeapHashMap<WeakMember<TreeScope>, Member<Sh adowTreeStyleSheetCollection>>;
262
238 StyleSheetCollectionMap m_styleSheetCollectionMap; 263 StyleSheetCollectionMap m_styleSheetCollectionMap;
239 264
240 bool m_documentScopeDirty = true; 265 bool m_documentScopeDirty = true;
266 bool m_allTreeScopesDirty = false;
241 UnorderedTreeScopeSet m_dirtyTreeScopes; 267 UnorderedTreeScopeSet m_dirtyTreeScopes;
242 UnorderedTreeScopeSet m_activeTreeScopes; 268 UnorderedTreeScopeSet m_activeTreeScopes;
269 DocumentOrderedList m_treeBoundaryCrossingScopes;
243 270
244 String m_preferredStylesheetSetName; 271 String m_preferredStylesheetSetName;
245 String m_selectedStylesheetSetName; 272 String m_selectedStylesheetSetName;
246 273
247 bool m_usesSiblingRules = false; 274 CSSGlobalRuleSet m_globalRuleSet;
248 bool m_usesFirstLineRules = false; 275
249 bool m_usesWindowInactiveSelector = false; 276 bool m_needsGlobalRuleSetUpdate = true;
250 bool m_usesRemUnits = false; 277 bool m_usesRemUnits = false;
251 unsigned m_maxDirectAdjacentSelectors = 0;
252
253 bool m_ignorePendingStylesheets = false; 278 bool m_ignorePendingStylesheets = false;
254 bool m_didCalculateResolver = false; 279 bool m_didCalculateResolver = false;
255 280
256 Member<StyleResolver> m_resolver; 281 Member<StyleResolver> m_resolver;
282 Member<ViewportStyleResolver> m_viewportResolver;
283 Member<MediaQueryEvaluator> m_medium;
257 StyleInvalidator m_styleInvalidator; 284 StyleInvalidator m_styleInvalidator;
258 285
259 Member<CSSFontSelector> m_fontSelector; 286 Member<CSSFontSelector> m_fontSelector;
260 287
261 HeapHashMap<AtomicString, Member<StyleSheetContents>> m_textToSheetCache; 288 HeapHashMap<AtomicString, Member<StyleSheetContents>> m_textToSheetCache;
262 HeapHashMap<Member<StyleSheetContents>, AtomicString> m_sheetToTextCache; 289 HeapHashMap<Member<StyleSheetContents>, AtomicString> m_sheetToTextCache;
263 290
264 OwnPtr<StyleResolverStats> m_styleResolverStats; 291 OwnPtr<StyleResolverStats> m_styleResolverStats;
265 unsigned m_styleForElementCount = 0; 292 unsigned m_styleForElementCount = 0;
266 293
267 friend class StyleEngineTest; 294 friend class StyleEngineTest;
268 }; 295 };
269 296
270 } // namespace blink 297 } // namespace blink
271 298
272 #endif 299 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698