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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // FIXME: This only has 5 callers and should be removed. Callers should be e
xplicit about | 135 // FIXME: This only has 5 callers and should be removed. Callers should be e
xplicit about |
136 // their dependency on Document* instead of grabbing one through StyleResolv
er. | 136 // their dependency on Document* instead of grabbing one through StyleResolv
er. |
137 Document& document() { return m_document; } | 137 Document& document() { return m_document; } |
138 | 138 |
139 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. | 139 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. |
140 // https://bugs.webkit.org/show_bug.cgi?id=108890 | 140 // https://bugs.webkit.org/show_bug.cgi?id=108890 |
141 void appendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<RefPt
rWillBeMember<CSSStyleSheet> >&); | 141 void appendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<RefPt
rWillBeMember<CSSStyleSheet> >&); |
142 void resetAuthorStyle(const ContainerNode*); | 142 void resetAuthorStyle(const ContainerNode*); |
143 void finishAppendAuthorStyleSheets(); | 143 void finishAppendAuthorStyleSheets(); |
144 | 144 |
145 TreeBoundaryCrossingRules& treeBoundaryCrossingRules() { return m_treeBounda
ryCrossingRules; } | 145 void processScopedRules(const RuleSet& authorRules, CSSStyleSheet*, Containe
rNode& scope); |
146 void processScopedRules(const RuleSet& authorRules, const KURL&, ContainerNo
de* scope = 0); | |
147 | 146 |
148 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R
efPtrWillBeMember<CSSStyleSheet> >&); | 147 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R
efPtrWillBeMember<CSSStyleSheet> >&); |
149 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe
r<CSSStyleSheet> >&); | 148 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe
r<CSSStyleSheet> >&); |
150 void appendPendingAuthorStyleSheets(); | 149 void appendPendingAuthorStyleSheets(); |
151 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size(
) > 0 || m_needCollectFeatures; } | 150 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size(
) > 0 || m_needCollectFeatures; } |
152 | 151 |
153 SelectorFilter& selectorFilter() { return m_selectorFilter; } | 152 SelectorFilter& selectorFilter() { return m_selectorFilter; } |
154 | 153 |
155 void setBuildScopedStyleTreeInDocumentOrder(bool enabled) { m_styleTree.setB
uildInDocumentOrder(enabled); } | 154 void setBuildScopedStyleTreeInDocumentOrder(bool enabled) { m_styleTree.setB
uildInDocumentOrder(enabled); } |
156 bool buildScopedStyleTreeInDocumentOrder() const { return m_styleTree.buildI
nDocumentOrder(); } | 155 bool buildScopedStyleTreeInDocumentOrder() const { return m_styleTree.buildI
nDocumentOrder(); } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 231 |
233 virtual void trace(Visitor*) OVERRIDE; | 232 virtual void trace(Visitor*) OVERRIDE; |
234 | 233 |
235 private: | 234 private: |
236 // CSSFontSelectorClient implementation. | 235 // CSSFontSelectorClient implementation. |
237 virtual void fontsNeedUpdate(CSSFontSelector*) OVERRIDE; | 236 virtual void fontsNeedUpdate(CSSFontSelector*) OVERRIDE; |
238 | 237 |
239 private: | 238 private: |
240 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl
eRule> >& watchedSelectors); | 239 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl
eRule> >& watchedSelectors); |
241 | 240 |
242 void addTreeBoundaryCrossingRules(const WillBeHeapVector<MinimalRuleData>&,
ContainerNode* scope); | |
243 | |
244 // FIXME: This should probably go away, folded into FontBuilder. | 241 // FIXME: This should probably go away, folded into FontBuilder. |
245 void updateFont(StyleResolverState&); | 242 void updateFont(StyleResolverState&); |
246 | 243 |
247 void loadPendingResources(StyleResolverState&); | 244 void loadPendingResources(StyleResolverState&); |
248 | 245 |
249 void appendCSSStyleSheet(CSSStyleSheet*); | 246 void appendCSSStyleSheet(CSSStyleSheet*); |
250 | 247 |
251 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); | 248 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); |
252 void matchUARules(ElementRuleCollector&, RuleSet*); | 249 void matchUARules(ElementRuleCollector&, RuleSet*); |
253 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); | 250 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); |
254 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, Vector<ScopedStyleResolver*, 8>& resolvers, Vector<ScopedStyleRe
solver*, 8>& resolversInShadowTree); | 251 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, Vector<ScopedStyleResolver*, 8>& resolvers, Vector<ScopedStyleRe
solver*, 8>& resolversInShadowTree); |
255 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); | 252 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); |
256 void matchUARules(ElementRuleCollector&); | 253 void matchUARules(ElementRuleCollector&); |
257 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 | 254 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 |
258 void matchWatchSelectorRules(ElementRuleCollector&); | 255 void matchWatchSelectorRules(ElementRuleCollector&); |
259 void collectFeatures(); | 256 void collectFeatures(); |
260 void collectTreeBoundaryCrossingRules(Element*, ElementRuleCollector&, bool
includeEmptyRules); | |
261 void resetRuleFeatures(); | 257 void resetRuleFeatures(); |
262 | 258 |
263 bool fastRejectSelector(const RuleData&) const; | 259 bool fastRejectSelector(const RuleData&) const; |
264 | 260 |
265 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 261 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
266 void applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; | 262 void applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; |
267 | 263 |
268 enum StyleApplicationPass { | 264 enum StyleApplicationPass { |
269 AnimationProperties, | 265 AnimationProperties, |
270 HighPriorityProperties, | 266 HighPriorityProperties, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 333 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
338 unsigned m_styleResolverStatsSequence; | 334 unsigned m_styleResolverStatsSequence; |
339 | 335 |
340 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 336 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
341 unsigned m_accessCount; | 337 unsigned m_accessCount; |
342 }; | 338 }; |
343 | 339 |
344 } // namespace WebCore | 340 } // namespace WebCore |
345 | 341 |
346 #endif // StyleResolver_h | 342 #endif // StyleResolver_h |
OLD | NEW |