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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R
efPtrWillBeMember<CSSStyleSheet> >&); | 144 void lazyAppendAuthorStyleSheets(unsigned firstNew, const WillBeHeapVector<R
efPtrWillBeMember<CSSStyleSheet> >&); |
145 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe
r<CSSStyleSheet> >&); | 145 void removePendingAuthorStyleSheets(const WillBeHeapVector<RefPtrWillBeMembe
r<CSSStyleSheet> >&); |
146 void appendPendingAuthorStyleSheets(); | 146 void appendPendingAuthorStyleSheets(); |
147 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size(
) > 0 || m_needCollectFeatures; } | 147 bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size(
) > 0 || m_needCollectFeatures; } |
148 | 148 |
149 SelectorFilter& selectorFilter() { return m_selectorFilter; } | 149 SelectorFilter& selectorFilter() { return m_selectorFilter; } |
150 | 150 |
151 bool styleTreeHasOnlyScopedResolverForDocument() const { return m_styleTree.
hasOnlyScopedResolverForDocument(); } | 151 bool styleTreeHasOnlyScopedResolverForDocument() const { return m_styleTree.
hasOnlyScopedResolverForDocument(); } |
152 | 152 |
153 void styleTreeResolveScopedKeyframesRules(const Element* element, Vector<Sco
pedStyleResolver*, 8>& resolvers) | 153 void styleTreeResolveScopedKeyframesRules(const Element* element, WillBeHeap
Vector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers) |
154 { | 154 { |
155 m_styleTree.resolveScopedKeyframesRules(element, resolvers); | 155 m_styleTree.resolveScopedKeyframesRules(element, resolvers); |
156 } | 156 } |
157 | 157 |
158 // These methods will give back the set of rules that matched for a given el
ement (or a pseudo-element). | 158 // These methods will give back the set of rules that matched for a given el
ement (or a pseudo-element). |
159 enum CSSRuleFilter { | 159 enum CSSRuleFilter { |
160 UAAndUserCSSRules = 1 << 1, | 160 UAAndUserCSSRules = 1 << 1, |
161 AuthorCSSRules = 1 << 2, | 161 AuthorCSSRules = 1 << 2, |
162 EmptyCSSRules = 1 << 3, | 162 EmptyCSSRules = 1 << 3, |
163 CrossOriginCSSRules = 1 << 4, | 163 CrossOriginCSSRules = 1 << 4, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 void updateFont(StyleResolverState&); | 229 void updateFont(StyleResolverState&); |
230 | 230 |
231 void loadPendingResources(StyleResolverState&); | 231 void loadPendingResources(StyleResolverState&); |
232 void adjustRenderStyle(StyleResolverState&, Element*); | 232 void adjustRenderStyle(StyleResolverState&, Element*); |
233 | 233 |
234 void appendCSSStyleSheet(CSSStyleSheet*); | 234 void appendCSSStyleSheet(CSSStyleSheet*); |
235 | 235 |
236 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); | 236 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); |
237 void matchUARules(ElementRuleCollector&, RuleSet*); | 237 void matchUARules(ElementRuleCollector&, RuleSet*); |
238 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); | 238 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); |
239 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, Vector<ScopedStyleResolver*, 8>& resolvers, Vector<ScopedStyleRe
solver*, 8>& resolversInShadowTree); | 239 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re
solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers
InShadowTree); |
240 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); | 240 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); |
241 void matchUARules(ElementRuleCollector&); | 241 void matchUARules(ElementRuleCollector&); |
242 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 | 242 // FIXME: watched selectors should be implemented using injected author styl
esheets: http://crbug.com/316960 |
243 void matchWatchSelectorRules(ElementRuleCollector&); | 243 void matchWatchSelectorRules(ElementRuleCollector&); |
244 void collectFeatures(); | 244 void collectFeatures(); |
245 void resetRuleFeatures(); | 245 void resetRuleFeatures(); |
246 | 246 |
247 bool fastRejectSelector(const RuleData&) const; | 247 bool fastRejectSelector(const RuleData&) const; |
248 | 248 |
249 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 249 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 322 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
323 unsigned m_styleResolverStatsSequence; | 323 unsigned m_styleResolverStatsSequence; |
324 | 324 |
325 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 325 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
326 unsigned m_accessCount; | 326 unsigned m_accessCount; |
327 }; | 327 }; |
328 | 328 |
329 } // namespace blink | 329 } // namespace blink |
330 | 330 |
331 #endif // StyleResolver_h | 331 #endif // StyleResolver_h |
OLD | NEW |