| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // FIXME: StyleResolver should not be keeping tree-walk state. | 99 // FIXME: StyleResolver should not be keeping tree-walk state. |
| 100 // These should move to some global tree-walk state, or should be contained
in a | 100 // These should move to some global tree-walk state, or should be contained
in a |
| 101 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. | 101 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. |
| 102 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. | 102 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. |
| 103 void pushParentElement(Element&); | 103 void pushParentElement(Element&); |
| 104 void popParentElement(Element&); | 104 void popParentElement(Element&); |
| 105 | 105 |
| 106 PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle =
0, StyleSharingBehavior = AllowStyleSharing, | 106 PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle =
0, StyleSharingBehavior = AllowStyleSharing, |
| 107 RuleMatchingBehavior = MatchAllRules); | 107 RuleMatchingBehavior = MatchAllRules); |
| 108 | 108 |
| 109 PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle&, Rende
rStyle* parentStyle, const StyleKeyframe*, const AtomicString& animationName); | 109 PassRefPtr<RenderStyle> styleForKeyframe(Element&, const RenderStyle&, Rende
rStyle* parentStyle, const StyleKeyframe*, const AtomicString& animationName); |
| 110 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(Element&, CSSPropertyID, CSSValue&); | 110 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(Element&, CSSPropertyID, CSSValue&); |
| 111 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(StyleResolverState&, CSSPropertyID, CSSValue&); | 111 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(StyleResolverState&, CSSPropertyID, CSSValue&); |
| 112 | 112 |
| 113 PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleReq
uest&, RenderStyle* parentStyle); | 113 PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleReq
uest&, RenderStyle* parentStyle); |
| 114 | 114 |
| 115 PassRefPtr<RenderStyle> styleForPage(int pageIndex); | 115 PassRefPtr<RenderStyle> styleForPage(int pageIndex); |
| 116 PassRefPtr<RenderStyle> defaultStyleForElement(); | 116 PassRefPtr<RenderStyle> defaultStyleForElement(); |
| 117 PassRefPtr<RenderStyle> styleForText(Text*); | 117 PassRefPtr<RenderStyle> styleForText(Text*); |
| 118 | 118 |
| 119 static PassRefPtr<RenderStyle> styleForDocument(Document&); | 119 static PassRefPtr<RenderStyle> styleForDocument(Document&); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); | 222 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); |
| 223 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re
solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers
InShadowTree); | 223 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc
ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re
solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers
InShadowTree); |
| 224 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); | 224 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); |
| 225 void matchUARules(ElementRuleCollector&); | 225 void matchUARules(ElementRuleCollector&); |
| 226 void collectFeatures(); | 226 void collectFeatures(); |
| 227 void resetRuleFeatures(); | 227 void resetRuleFeatures(); |
| 228 | 228 |
| 229 bool fastRejectSelector(const RuleData&) const; | 229 bool fastRejectSelector(const RuleData&) const; |
| 230 | 230 |
| 231 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 231 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
| 232 bool applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; | 232 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); |
| 233 void applyCallbackSelectors(StyleResolverState&); | 233 void applyCallbackSelectors(StyleResolverState&); |
| 234 | 234 |
| 235 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember
<ScopedStyleResolver>, 8>&); | 235 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember
<ScopedStyleResolver>, 8>&); |
| 236 void collectScopedResolversForHostedShadowTrees(const Element*, WillBeHeapVe
ctor<RawPtrWillBeMember<ScopedStyleResolver>, 8>&); | 236 void collectScopedResolversForHostedShadowTrees(const Element*, WillBeHeapVe
ctor<RawPtrWillBeMember<ScopedStyleResolver>, 8>&); |
| 237 | 237 |
| 238 enum StyleApplicationPass { | 238 enum StyleApplicationPass { |
| 239 HighPriorityProperties, | 239 HighPriorityProperties, |
| 240 LowPriorityProperties | 240 LowPriorityProperties |
| 241 }; | 241 }; |
| 242 template <StyleResolver::StyleApplicationPass pass> | 242 template <StyleResolver::StyleApplicationPass pass> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 305 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
| 306 unsigned m_styleResolverStatsSequence; | 306 unsigned m_styleResolverStatsSequence; |
| 307 | 307 |
| 308 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 308 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
| 309 unsigned m_accessCount; | 309 unsigned m_accessCount; |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 } // namespace blink | 312 } // namespace blink |
| 313 | 313 |
| 314 #endif // StyleResolver_h | 314 #endif // StyleResolver_h |
| OLD | NEW |