| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include <memory> | 50 #include <memory> |
| 51 | 51 |
| 52 namespace blink { | 52 namespace blink { |
| 53 | 53 |
| 54 class CSSFontSelector; | 54 class CSSFontSelector; |
| 55 class CSSStyleSheet; | 55 class CSSStyleSheet; |
| 56 class Node; | 56 class Node; |
| 57 class RuleFeatureSet; | 57 class RuleFeatureSet; |
| 58 class ShadowTreeStyleSheetCollection; | 58 class ShadowTreeStyleSheetCollection; |
| 59 class StyleRuleFontFace; | 59 class StyleRuleFontFace; |
| 60 class StyleRuleUsageTracker; |
| 60 class StyleSheet; | 61 class StyleSheet; |
| 61 class StyleSheetContents; | 62 class StyleSheetContents; |
| 62 class ViewportStyleResolver; | 63 class ViewportStyleResolver; |
| 63 | 64 |
| 64 class CORE_EXPORT StyleEngine final | 65 class CORE_EXPORT StyleEngine final |
| 65 : public GarbageCollectedFinalized<StyleEngine>, | 66 : public GarbageCollectedFinalized<StyleEngine>, |
| 66 public CSSFontSelectorClient, | 67 public CSSFontSelectorClient, |
| 67 public TraceWrapperBase { | 68 public TraceWrapperBase { |
| 68 USING_GARBAGE_COLLECTED_MIXIN(StyleEngine); | 69 USING_GARBAGE_COLLECTED_MIXIN(StyleEngine); |
| 69 | 70 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 159 |
| 159 void didRemoveShadowRoot(ShadowRoot*); | 160 void didRemoveShadowRoot(ShadowRoot*); |
| 160 void shadowRootRemovedFromDocument(ShadowRoot*); | 161 void shadowRootRemovedFromDocument(ShadowRoot*); |
| 161 void appendActiveAuthorStyleSheets(); | 162 void appendActiveAuthorStyleSheets(); |
| 162 void addTreeBoundaryCrossingScope(const TreeScope&); | 163 void addTreeBoundaryCrossingScope(const TreeScope&); |
| 163 const DocumentOrderedList& treeBoundaryCrossingScopes() const { | 164 const DocumentOrderedList& treeBoundaryCrossingScopes() const { |
| 164 return m_treeBoundaryCrossingScopes; | 165 return m_treeBoundaryCrossingScopes; |
| 165 } | 166 } |
| 166 void resetAuthorStyle(TreeScope&); | 167 void resetAuthorStyle(TreeScope&); |
| 167 | 168 |
| 169 void setRuleUsageTracker(StyleRuleUsageTracker*); |
| 170 |
| 168 StyleResolver* resolver() const { return m_resolver.get(); } | 171 StyleResolver* resolver() const { return m_resolver.get(); } |
| 169 | 172 |
| 170 StyleResolver& ensureResolver() { | 173 StyleResolver& ensureResolver() { |
| 171 if (!m_resolver) { | 174 if (!m_resolver) { |
| 172 createResolver(); | 175 createResolver(); |
| 173 } else if (m_resolver->hasPendingAuthorStyleSheets()) { | 176 } else if (m_resolver->hasPendingAuthorStyleSheets()) { |
| 174 viewportRulesChanged(); | 177 viewportRulesChanged(); |
| 175 m_resolver->appendPendingAuthorStyleSheets(); | 178 m_resolver->appendPendingAuthorStyleSheets(); |
| 176 } | 179 } |
| 177 return *m_resolver.get(); | 180 return *m_resolver.get(); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // Track the number of currently loading top-level stylesheets needed for | 295 // Track the number of currently loading top-level stylesheets needed for |
| 293 // layout. Sheets loaded using the @import directive are not included in this | 296 // layout. Sheets loaded using the @import directive are not included in this |
| 294 // count. We use this count of pending sheets to detect when we can begin | 297 // count. We use this count of pending sheets to detect when we can begin |
| 295 // attaching elements and when it is safe to execute scripts. | 298 // attaching elements and when it is safe to execute scripts. |
| 296 int m_pendingScriptBlockingStylesheets = 0; | 299 int m_pendingScriptBlockingStylesheets = 0; |
| 297 int m_pendingRenderBlockingStylesheets = 0; | 300 int m_pendingRenderBlockingStylesheets = 0; |
| 298 | 301 |
| 299 HeapVector<Member<CSSStyleSheet>> m_injectedAuthorStyleSheets; | 302 HeapVector<Member<CSSStyleSheet>> m_injectedAuthorStyleSheets; |
| 300 Member<CSSStyleSheet> m_inspectorStyleSheet; | 303 Member<CSSStyleSheet> m_inspectorStyleSheet; |
| 301 | 304 |
| 305 Member<StyleRuleUsageTracker> m_tracker; |
| 306 |
| 302 Member<DocumentStyleSheetCollection> m_documentStyleSheetCollection; | 307 Member<DocumentStyleSheetCollection> m_documentStyleSheetCollection; |
| 303 | 308 |
| 304 typedef HeapHashMap<WeakMember<TreeScope>, | 309 typedef HeapHashMap<WeakMember<TreeScope>, |
| 305 Member<ShadowTreeStyleSheetCollection>> | 310 Member<ShadowTreeStyleSheetCollection>> |
| 306 StyleSheetCollectionMap; | 311 StyleSheetCollectionMap; |
| 307 StyleSheetCollectionMap m_styleSheetCollectionMap; | 312 StyleSheetCollectionMap m_styleSheetCollectionMap; |
| 308 | 313 |
| 309 bool m_documentScopeDirty = true; | 314 bool m_documentScopeDirty = true; |
| 310 UnorderedTreeScopeSet m_dirtyTreeScopes; | 315 UnorderedTreeScopeSet m_dirtyTreeScopes; |
| 311 UnorderedTreeScopeSet m_activeTreeScopes; | 316 UnorderedTreeScopeSet m_activeTreeScopes; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 334 | 339 |
| 335 std::unique_ptr<StyleResolverStats> m_styleResolverStats; | 340 std::unique_ptr<StyleResolverStats> m_styleResolverStats; |
| 336 unsigned m_styleForElementCount = 0; | 341 unsigned m_styleForElementCount = 0; |
| 337 | 342 |
| 338 friend class StyleEngineTest; | 343 friend class StyleEngineTest; |
| 339 }; | 344 }; |
| 340 | 345 |
| 341 } // namespace blink | 346 } // namespace blink |
| 342 | 347 |
| 343 #endif | 348 #endif |
| OLD | NEW |