| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 ~StyleEngine(); | 78 ~StyleEngine(); |
| 79 | 79 |
| 80 const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList(TreeScope
&); | 80 const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList(TreeScope
&); |
| 81 | 81 |
| 82 const HeapVector<Member<CSSStyleSheet>>& injectedAuthorStyleSheets() const {
return m_injectedAuthorStyleSheets; } | 82 const HeapVector<Member<CSSStyleSheet>>& injectedAuthorStyleSheets() const {
return m_injectedAuthorStyleSheets; } |
| 83 CSSStyleSheet* inspectorStyleSheet() const { return m_inspectorStyleSheet; } | 83 CSSStyleSheet* inspectorStyleSheet() const { return m_inspectorStyleSheet; } |
| 84 | 84 |
| 85 const HeapVector<Member<CSSStyleSheet>> activeStyleSheetsForInspector() cons
t; | 85 const HeapVector<Member<CSSStyleSheet>> activeStyleSheetsForInspector() cons
t; |
| 86 | 86 |
| 87 void setNeedsActiveStyleUpdate(StyleSheet*, StyleResolverUpdateMode); | 87 void setNeedsActiveStyleUpdate(StyleSheet*, StyleResolverUpdateMode); |
| 88 void addStyleSheetCandidateNode(Node*); | 88 void addStyleSheetCandidateNode(Node&); |
| 89 void removeStyleSheetCandidateNode(Node*); | 89 void removeStyleSheetCandidateNode(Node&); |
| 90 void removeStyleSheetCandidateNode(Node*, TreeScope&); | 90 void removeStyleSheetCandidateNode(Node&, TreeScope&); |
| 91 void modifiedStyleSheetCandidateNode(Node*); | 91 void modifiedStyleSheetCandidateNode(Node&); |
| 92 void watchedSelectorsChanged(); | 92 void watchedSelectorsChanged(); |
| 93 | 93 |
| 94 void injectAuthorSheet(StyleSheetContents* authorSheet); | 94 void injectAuthorSheet(StyleSheetContents* authorSheet); |
| 95 CSSStyleSheet& ensureInspectorStyleSheet(); | 95 CSSStyleSheet& ensureInspectorStyleSheet(); |
| 96 | 96 |
| 97 void clearMediaQueryRuleSetStyleSheets(); | 97 void clearMediaQueryRuleSetStyleSheets(); |
| 98 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector)
; | 98 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector)
; |
| 99 void updateActiveStyleSheets(StyleResolverUpdateMode); | 99 void updateActiveStyleSheets(StyleResolverUpdateMode); |
| 100 | 100 |
| 101 enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets }; | 101 enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets }; |
| 102 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN
ame; } | 102 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN
ame; } |
| 103 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam
e; } | 103 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam
e; } |
| 104 void setPreferredStylesheetSetNameIfNotSet(const String&, ActiveSheetsUpdate
); | 104 void setPreferredStylesheetSetNameIfNotSet(const String&, ActiveSheetsUpdate
); |
| 105 void setSelectedStylesheetSetName(const String&); | 105 void setSelectedStylesheetSetName(const String&); |
| 106 void setHttpDefaultStyle(const String&); | 106 void setHttpDefaultStyle(const String&); |
| 107 | 107 |
| 108 void addPendingSheet(StyleEngineContext&); | 108 void addPendingSheet(StyleEngineContext&); |
| 109 void removePendingSheet(Node* styleSheetCandidateNode, const StyleEngineCont
ext&); | 109 void removePendingSheet(Node& styleSheetCandidateNode, const StyleEngineCont
ext&); |
| 110 | 110 |
| 111 bool hasPendingScriptBlockingSheets() const { return m_pendingScriptBlocking
Stylesheets > 0; } | 111 bool hasPendingScriptBlockingSheets() const { return m_pendingScriptBlocking
Stylesheets > 0; } |
| 112 bool hasPendingRenderBlockingSheets() const { return m_pendingRenderBlocking
Stylesheets > 0; } | 112 bool hasPendingRenderBlockingSheets() const { return m_pendingRenderBlocking
Stylesheets > 0; } |
| 113 bool haveScriptBlockingStylesheetsLoaded() const { return !hasPendingScriptB
lockingSheets() || m_ignorePendingStylesheets; } | 113 bool haveScriptBlockingStylesheetsLoaded() const { return !hasPendingScriptB
lockingSheets() || m_ignorePendingStylesheets; } |
| 114 bool haveRenderBlockingStylesheetsLoaded() const { return !hasPendingRenderB
lockingSheets() || m_ignorePendingStylesheets; } | 114 bool haveRenderBlockingStylesheetsLoaded() const { return !hasPendingRenderB
lockingSheets() || m_ignorePendingStylesheets; } |
| 115 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets;
} | 115 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets;
} |
| 116 | 116 |
| 117 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele
ctors; } | 117 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele
ctors; } |
| 118 bool usesSiblingRules() const { return m_usesSiblingRules; } | 118 bool usesSiblingRules() const { return m_usesSiblingRules; } |
| 119 bool usesFirstLineRules() const { return m_usesFirstLineRules; } | 119 bool usesFirstLineRules() const { return m_usesFirstLineRules; } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 void removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&)
; | 158 void removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&)
; |
| 159 void clearFontCache(); | 159 void clearFontCache(); |
| 160 // updateGenericFontFamilySettings is used from WebSettingsImpl. | 160 // updateGenericFontFamilySettings is used from WebSettingsImpl. |
| 161 void updateGenericFontFamilySettings(); | 161 void updateGenericFontFamilySettings(); |
| 162 | 162 |
| 163 void didDetach(); | 163 void didDetach(); |
| 164 bool shouldClearResolver() const; | 164 bool shouldClearResolver() const; |
| 165 void resolverChanged(StyleResolverUpdateMode); | 165 void resolverChanged(StyleResolverUpdateMode); |
| 166 | 166 |
| 167 CSSStyleSheet* createSheet(Element*, const String& text, TextPosition startP
osition, StyleEngineContext&); | 167 CSSStyleSheet* createSheet(Element&, const String& text, TextPosition startP
osition, StyleEngineContext&); |
| 168 | 168 |
| 169 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const; | 169 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const; |
| 170 void ensureFullscreenUAStyle(); | 170 void ensureFullscreenUAStyle(); |
| 171 | 171 |
| 172 void platformColorsChanged(); | 172 void platformColorsChanged(); |
| 173 | 173 |
| 174 void classChangedForElement(const SpaceSplitString& changedClasses, Element&
); | 174 void classChangedForElement(const SpaceSplitString& changedClasses, Element&
); |
| 175 void classChangedForElement(const SpaceSplitString& oldClasses, const SpaceS
plitString& newClasses, Element&); | 175 void classChangedForElement(const SpaceSplitString& oldClasses, const SpaceS
plitString& newClasses, Element&); |
| 176 void attributeChangedForElement(const QualifiedName& attributeName, Element&
); | 176 void attributeChangedForElement(const QualifiedName& attributeName, Element&
); |
| 177 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI
d, Element&); | 177 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI
d, Element&); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 bool isMaster() const { return m_isMaster; } | 209 bool isMaster() const { return m_isMaster; } |
| 210 Document* master(); | 210 Document* master(); |
| 211 Document& document() const { return *m_document; } | 211 Document& document() const { return *m_document; } |
| 212 | 212 |
| 213 typedef HeapHashSet<Member<TreeScope>> UnorderedTreeScopeSet; | 213 typedef HeapHashSet<Member<TreeScope>> UnorderedTreeScopeSet; |
| 214 | 214 |
| 215 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(UnorderedTreeScopeSet&); | 215 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(UnorderedTreeScopeSet&); |
| 216 | 216 |
| 217 void createResolver(); | 217 void createResolver(); |
| 218 | 218 |
| 219 static CSSStyleSheet* parseSheet(Element*, const String& text, TextPosition
startPosition); | 219 CSSStyleSheet* parseSheet(Element&, const String& text, TextPosition startPo
sition); |
| 220 | 220 |
| 221 const DocumentStyleSheetCollection* documentStyleSheetCollection() const | 221 const DocumentStyleSheetCollection* documentStyleSheetCollection() const |
| 222 { | 222 { |
| 223 return m_documentStyleSheetCollection.get(); | 223 return m_documentStyleSheetCollection.get(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 DocumentStyleSheetCollection* documentStyleSheetCollection() | 226 DocumentStyleSheetCollection* documentStyleSheetCollection() |
| 227 { | 227 { |
| 228 return m_documentStyleSheetCollection.get(); | 228 return m_documentStyleSheetCollection.get(); |
| 229 } | 229 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 std::unique_ptr<StyleResolverStats> m_styleResolverStats; | 278 std::unique_ptr<StyleResolverStats> m_styleResolverStats; |
| 279 unsigned m_styleForElementCount = 0; | 279 unsigned m_styleForElementCount = 0; |
| 280 | 280 |
| 281 friend class StyleEngineTest; | 281 friend class StyleEngineTest; |
| 282 }; | 282 }; |
| 283 | 283 |
| 284 } // namespace blink | 284 } // namespace blink |
| 285 | 285 |
| 286 #endif | 286 #endif |
| OLD | NEW |