| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. | 184 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. |
| 185 void pushParentElement(Element*); | 185 void pushParentElement(Element*); |
| 186 void popParentElement(Element*); | 186 void popParentElement(Element*); |
| 187 void pushParentShadowRoot(const ShadowRoot&); | 187 void pushParentShadowRoot(const ShadowRoot&); |
| 188 void popParentShadowRoot(const ShadowRoot&); | 188 void popParentShadowRoot(const ShadowRoot&); |
| 189 | 189 |
| 190 PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle =
0, StyleSharingBehavior = AllowStyleSharing, | 190 PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle =
0, StyleSharingBehavior = AllowStyleSharing, |
| 191 RuleMatchingBehavior = MatchAllRules, RenderRegion* regionForStyling = 0
); | 191 RuleMatchingBehavior = MatchAllRules, RenderRegion* regionForStyling = 0
); |
| 192 | 192 |
| 193 // FIXME: The following logic related to animations and keyframes should be
factored out of StyleResolver | 193 // FIXME: The following logic related to animations and keyframes should be
factored out of StyleResolver |
| 194 // The body of calculateCSSAnimationUpdate can move to CSSAnimations.cpp and
take just const element, const style, | |
| 195 // and const ScopedStyleTree | |
| 196 void calculateCSSAnimationUpdate(StyleResolverState&); | |
| 197 void resolveKeyframes(Element*, const RenderStyle*, const AtomicString& anim
ationName, TimingFunction* defaultTimingFunction, Vector<std::pair<KeyframeAnima
tionEffect::KeyframeVector, RefPtr<TimingFunction> > >&); | 194 void resolveKeyframes(Element*, const RenderStyle*, const AtomicString& anim
ationName, TimingFunction* defaultTimingFunction, Vector<std::pair<KeyframeAnima
tionEffect::KeyframeVector, RefPtr<TimingFunction> > >&); |
| 198 void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList&)
; | 195 void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList&)
; |
| 199 const StyleRuleKeyframes* matchScopedKeyframesRule(const Element*, const Str
ingImpl* animationName); | 196 const StyleRuleKeyframes* matchScopedKeyframesRule(const Element*, const Str
ingImpl* animationName); |
| 200 PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const
StyleKeyframe*); | 197 PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const
StyleKeyframe*); |
| 201 | 198 |
| 202 PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleReq
uest&, RenderStyle* parentStyle); | 199 PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleReq
uest&, RenderStyle* parentStyle); |
| 203 | 200 |
| 204 PassRefPtr<RenderStyle> styleForPage(int pageIndex); | 201 PassRefPtr<RenderStyle> styleForPage(int pageIndex); |
| 205 PassRefPtr<RenderStyle> defaultStyleForElement(); | 202 PassRefPtr<RenderStyle> defaultStyleForElement(); |
| 206 PassRefPtr<RenderStyle> styleForText(Text*); | 203 PassRefPtr<RenderStyle> styleForText(Text*); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 LowPriorityProperties | 307 LowPriorityProperties |
| 311 }; | 308 }; |
| 312 template <StyleResolver::StyleApplicationPass pass> | 309 template <StyleResolver::StyleApplicationPass pass> |
| 313 static inline bool isPropertyForPass(CSSPropertyID); | 310 static inline bool isPropertyForPass(CSSPropertyID); |
| 314 template <StyleApplicationPass pass> | 311 template <StyleApplicationPass pass> |
| 315 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); | 312 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); |
| 316 template <StyleApplicationPass pass> | 313 template <StyleApplicationPass pass> |
| 317 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = Prop
ertyWhitelistNone); | 314 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = Prop
ertyWhitelistNone); |
| 318 template <StyleApplicationPass pass> | 315 template <StyleApplicationPass pass> |
| 319 bool applyAnimatedProperties(StyleResolverState&, const DocumentTimeline*); | 316 bool applyAnimatedProperties(StyleResolverState&, const DocumentTimeline*); |
| 317 void applyTransitionedProperties(StyleResolverState&); |
| 320 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag
e, const String& pageName); | 318 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag
e, const String& pageName); |
| 321 void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vecto
r<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName); | 319 void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vecto
r<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName); |
| 322 void collectViewportRules(); | 320 void collectViewportRules(); |
| 323 Settings* documentSettings() { return m_document.settings(); } | 321 Settings* documentSettings() { return m_document.settings(); } |
| 324 | 322 |
| 325 bool isLeftPage(int pageIndex) const; | 323 bool isLeftPage(int pageIndex) const; |
| 326 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } | 324 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } |
| 327 bool isFirstPage(int pageIndex) const; | 325 bool isFirstPage(int pageIndex) const; |
| 328 String pageName(int pageIndex) const; | 326 String pageName(int pageIndex) const; |
| 329 | 327 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 PseudoId ignoreDynamicPseudo = NOPSEUDO; | 381 PseudoId ignoreDynamicPseudo = NOPSEUDO; |
| 384 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo,
DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) | 382 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo,
DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) |
| 385 return true; | 383 return true; |
| 386 } | 384 } |
| 387 return false; | 385 return false; |
| 388 } | 386 } |
| 389 | 387 |
| 390 } // namespace WebCore | 388 } // namespace WebCore |
| 391 | 389 |
| 392 #endif // StyleResolver_h | 390 #endif // StyleResolver_h |
| OLD | NEW |