| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/css/RuleFeature.h" | 29 #include "core/css/RuleFeature.h" |
| 30 #include "core/css/RuleSet.h" | 30 #include "core/css/RuleSet.h" |
| 31 #include "core/css/SelectorChecker.h" | 31 #include "core/css/SelectorChecker.h" |
| 32 #include "core/css/SelectorFilter.h" | 32 #include "core/css/SelectorFilter.h" |
| 33 #include "core/css/TreeBoundaryCrossingRules.h" | 33 #include "core/css/TreeBoundaryCrossingRules.h" |
| 34 #include "core/css/resolver/CSSPropertyPriority.h" | 34 #include "core/css/resolver/CSSPropertyPriority.h" |
| 35 #include "core/css/resolver/MatchedPropertiesCache.h" | 35 #include "core/css/resolver/MatchedPropertiesCache.h" |
| 36 #include "core/css/resolver/StyleBuilder.h" | 36 #include "core/css/resolver/StyleBuilder.h" |
| 37 #include "core/css/resolver/StyleResolverStats.h" | 37 #include "core/css/resolver/StyleResolverStats.h" |
| 38 #include "core/css/resolver/StyleResourceLoader.h" | 38 #include "core/css/resolver/StyleResourceLoader.h" |
| 39 #include "core/style/AuthorStyleInfo.h" |
| 39 #include "core/style/CachedUAStyle.h" | 40 #include "core/style/CachedUAStyle.h" |
| 40 #include "platform/heap/Handle.h" | 41 #include "platform/heap/Handle.h" |
| 41 #include "wtf/Deque.h" | 42 #include "wtf/Deque.h" |
| 42 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
| 43 #include "wtf/HashSet.h" | 44 #include "wtf/HashSet.h" |
| 44 #include "wtf/ListHashSet.h" | 45 #include "wtf/ListHashSet.h" |
| 45 #include "wtf/RefPtr.h" | 46 #include "wtf/RefPtr.h" |
| 46 #include "wtf/Vector.h" | 47 #include "wtf/Vector.h" |
| 47 | 48 |
| 48 namespace blink { | 49 namespace blink { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void addTreeBoundaryCrossingScope(ContainerNode& scope); | 184 void addTreeBoundaryCrossingScope(ContainerNode& scope); |
| 184 | 185 |
| 185 private: | 186 private: |
| 186 PassRefPtr<ComputedStyle> initialStyleForElement(); | 187 PassRefPtr<ComputedStyle> initialStyleForElement(); |
| 187 | 188 |
| 188 void initWatchedSelectorRules(); | 189 void initWatchedSelectorRules(); |
| 189 | 190 |
| 190 // FIXME: This should probably go away, folded into FontBuilder. | 191 // FIXME: This should probably go away, folded into FontBuilder. |
| 191 void updateFont(StyleResolverState&); | 192 void updateFont(StyleResolverState&); |
| 192 | 193 |
| 194 static AuthorStyleInfo authorStyleInfo(StyleResolverState&); |
| 195 |
| 193 void loadPendingResources(StyleResolverState&); | 196 void loadPendingResources(StyleResolverState&); |
| 194 void adjustComputedStyle(StyleResolverState&, Element*); | 197 void adjustComputedStyle(StyleResolverState&, Element*); |
| 195 | 198 |
| 196 void appendCSSStyleSheet(CSSStyleSheet&); | 199 void appendCSSStyleSheet(CSSStyleSheet&); |
| 197 | 200 |
| 198 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); | 201 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); |
| 199 void matchRuleSet(ElementRuleCollector&, RuleSet*); | 202 void matchRuleSet(ElementRuleCollector&, RuleSet*); |
| 200 void matchUARules(ElementRuleCollector&); | 203 void matchUARules(ElementRuleCollector&); |
| 201 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); | 204 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); |
| 202 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); | 205 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); |
| 203 void collectFeatures(); | 206 void collectFeatures(); |
| 204 void resetRuleFeatures(); | 207 void resetRuleFeatures(); |
| 205 | 208 |
| 206 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 209 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
| 207 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); | 210 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); |
| 208 void applyCallbackSelectors(StyleResolverState&); | 211 void applyCallbackSelectors(StyleResolverState&); |
| 209 | 212 |
| 210 template <CSSPropertyPriority priority> | 213 template <CSSPropertyPriority priority> |
| 211 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, unsigned startIndex, unsigned endIndex, bool inheritedOnly); | 214 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, unsigned startIndex, unsigned endIndex, bool inheritedOnly); |
| 212 template <CSSPropertyPriority priority> | 215 template <CSSPropertyPriority priority> |
| 213 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); |
| 214 template <CSSPropertyPriority priority> | 217 template <CSSPropertyPriority priority> |
| 215 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<Pr
opertyHandle, RefPtrWillBeMember<Interpolation>>&); | 218 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<Pr
opertyHandle, RefPtrWillBeMember<Interpolation>>&); |
| 216 template <CSSPropertyPriority priority> | 219 template <CSSPropertyPriority priority> |
| 217 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly); | 220 void applyAllProperty(StyleResolverState&, CSSValue*, bool inheritedOnly); |
| 218 | 221 |
| 219 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons
t ComputedStyle* parentStyle, StyleResolverState&); | 222 bool pseudoStyleForElementInternal(Element&, const PseudoStyleRequest&, cons
t ComputedStyle* parentStyle, StyleResolverState&); |
| 220 bool hasAuthorBackground(const StyleResolverState&); | |
| 221 bool hasAuthorBorder(const StyleResolverState&); | |
| 222 | 223 |
| 223 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P
seudoId); | 224 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElement(Element* parent, P
seudoId); |
| 224 | 225 |
| 225 Document& document() { return *m_document; } | 226 Document& document() { return *m_document; } |
| 226 | 227 |
| 227 static ComputedStyle* s_styleNotYetAvailable; | 228 static ComputedStyle* s_styleNotYetAvailable; |
| 228 | 229 |
| 229 MatchedPropertiesCache m_matchedPropertiesCache; | 230 MatchedPropertiesCache m_matchedPropertiesCache; |
| 230 | 231 |
| 231 OwnPtr<MediaQueryEvaluator> m_medium; | 232 OwnPtr<MediaQueryEvaluator> m_medium; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 256 | 257 |
| 257 OwnPtr<StyleResolverStats> m_styleResolverStats; | 258 OwnPtr<StyleResolverStats> m_styleResolverStats; |
| 258 | 259 |
| 259 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 260 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
| 260 unsigned m_accessCount; | 261 unsigned m_accessCount; |
| 261 }; | 262 }; |
| 262 | 263 |
| 263 } // namespace blink | 264 } // namespace blink |
| 264 | 265 |
| 265 #endif // StyleResolver_h | 266 #endif // StyleResolver_h |
| OLD | NEW |