OLD | NEW |
---|---|
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
195 | 195 |
196 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); | 196 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); |
197 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); | 197 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); |
198 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode); | 198 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode); |
199 | 199 |
200 void markTreeScopeDirty(TreeScope&); | 200 void markTreeScopeDirty(TreeScope&); |
201 | 201 |
202 bool isMaster() const { return m_isMaster; } | 202 bool isMaster() const { return m_isMaster; } |
203 Document* master(); | 203 Document* master(); |
204 | 204 |
205 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; | 205 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; |
haraken
2014/04/25 05:21:42
Just to confirm: It is safe to use raw pointers to
Mads Ager (chromium)
2014/04/25 10:58:25
Yes.
| |
206 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); | 206 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); |
207 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes); | 207 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes); |
208 | 208 |
209 void createResolver(); | 209 void createResolver(); |
210 | 210 |
211 static PassRefPtrWillBeRawPtr<CSSStyleSheet> parseSheet(Element*, const Stri ng& text, TextPosition startPosition, bool createdByParser); | 211 static PassRefPtrWillBeRawPtr<CSSStyleSheet> parseSheet(Element*, const Stri ng& text, TextPosition startPosition, bool createdByParser); |
212 | 212 |
213 Document& m_document; | 213 Document& m_document; |
214 bool m_isMaster; | 214 bool m_isMaster; |
215 | 215 |
216 // Track the number of currently loading top-level stylesheets needed for re ndering. | 216 // Track the number of currently loading top-level stylesheets needed for re ndering. |
217 // Sheets loaded using the @import directive are not included in this count. | 217 // Sheets loaded using the @import directive are not included in this count. |
218 // We use this count of pending sheets to detect when we can begin attaching | 218 // We use this count of pending sheets to detect when we can begin attaching |
219 // elements and when it is safe to execute scripts. | 219 // elements and when it is safe to execute scripts. |
220 int m_pendingStylesheets; | 220 int m_pendingStylesheets; |
221 | 221 |
222 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_injectedAutho rStyleSheets; | 222 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_injectedAutho rStyleSheets; |
223 mutable bool m_injectedStyleSheetCacheValid; | 223 mutable bool m_injectedStyleSheetCacheValid; |
224 | 224 |
225 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets; | 225 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets; |
226 | 226 |
227 DocumentStyleSheetCollection m_documentStyleSheetCollection; | 227 DocumentStyleSheetCollection m_documentStyleSheetCollection; |
228 WillBeHeapHashMap<TreeScope*, OwnPtrWillBeMember<ShadowTreeStyleSheetCollect ion> > m_styleSheetCollectionMap; | 228 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem ber<ShadowTreeStyleSheetCollection> > StyleSheetCollectionMap; |
229 StyleSheetCollectionMap m_styleSheetCollectionMap; | |
229 | 230 |
230 bool m_documentScopeDirty; | 231 bool m_documentScopeDirty; |
231 TreeScopeSet m_dirtyTreeScopes; | 232 TreeScopeSet m_dirtyTreeScopes; |
232 TreeScopeSet m_activeTreeScopes; | 233 TreeScopeSet m_activeTreeScopes; |
233 | 234 |
234 String m_preferredStylesheetSetName; | 235 String m_preferredStylesheetSetName; |
235 String m_selectedStylesheetSetName; | 236 String m_selectedStylesheetSetName; |
236 | 237 |
237 bool m_usesSiblingRules; | 238 bool m_usesSiblingRules; |
238 bool m_usesSiblingRulesOverride; | 239 bool m_usesSiblingRulesOverride; |
239 bool m_usesFirstLineRules; | 240 bool m_usesFirstLineRules; |
240 bool m_usesFirstLetterRules; | 241 bool m_usesFirstLetterRules; |
241 bool m_usesRemUnits; | 242 bool m_usesRemUnits; |
242 unsigned m_maxDirectAdjacentSelectors; | 243 unsigned m_maxDirectAdjacentSelectors; |
243 | 244 |
244 bool m_ignorePendingStylesheets; | 245 bool m_ignorePendingStylesheets; |
245 bool m_didCalculateResolver; | 246 bool m_didCalculateResolver; |
246 OwnPtrWillBeMember<StyleResolver> m_resolver; | 247 OwnPtrWillBeMember<StyleResolver> m_resolver; |
247 | 248 |
248 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; | 249 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; |
249 | 250 |
250 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t extToSheetCache; | 251 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t extToSheetCache; |
251 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; | 252 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; |
252 }; | 253 }; |
253 | 254 |
254 } | 255 } |
255 | 256 |
256 #endif | 257 #endif |
OLD | NEW |