| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 static PassRefPtr<RenderStyle> styleForDocument(Document&, CSSFontSelector*
= 0); | 134 static PassRefPtr<RenderStyle> styleForDocument(Document&, CSSFontSelector*
= 0); |
| 135 | 135 |
| 136 // FIXME: This only has 5 callers and should be removed. Callers should be e
xplicit about | 136 // FIXME: This only has 5 callers and should be removed. Callers should be e
xplicit about |
| 137 // their dependency on Document* instead of grabbing one through StyleResolv
er. | 137 // their dependency on Document* instead of grabbing one through StyleResolv
er. |
| 138 Document& document() { return m_document; } | 138 Document& document() { return m_document; } |
| 139 | 139 |
| 140 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. | 140 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. |
| 141 // https://bugs.webkit.org/show_bug.cgi?id=108890 | 141 // https://bugs.webkit.org/show_bug.cgi?id=108890 |
| 142 void appendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyle
Sheet> >&); | 142 void appendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyle
Sheet> >&); |
| 143 void resetAuthorStyle(const ContainerNode*); | |
| 144 void finishAppendAuthorStyleSheets(); | 143 void finishAppendAuthorStyleSheets(); |
| 145 void resetFontSelector(); | |
| 146 | 144 |
| 147 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } | 145 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } |
| 148 void processScopedRules(const RuleSet& authorRules, const KURL&, ContainerNo
de* scope = 0); | 146 void processScopedRules(const RuleSet& authorRules, const KURL&, ContainerNo
de* scope = 0); |
| 149 | 147 |
| 150 void lazyAppendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSS
tyleSheet> >&); | 148 void lazyAppendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSS
tyleSheet> >&); |
| 151 void removePendingAuthorStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&); | |
| 152 void appendPendingAuthorStyleSheets(); | 149 void appendPendingAuthorStyleSheets(); |
| 153 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size(
) > 0 || m_needCollectFeatures; } | 150 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size(
) > 0 || m_needCollectFeatures; } |
| 154 | 151 |
| 155 SelectorFilter& selectorFilter() { return m_selectorFilter; } | 152 SelectorFilter& selectorFilter() { return m_selectorFilter; } |
| 156 | 153 |
| 157 void setBuildScopedStyleTreeInDocumentOrder(bool enabled) { m_styleTree.setB
uildInDocumentOrder(enabled); } | 154 void setBuildScopedStyleTreeInDocumentOrder(bool enabled) { m_styleTree.setB
uildInDocumentOrder(enabled); } |
| 158 bool buildScopedStyleTreeInDocumentOrder() const { return m_styleTree.buildI
nDocumentOrder(); } | 155 bool buildScopedStyleTreeInDocumentOrder() const { return m_styleTree.buildI
nDocumentOrder(); } |
| 159 bool styleTreeHasOnlyScopedResolverForDocument() const { return m_styleTree.
hasOnlyScopedResolverForDocument(); } | 156 bool styleTreeHasOnlyScopedResolverForDocument() const { return m_styleTree.
hasOnlyScopedResolverForDocument(); } |
| 160 ScopedStyleResolver* styleTreeScopedStyleResolverForDocument() const { retur
n m_styleTree.scopedStyleResolverForDocument(); } | 157 ScopedStyleResolver* styleTreeScopedStyleResolverForDocument() const { retur
n m_styleTree.scopedStyleResolverForDocument(); } |
| 161 | 158 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); | 244 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); |
| 248 void matchUARules(ElementRuleCollector&, RuleSet*); | 245 void matchUARules(ElementRuleCollector&, RuleSet*); |
| 249 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); | 246 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); |
| 250 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, Vector<ScopedStyleResolver*, 8>& resolvers, Vector<ScopedStyleRe
solver*, 8>& resolversInShadowTree); | 247 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, Vector<ScopedStyleResolver*, 8>& resolvers, Vector<ScopedStyleRe
solver*, 8>& resolversInShadowTree); |
| 251 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); | 248 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); |
| 252 void matchUARules(ElementRuleCollector&); | 249 void matchUARules(ElementRuleCollector&); |
| 253 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 | 250 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 |
| 254 void matchWatchSelectorRules(ElementRuleCollector&); | 251 void matchWatchSelectorRules(ElementRuleCollector&); |
| 255 void collectFeatures(); | 252 void collectFeatures(); |
| 256 void collectTreeBoundaryCrossingRules(Element*, ElementRuleCollector&, bool
includeEmptyRules); | 253 void collectTreeBoundaryCrossingRules(Element*, ElementRuleCollector&, bool
includeEmptyRules); |
| 257 void resetRuleFeatures(); | |
| 258 | 254 |
| 259 bool fastRejectSelector(const RuleData&) const; | 255 bool fastRejectSelector(const RuleData&) const; |
| 260 | 256 |
| 261 void applyMatchedProperties(StyleResolverState&, const MatchResult&, Element
* animatingElement); | 257 void applyMatchedProperties(StyleResolverState&, const MatchResult&, Element
* animatingElement); |
| 262 void applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; | 258 void applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; |
| 263 | 259 |
| 264 enum StyleApplicationPass { | 260 enum StyleApplicationPass { |
| 265 VariableDefinitions, | 261 VariableDefinitions, |
| 266 AnimationProperties, | 262 AnimationProperties, |
| 267 HighPriorityProperties, | 263 HighPriorityProperties, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 PseudoId ignoreDynamicPseudo = NOPSEUDO; | 343 PseudoId ignoreDynamicPseudo = NOPSEUDO; |
| 348 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo,
DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) | 344 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo,
DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) |
| 349 return true; | 345 return true; |
| 350 } | 346 } |
| 351 return false; | 347 return false; |
| 352 } | 348 } |
| 353 | 349 |
| 354 } // namespace WebCore | 350 } // namespace WebCore |
| 355 | 351 |
| 356 #endif // StyleResolver_h | 352 #endif // StyleResolver_h |
| OLD | NEW |