| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList(TreeScope&); | 77 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList(TreeScope&); |
| 78 | 78 |
| 79 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re
turn m_authorStyleSheets; } | 79 const Vector<RefPtr<CSSStyleSheet> >& documentAuthorStyleSheets() const { re
turn m_authorStyleSheets; } |
| 80 | 80 |
| 81 void modifiedStyleSheet(StyleSheet*); | 81 void modifiedStyleSheet(StyleSheet*); |
| 82 void addStyleSheetCandidateNode(Node*, bool createdByParser); | 82 void addStyleSheetCandidateNode(Node*, bool createdByParser); |
| 83 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeSc
ope&); | 83 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeSc
ope&); |
| 84 | 84 |
| 85 void clearMediaQueryRuleSetStyleSheets(); | 85 void clearMediaQueryRuleSetStyleSheets(); |
| 86 void updateActiveStyleSheets(StyleResolverUpdateMode); | 86 void updateActiveStyleSheets(); |
| 87 | 87 |
| 88 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets;
} | 88 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets;
} |
| 89 | 89 |
| 90 // FIXME(sky): Remove this and ::first-line. | 90 // FIXME(sky): Remove this and ::first-line. |
| 91 bool usesFirstLineRules() const { return false; } | 91 bool usesFirstLineRules() const { return false; } |
| 92 | 92 |
| 93 bool usesRemUnits() const { return m_usesRemUnits; } | 93 bool usesRemUnits() const { return m_usesRemUnits; } |
| 94 void setUsesRemUnit(bool b) { m_usesRemUnits = b; } | 94 void setUsesRemUnit(bool b) { m_usesRemUnits = b; } |
| 95 | 95 |
| 96 void didRemoveShadowRoot(ShadowRoot*); | 96 void didRemoveShadowRoot(ShadowRoot*); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 115 void clearResolver(); | 115 void clearResolver(); |
| 116 void clearMasterResolver(); | 116 void clearMasterResolver(); |
| 117 | 117 |
| 118 CSSFontSelector* fontSelector() { return m_fontSelector.get(); } | 118 CSSFontSelector* fontSelector() { return m_fontSelector.get(); } |
| 119 void removeFontFaceRules(const Vector<RawPtr<const StyleRuleFontFace> >&); | 119 void removeFontFaceRules(const Vector<RawPtr<const StyleRuleFontFace> >&); |
| 120 void clearFontCache(); | 120 void clearFontCache(); |
| 121 // updateGenericFontFamilySettings is used from WebSettingsImpl. | 121 // updateGenericFontFamilySettings is used from WebSettingsImpl. |
| 122 void updateGenericFontFamilySettings(); | 122 void updateGenericFontFamilySettings(); |
| 123 | 123 |
| 124 void didDetach(); | 124 void didDetach(); |
| 125 void resolverChanged(StyleResolverUpdateMode); | 125 void resolverChanged(); |
| 126 unsigned resolverAccessCount() const; | 126 unsigned resolverAccessCount() const; |
| 127 | 127 |
| 128 void markDocumentDirty(); | 128 void markDocumentDirty(); |
| 129 | 129 |
| 130 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text, TextPosi
tion startPosition, bool createdByParser); | 130 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text, TextPosi
tion startPosition, bool createdByParser); |
| 131 void removeSheet(StyleSheetContents*); | 131 void removeSheet(StyleSheetContents*); |
| 132 | 132 |
| 133 void addScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scopedS
tyleResolvers.add(resolver); } | 133 void addScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scopedS
tyleResolvers.add(resolver); } |
| 134 void removeScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scop
edStyleResolvers.remove(resolver); } | 134 void removeScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scop
edStyleResolvers.remove(resolver); } |
| 135 bool hasOnlyScopedResolverForDocument() const { return m_scopedStyleResolver
s.size() == 1; } | 135 bool hasOnlyScopedResolverForDocument() const { return m_scopedStyleResolver
s.size() == 1; } |
| 136 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const; | 136 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const; |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 // CSSFontSelectorClient implementation. | 139 // CSSFontSelectorClient implementation. |
| 140 virtual void fontsNeedUpdate(CSSFontSelector*) override; | 140 virtual void fontsNeedUpdate(CSSFontSelector*) override; |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 StyleEngine(Document&); | 143 StyleEngine(Document&); |
| 144 | 144 |
| 145 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); | 145 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); |
| 146 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); | 146 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); |
| 147 bool shouldUpdateDocumentStyleSheetCollection(StyleResolverUpdateMode) const
; | |
| 148 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode) con
st; | |
| 149 | 147 |
| 150 void markTreeScopeDirty(TreeScope&); | 148 void markTreeScopeDirty(TreeScope&); |
| 151 | 149 |
| 152 bool isMaster() const { return m_isMaster; } | 150 bool isMaster() const { return m_isMaster; } |
| 153 Document* master(); | 151 Document* master(); |
| 154 Document& document() const { return *m_document; } | 152 Document& document() const { return *m_document; } |
| 155 | 153 |
| 156 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; | 154 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; |
| 157 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); | 155 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); |
| 158 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes); | 156 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 192 |
| 195 RefPtr<CSSFontSelector> m_fontSelector; | 193 RefPtr<CSSFontSelector> m_fontSelector; |
| 196 | 194 |
| 197 HashMap<AtomicString, RawPtr<StyleSheetContents> > m_textToSheetCache; | 195 HashMap<AtomicString, RawPtr<StyleSheetContents> > m_textToSheetCache; |
| 198 HashMap<RawPtr<StyleSheetContents>, AtomicString> m_sheetToTextCache; | 196 HashMap<RawPtr<StyleSheetContents>, AtomicString> m_sheetToTextCache; |
| 199 }; | 197 }; |
| 200 | 198 |
| 201 } | 199 } |
| 202 | 200 |
| 203 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ | 201 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ |
| OLD | NEW |