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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // FIXME: StyleResolver should not be keeping tree-walk state. | 90 // FIXME: StyleResolver should not be keeping tree-walk state. |
91 // These should move to some global tree-walk state, or should be contained
in a | 91 // These should move to some global tree-walk state, or should be contained
in a |
92 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. | 92 // TreeWalkContext or similar which is passed in to StyleResolver methods wh
en available. |
93 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. | 93 // Using these during tree walk will allow style selector to optimize child
and descendant selector lookups. |
94 void pushParentElement(Element&); | 94 void pushParentElement(Element&); |
95 void popParentElement(Element&); | 95 void popParentElement(Element&); |
96 | 96 |
97 PassRefPtr<ComputedStyle> styleForElement(Element*, const ComputedStyle* par
entStyle = 0, StyleSharingBehavior = AllowStyleSharing, | 97 PassRefPtr<ComputedStyle> styleForElement(Element*, const ComputedStyle* par
entStyle = 0, StyleSharingBehavior = AllowStyleSharing, |
98 RuleMatchingBehavior = MatchAllRules); | 98 RuleMatchingBehavior = MatchAllRules); |
99 | 99 |
100 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(Element&, const ComputedStyle* baseStyle, CSSPropertyID, CSSValue*); | 100 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(Element&, const ComputedStyle* baseStyle, CSSPropertyID, NullableCSSValue); |
101 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(StyleResolverState&, CSSPropertyID, CSSValue*); | 101 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(StyleResolverState&, CSSPropertyID, NullableCSSValue); |
102 | 102 |
103 PassRefPtr<ComputedStyle> pseudoStyleForElement(Element*, const PseudoStyleR
equest&, const ComputedStyle* parentStyle); | 103 PassRefPtr<ComputedStyle> pseudoStyleForElement(Element*, const PseudoStyleR
equest&, const ComputedStyle* parentStyle); |
104 | 104 |
105 PassRefPtr<ComputedStyle> styleForPage(int pageIndex); | 105 PassRefPtr<ComputedStyle> styleForPage(int pageIndex); |
106 PassRefPtr<ComputedStyle> styleForText(Text*); | 106 PassRefPtr<ComputedStyle> styleForText(Text*); |
107 | 107 |
108 static PassRefPtr<ComputedStyle> styleForDocument(Document&); | 108 static PassRefPtr<ComputedStyle> styleForDocument(Document&); |
109 | 109 |
110 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. | 110 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. |
111 // https://bugs.webkit.org/show_bug.cgi?id=108890 | 111 // https://bugs.webkit.org/show_bug.cgi?id=108890 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); | 216 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); |
217 void applyCallbackSelectors(StyleResolverState&); | 217 void applyCallbackSelectors(StyleResolverState&); |
218 | 218 |
219 template <CSSPropertyPriority priority> | 219 template <CSSPropertyPriority priority> |
220 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, unsigned startIndex, unsigned endIndex, bool inheritedOnly); | 220 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, unsigned startIndex, unsigned endIndex, bool inheritedOnly); |
221 template <CSSPropertyPriority priority> | 221 template <CSSPropertyPriority priority> |
222 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis
tNone); | 222 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis
tNone); |
223 template <CSSPropertyPriority priority> | 223 template <CSSPropertyPriority priority> |
224 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<Pr
opertyHandle, RefPtrWillBeMember<Interpolation>>&); | 224 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<Pr
opertyHandle, RefPtrWillBeMember<Interpolation>>&); |
225 template <CSSPropertyPriority priority> | 225 template <CSSPropertyPriority priority> |
226 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly); | 226 void applyAllProperty(StyleResolverState&, CSSValue, bool inheritedOnly); |
227 | 227 |
228 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag
e, const String& pageName); | 228 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag
e, const String& pageName); |
229 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage
>>& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage>>&, bo
ol isLeftPage, bool isFirstPage, const String& pageName); | 229 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage
>>& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage>>&, bo
ol isLeftPage, bool isFirstPage, const String& pageName); |
230 void collectViewportRules(); | 230 void collectViewportRules(); |
231 | 231 |
232 // FIXME: These functions appear to be unused, and previously isLeftPage lac
ked an implementaion. | 232 // FIXME: These functions appear to be unused, and previously isLeftPage lac
ked an implementaion. |
233 // They should be removed unless there are plans to use them in the near fut
ure. | 233 // They should be removed unless there are plans to use them in the near fut
ure. |
234 bool isLeftPage(int pageIndex) const { return false; } | 234 bool isLeftPage(int pageIndex) const { return false; } |
235 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } | 235 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } |
236 bool isFirstPage(int pageIndex) const; | 236 bool isFirstPage(int pageIndex) const; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 OwnPtr<StyleResolverStats> m_styleResolverStats; | 277 OwnPtr<StyleResolverStats> m_styleResolverStats; |
278 | 278 |
279 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 279 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
280 unsigned m_accessCount; | 280 unsigned m_accessCount; |
281 }; | 281 }; |
282 | 282 |
283 } // namespace blink | 283 } // namespace blink |
284 | 284 |
285 #endif // StyleResolver_h | 285 #endif // StyleResolver_h |
OLD | NEW |