| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // FIXME: StyleResolver should not be keeping tree-walk state. | 86 // FIXME: StyleResolver should not be keeping tree-walk state. |
| 87 // These should move to some global tree-walk state, or should be contained
in a | 87 // These should move to some global tree-walk state, or should be contained
in a |
| 88 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. | 88 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. |
| 89 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. | 89 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. |
| 90 void pushParentElement(Element&); | 90 void pushParentElement(Element&); |
| 91 void popParentElement(Element&); | 91 void popParentElement(Element&); |
| 92 | 92 |
| 93 PassRefPtr<ComputedStyle> styleForElement(Element*, const ComputedStyle* par
entStyle = 0, StyleSharingBehavior = AllowStyleSharing, | 93 PassRefPtr<ComputedStyle> styleForElement(Element*, const ComputedStyle* par
entStyle = 0, StyleSharingBehavior = AllowStyleSharing, |
| 94 RuleMatchingBehavior = MatchAllRules); | 94 RuleMatchingBehavior = MatchAllRules); |
| 95 | 95 |
| 96 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(Element&, const ComputedStyle* baseStyle, CSSPropertyID, CSSValue*); | 96 static PassRefPtr<AnimatableValue> createAnimatableValueSnapshot(Element&, c
onst ComputedStyle* baseStyle, CSSPropertyID, CSSValue*); |
| 97 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(StyleResolverState&, CSSPropertyID, CSSValue*); | 97 static PassRefPtr<AnimatableValue> createAnimatableValueSnapshot(StyleResolv
erState&, CSSPropertyID, CSSValue*); |
| 98 | 98 |
| 99 PassRefPtr<ComputedStyle> pseudoStyleForElement(Element*, const PseudoStyleR
equest&, const ComputedStyle* parentStyle); | 99 PassRefPtr<ComputedStyle> pseudoStyleForElement(Element*, const PseudoStyleR
equest&, const ComputedStyle* parentStyle); |
| 100 | 100 |
| 101 PassRefPtr<ComputedStyle> styleForPage(int pageIndex); | 101 PassRefPtr<ComputedStyle> styleForPage(int pageIndex); |
| 102 PassRefPtr<ComputedStyle> styleForText(Text*); | 102 PassRefPtr<ComputedStyle> styleForText(Text*); |
| 103 | 103 |
| 104 static PassRefPtr<ComputedStyle> styleForDocument(Document&); | 104 static PassRefPtr<ComputedStyle> styleForDocument(Document&); |
| 105 | 105 |
| 106 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. | 106 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. |
| 107 // https://bugs.webkit.org/show_bug.cgi?id=108890 | 107 // https://bugs.webkit.org/show_bug.cgi?id=108890 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 209 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
| 210 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); | 210 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); |
| 211 void applyCallbackSelectors(StyleResolverState&); | 211 void applyCallbackSelectors(StyleResolverState&); |
| 212 | 212 |
| 213 template <CSSPropertyPriority priority> | 213 template <CSSPropertyPriority priority> |
| 214 void applyMatchedProperties(StyleResolverState&, const MatchedPropertiesRang
e&, bool important, bool inheritedOnly); | 214 void applyMatchedProperties(StyleResolverState&, const MatchedPropertiesRang
e&, bool important, bool inheritedOnly); |
| 215 template <CSSPropertyPriority priority> | 215 template <CSSPropertyPriority priority> |
| 216 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis
tNone); | 216 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis
tNone); |
| 217 template <CSSPropertyPriority priority> | 217 template <CSSPropertyPriority priority> |
| 218 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<Pr
opertyHandle, RefPtrWillBeMember<Interpolation>>&); | 218 void applyAnimatedProperties(StyleResolverState&, const HashMap<PropertyHand
le, RefPtr<Interpolation>>&); |
| 219 template <CSSPropertyPriority priority> | 219 template <CSSPropertyPriority priority> |
| 220 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly, Pr
opertyWhitelistType); | 220 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly, Pr
opertyWhitelistType); |
| 221 | 221 |
| 222 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons
t ComputedStyle* parentStyle, StyleResolverState&); | 222 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons
t ComputedStyle* parentStyle, StyleResolverState&); |
| 223 bool hasAuthorBackground(const StyleResolverState&); | 223 bool hasAuthorBackground(const StyleResolverState&); |
| 224 bool hasAuthorBorder(const StyleResolverState&); | 224 bool hasAuthorBorder(const StyleResolverState&); |
| 225 | 225 |
| 226 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P
seudoId); | 226 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P
seudoId); |
| 227 | 227 |
| 228 Document& document() { return *m_document; } | 228 Document& document() { return *m_document; } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 259 | 259 |
| 260 OwnPtr<StyleResolverStats> m_styleResolverStats; | 260 OwnPtr<StyleResolverStats> m_styleResolverStats; |
| 261 | 261 |
| 262 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 262 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
| 263 unsigned m_accessCount; | 263 unsigned m_accessCount; |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| 267 | 267 |
| 268 #endif // StyleResolver_h | 268 #endif // StyleResolver_h |
| OLD | NEW |