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

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

Issue 751593002: Removed add/removeScopedStyleResolver from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/ProcessingInstruction.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | 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) 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void didDetach(); 161 void didDetach();
162 bool shouldClearResolver() const; 162 bool shouldClearResolver() const;
163 void resolverChanged(StyleResolverUpdateMode); 163 void resolverChanged(StyleResolverUpdateMode);
164 unsigned resolverAccessCount() const; 164 unsigned resolverAccessCount() const;
165 165
166 void markDocumentDirty(); 166 void markDocumentDirty();
167 167
168 PassRefPtrWillBeRawPtr<CSSStyleSheet> createSheet(Element*, const String& te xt, TextPosition startPosition, bool createdByParser); 168 PassRefPtrWillBeRawPtr<CSSStyleSheet> createSheet(Element*, const String& te xt, TextPosition startPosition, bool createdByParser);
169 void removeSheet(StyleSheetContents*); 169 void removeSheet(StyleSheetContents*);
170 170
171 void addScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scopedS tyleResolvers.add(resolver); } 171 bool onlyDocumentHasStyles() const { return m_activeTreeScopes.isEmpty(); }
172 void removeScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scop edStyleResolvers.remove(resolver); }
173 bool hasOnlyScopedResolverForDocument() const { return m_scopedStyleResolver s.size() == 1; }
174 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const; 172 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const;
175 173
176 virtual void trace(Visitor*) override; 174 virtual void trace(Visitor*) override;
177 175
178 private: 176 private:
179 // CSSFontSelectorClient implementation. 177 // CSSFontSelectorClient implementation.
180 virtual void fontsNeedUpdate(CSSFontSelector*) override; 178 virtual void fontsNeedUpdate(CSSFontSelector*) override;
181 179
182 private: 180 private:
183 StyleEngine(Document&); 181 StyleEngine(Document&);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 221
224 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_injectedAutho rStyleSheets; 222 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_injectedAutho rStyleSheets;
225 mutable bool m_injectedStyleSheetCacheValid; 223 mutable bool m_injectedStyleSheetCacheValid;
226 224
227 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets; 225 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets;
228 226
229 OwnPtrWillBeMember<DocumentStyleSheetCollection> m_documentStyleSheetCollect ion; 227 OwnPtrWillBeMember<DocumentStyleSheetCollection> m_documentStyleSheetCollect ion;
230 228
231 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem ber<ShadowTreeStyleSheetCollection> > StyleSheetCollectionMap; 229 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem ber<ShadowTreeStyleSheetCollection> > StyleSheetCollectionMap;
232 StyleSheetCollectionMap m_styleSheetCollectionMap; 230 StyleSheetCollectionMap m_styleSheetCollectionMap;
233 typedef WillBeHeapHashSet<RawPtrWillBeMember<const ScopedStyleResolver> > Sc opedStyleResolverSet;
234 ScopedStyleResolverSet m_scopedStyleResolvers;
235 231
236 bool m_documentScopeDirty; 232 bool m_documentScopeDirty;
237 TreeScopeSet m_dirtyTreeScopes; 233 TreeScopeSet m_dirtyTreeScopes;
238 TreeScopeSet m_activeTreeScopes; 234 TreeScopeSet m_activeTreeScopes;
239 235
240 String m_preferredStylesheetSetName; 236 String m_preferredStylesheetSetName;
241 String m_selectedStylesheetSetName; 237 String m_selectedStylesheetSetName;
242 238
243 bool m_usesSiblingRules; 239 bool m_usesSiblingRules;
244 bool m_usesSiblingRulesOverride; 240 bool m_usesSiblingRulesOverride;
245 bool m_usesFirstLineRules; 241 bool m_usesFirstLineRules;
246 bool m_usesFirstLetterRules; 242 bool m_usesFirstLetterRules;
247 bool m_usesRemUnits; 243 bool m_usesRemUnits;
248 unsigned m_maxDirectAdjacentSelectors; 244 unsigned m_maxDirectAdjacentSelectors;
249 245
250 bool m_ignorePendingStylesheets; 246 bool m_ignorePendingStylesheets;
251 bool m_didCalculateResolver; 247 bool m_didCalculateResolver;
252 OwnPtrWillBeMember<StyleResolver> m_resolver; 248 OwnPtrWillBeMember<StyleResolver> m_resolver;
253 249
254 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; 250 RefPtrWillBeMember<CSSFontSelector> m_fontSelector;
255 251
256 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t extToSheetCache; 252 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t extToSheetCache;
257 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; 253 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache;
258 }; 254 };
259 255
260 } 256 }
261 257
262 #endif 258 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/ProcessingInstruction.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698