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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 friend class IgnoringPendingStylesheet; | 67 friend class IgnoringPendingStylesheet; |
68 | 68 |
69 static PassOwnPtrWillBeRawPtr<StyleEngine> create(Document& document) { retu
rn adoptPtrWillBeNoop(new StyleEngine(document)); } | 69 static PassOwnPtrWillBeRawPtr<StyleEngine> create(Document& document) { retu
rn adoptPtrWillBeNoop(new StyleEngine(document)); } |
70 | 70 |
71 ~StyleEngine(); | 71 ~StyleEngine(); |
72 | 72 |
73 #if !ENABLE(OILPAN) | 73 #if !ENABLE(OILPAN) |
74 void detachFromDocument(); | 74 void detachFromDocument(); |
75 #endif | 75 #endif |
76 | 76 |
77 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& styleSheetsForStyle
SheetList(TreeScope&); | 77 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet>>& styleSheetsForStyleS
heetList(TreeScope&); |
78 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& activeAuthorStyl
eSheets() const; | 78 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& activeAuthorStyle
Sheets() const; |
79 | 79 |
80 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& documentAuthorSt
yleSheets() const { return m_authorStyleSheets; } | 80 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& documentAuthorSty
leSheets() const { return m_authorStyleSheets; } |
81 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> >& injectedAuthorSt
yleSheets() const; | 81 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>>& injectedAuthorSty
leSheets() const; |
82 | 82 |
83 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > activeStyleSheets
ForInspector() const; | 83 const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> activeStyleSheetsF
orInspector() const; |
84 | 84 |
85 void modifiedStyleSheet(StyleSheet*); | 85 void modifiedStyleSheet(StyleSheet*); |
86 void addStyleSheetCandidateNode(Node*, bool createdByParser); | 86 void addStyleSheetCandidateNode(Node*, bool createdByParser); |
87 void removeStyleSheetCandidateNode(Node*); | 87 void removeStyleSheetCandidateNode(Node*); |
88 void removeStyleSheetCandidateNode(Node*, TreeScope&); | 88 void removeStyleSheetCandidateNode(Node*, TreeScope&); |
89 void modifiedStyleSheetCandidateNode(Node*); | 89 void modifiedStyleSheetCandidateNode(Node*); |
90 void setExitTransitionStylesheetsEnabled(bool); | 90 void setExitTransitionStylesheetsEnabled(bool); |
91 | 91 |
92 void invalidateInjectedStyleSheetCache(); | 92 void invalidateInjectedStyleSheetCache(); |
93 void updateInjectedStyleSheetCache() const; | 93 void updateInjectedStyleSheetCache() const; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 return *m_resolver.get(); | 150 return *m_resolver.get(); |
151 } | 151 } |
152 | 152 |
153 bool hasResolver() const { return m_resolver.get(); } | 153 bool hasResolver() const { return m_resolver.get(); } |
154 void clearResolver(); | 154 void clearResolver(); |
155 void clearMasterResolver(); | 155 void clearMasterResolver(); |
156 | 156 |
157 CSSFontSelector* fontSelector() { return m_fontSelector.get(); } | 157 CSSFontSelector* fontSelector() { return m_fontSelector.get(); } |
158 void setFontSelector(PassRefPtrWillBeRawPtr<CSSFontSelector>); | 158 void setFontSelector(PassRefPtrWillBeRawPtr<CSSFontSelector>); |
159 | 159 |
160 void removeFontFaceRules(const WillBeHeapVector<RawPtrWillBeMember<const Sty
leRuleFontFace> >&); | 160 void removeFontFaceRules(const WillBeHeapVector<RawPtrWillBeMember<const Sty
leRuleFontFace>>&); |
161 void clearFontCache(); | 161 void clearFontCache(); |
162 // updateGenericFontFamilySettings is used from WebSettingsImpl. | 162 // updateGenericFontFamilySettings is used from WebSettingsImpl. |
163 void updateGenericFontFamilySettings(); | 163 void updateGenericFontFamilySettings(); |
164 | 164 |
165 void didDetach(); | 165 void didDetach(); |
166 bool shouldClearResolver() const; | 166 bool shouldClearResolver() const; |
167 void resolverChanged(StyleResolverUpdateMode); | 167 void resolverChanged(StyleResolverUpdateMode); |
168 unsigned resolverAccessCount() const; | 168 unsigned resolverAccessCount() const; |
169 | 169 |
170 void markDocumentDirty(); | 170 void markDocumentDirty(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 RawPtrWillBeMember<Document> m_document; | 261 RawPtrWillBeMember<Document> m_document; |
262 bool m_isMaster; | 262 bool m_isMaster; |
263 | 263 |
264 // Track the number of currently loading top-level stylesheets needed for re
ndering. | 264 // Track the number of currently loading top-level stylesheets needed for re
ndering. |
265 // Sheets loaded using the @import directive are not included in this count. | 265 // Sheets loaded using the @import directive are not included in this count. |
266 // We use this count of pending sheets to detect when we can begin attaching | 266 // We use this count of pending sheets to detect when we can begin attaching |
267 // elements and when it is safe to execute scripts. | 267 // elements and when it is safe to execute scripts. |
268 int m_pendingStylesheets; | 268 int m_pendingStylesheets; |
269 | 269 |
270 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_injectedAutho
rStyleSheets; | 270 mutable WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> m_injectedAuthor
StyleSheets; |
271 mutable bool m_injectedStyleSheetCacheValid; | 271 mutable bool m_injectedStyleSheetCacheValid; |
272 | 272 |
273 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet> > m_authorStyleSheets; | 273 WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> m_authorStyleSheets; |
274 | 274 |
275 OwnPtrWillBeMember<DocumentStyleSheetCollection> m_documentStyleSheetCollect
ion; | 275 OwnPtrWillBeMember<DocumentStyleSheetCollection> m_documentStyleSheetCollect
ion; |
276 | 276 |
277 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem
ber<ShadowTreeStyleSheetCollection> > StyleSheetCollectionMap; | 277 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<TreeScope>, OwnPtrWillBeMem
ber<ShadowTreeStyleSheetCollection>> StyleSheetCollectionMap; |
278 StyleSheetCollectionMap m_styleSheetCollectionMap; | 278 StyleSheetCollectionMap m_styleSheetCollectionMap; |
279 | 279 |
280 bool m_documentScopeDirty; | 280 bool m_documentScopeDirty; |
281 UnorderedTreeScopeSet m_dirtyTreeScopes; | 281 UnorderedTreeScopeSet m_dirtyTreeScopes; |
282 OrderedTreeScopeSet m_activeTreeScopes; | 282 OrderedTreeScopeSet m_activeTreeScopes; |
283 | 283 |
284 String m_preferredStylesheetSetName; | 284 String m_preferredStylesheetSetName; |
285 String m_selectedStylesheetSetName; | 285 String m_selectedStylesheetSetName; |
286 | 286 |
287 bool m_usesSiblingRules; | 287 bool m_usesSiblingRules; |
288 bool m_usesFirstLineRules; | 288 bool m_usesFirstLineRules; |
289 bool m_usesWindowInactiveSelector; | 289 bool m_usesWindowInactiveSelector; |
290 bool m_usesFirstLetterRules; | 290 bool m_usesFirstLetterRules; |
291 bool m_usesRemUnits; | 291 bool m_usesRemUnits; |
292 unsigned m_maxDirectAdjacentSelectors; | 292 unsigned m_maxDirectAdjacentSelectors; |
293 | 293 |
294 bool m_ignorePendingStylesheets; | 294 bool m_ignorePendingStylesheets; |
295 bool m_didCalculateResolver; | 295 bool m_didCalculateResolver; |
296 OwnPtrWillBeMember<StyleResolver> m_resolver; | 296 OwnPtrWillBeMember<StyleResolver> m_resolver; |
297 | 297 |
298 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; | 298 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; |
299 | 299 |
300 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t
extToSheetCache; | 300 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te
xtToSheetCache; |
301 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh
eetToTextCache; | 301 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh
eetToTextCache; |
302 }; | 302 }; |
303 | 303 |
304 } | 304 } |
305 | 305 |
306 #endif | 306 #endif |
OLD | NEW |