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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 PassRefPtr<ComputedStyle> styleForKeyframe(Element&, const ComputedStyle&, c
onst ComputedStyle* parentStyle, const StyleRuleKeyframe*, const AtomicString& a
nimationName); | 100 PassRefPtr<ComputedStyle> styleForKeyframe(Element&, const ComputedStyle&, c
onst ComputedStyle* parentStyle, const StyleRuleKeyframe*, const AtomicString& a
nimationName); |
101 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(Element&, const ComputedStyle* baseStyle, CSSPropertyID, CSSValue*); | 101 static AnimatableValue* createAnimatableValueSnapshot(Element&, const Comput
edStyle* baseStyle, CSSPropertyID, CSSValue*); |
102 static PassRefPtrWillBeRawPtr<AnimatableValue> createAnimatableValueSnapshot
(StyleResolverState&, CSSPropertyID, CSSValue*); | 102 static AnimatableValue* createAnimatableValueSnapshot(StyleResolverState&, C
SSPropertyID, CSSValue*); |
103 | 103 |
104 PassRefPtr<ComputedStyle> pseudoStyleForElement(Element*, const PseudoStyleR
equest&, const ComputedStyle* parentStyle); | 104 PassRefPtr<ComputedStyle> pseudoStyleForElement(Element*, const PseudoStyleR
equest&, const ComputedStyle* parentStyle); |
105 | 105 |
106 PassRefPtr<ComputedStyle> styleForPage(int pageIndex); | 106 PassRefPtr<ComputedStyle> styleForPage(int pageIndex); |
107 PassRefPtr<ComputedStyle> styleForText(Text*); | 107 PassRefPtr<ComputedStyle> styleForText(Text*); |
108 | 108 |
109 static PassRefPtr<ComputedStyle> styleForDocument(Document&); | 109 static PassRefPtr<ComputedStyle> styleForDocument(Document&); |
110 | 110 |
111 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. | 111 // FIXME: It could be better to call appendAuthorStyleSheets() directly afte
r we factor StyleResolver further. |
112 // https://bugs.webkit.org/show_bug.cgi?id=108890 | 112 // https://bugs.webkit.org/show_bug.cgi?id=108890 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 220 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
221 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); | 221 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); |
222 void applyCallbackSelectors(StyleResolverState&); | 222 void applyCallbackSelectors(StyleResolverState&); |
223 | 223 |
224 template <CSSPropertyPriority priority> | 224 template <CSSPropertyPriority priority> |
225 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); | 225 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); |
226 template <CSSPropertyPriority priority> | 226 template <CSSPropertyPriority priority> |
227 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis
tNone); | 227 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis
tNone); |
228 template <CSSPropertyPriority priority> | 228 template <CSSPropertyPriority priority> |
229 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<Pr
opertyHandle, RefPtrWillBeMember<Interpolation>>&); | 229 void applyAnimatedProperties(StyleResolverState&, const HeapHashMap<Property
Handle, Member<Interpolation>>&); |
230 template <CSSPropertyPriority priority> | 230 template <CSSPropertyPriority priority> |
231 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly); | 231 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly); |
232 | 232 |
233 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag
e, const String& pageName); | 233 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag
e, const String& pageName); |
234 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage
>>& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage>>&, bo
ol isLeftPage, bool isFirstPage, const String& pageName); | 234 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage
>>& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage>>&, bo
ol isLeftPage, bool isFirstPage, const String& pageName); |
235 void collectViewportRules(); | 235 void collectViewportRules(); |
236 | 236 |
237 bool isLeftPage(int pageIndex) const; | 237 bool isLeftPage(int pageIndex) const; |
238 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } | 238 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } |
239 bool isFirstPage(int pageIndex) const; | 239 bool isFirstPage(int pageIndex) const; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 281 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
282 unsigned m_styleResolverStatsSequence; | 282 unsigned m_styleResolverStatsSequence; |
283 | 283 |
284 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 284 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
285 unsigned m_accessCount; | 285 unsigned m_accessCount; |
286 }; | 286 }; |
287 | 287 |
288 } // namespace blink | 288 } // namespace blink |
289 | 289 |
290 #endif // StyleResolver_h | 290 #endif // StyleResolver_h |
OLD | NEW |