| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 class KeyframeValue; | 56 class KeyframeValue; |
| 57 class MediaQueryEvaluator; | 57 class MediaQueryEvaluator; |
| 58 class MediaQueryResult; | 58 class MediaQueryResult; |
| 59 class RuleData; | 59 class RuleData; |
| 60 class Settings; | 60 class Settings; |
| 61 class StyleKeyframe; | 61 class StyleKeyframe; |
| 62 class StylePropertySet; | 62 class StylePropertySet; |
| 63 class StyleResolverStats; | 63 class StyleResolverStats; |
| 64 class StyleRule; | 64 class StyleRule; |
| 65 class StyleRuleKeyframes; | 65 class StyleRuleKeyframes; |
| 66 class ViewportStyleResolver; | |
| 67 | 66 |
| 68 class MatchResult; | 67 class MatchResult; |
| 69 | 68 |
| 70 enum StyleSharingBehavior { | 69 enum StyleSharingBehavior { |
| 71 AllowStyleSharing, | 70 AllowStyleSharing, |
| 72 DisallowStyleSharing, | 71 DisallowStyleSharing, |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 enum RuleMatchingBehavior { | 74 enum RuleMatchingBehavior { |
| 76 MatchAllRules, | 75 MatchAllRules, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS
SRules, | 138 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS
SRules, |
| 140 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules, | 139 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules, |
| 141 }; | 140 }; |
| 142 PassRefPtrWillBeRawPtr<CSSRuleList> cssRulesForElement(Element*, unsigned ru
lesToInclude = AllButEmptyCSSRules); | 141 PassRefPtrWillBeRawPtr<CSSRuleList> cssRulesForElement(Element*, unsigned ru
lesToInclude = AllButEmptyCSSRules); |
| 143 PassRefPtrWillBeRawPtr<CSSRuleList> pseudoCSSRulesForElement(Element*, Pseud
oId, unsigned rulesToInclude = AllButEmptyCSSRules); | 142 PassRefPtrWillBeRawPtr<CSSRuleList> pseudoCSSRulesForElement(Element*, Pseud
oId, unsigned rulesToInclude = AllButEmptyCSSRules); |
| 144 PassRefPtrWillBeRawPtr<StyleRuleList> styleRulesForElement(Element*, unsigne
d rulesToInclude); | 143 PassRefPtrWillBeRawPtr<StyleRuleList> styleRulesForElement(Element*, unsigne
d rulesToInclude); |
| 145 | 144 |
| 146 // |properties| is an array with |count| elements. | 145 // |properties| is an array with |count| elements. |
| 147 void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count
, RenderStyle*); | 146 void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count
, RenderStyle*); |
| 148 | 147 |
| 149 ViewportStyleResolver* viewportStyleResolver() { return m_viewportStyleResol
ver.get(); } | |
| 150 | |
| 151 void addMediaQueryResults(const MediaQueryResultList&); | 148 void addMediaQueryResults(const MediaQueryResultList&); |
| 152 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp
ortDependentMediaQueryResults; } | 149 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp
ortDependentMediaQueryResults; } |
| 153 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM
ediaQueryResults.isEmpty(); } | 150 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM
ediaQueryResults.isEmpty(); } |
| 154 bool mediaQueryAffectedByViewportChange() const; | 151 bool mediaQueryAffectedByViewportChange() const; |
| 155 | 152 |
| 156 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something
. | 153 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something
. |
| 157 void invalidateMatchedPropertiesCache(); | 154 void invalidateMatchedPropertiesCache(); |
| 158 | 155 |
| 159 void notifyResizeForViewportUnits(); | 156 void notifyResizeForViewportUnits(); |
| 160 | 157 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 static inline bool isPropertyForPass(CSSPropertyID); | 226 static inline bool isPropertyForPass(CSSPropertyID); |
| 230 template <StyleApplicationPass pass> | 227 template <StyleApplicationPass pass> |
| 231 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); | 228 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); |
| 232 template <StyleApplicationPass pass> | 229 template <StyleApplicationPass pass> |
| 233 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly); | 230 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, bool isImportant, bool inheritedOnly); |
| 234 template <StyleApplicationPass pass> | 231 template <StyleApplicationPass pass> |
| 235 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS
SPropertyID, RefPtrWillBeMember<Interpolation> >&); | 232 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS
SPropertyID, RefPtrWillBeMember<Interpolation> >&); |
| 236 template <StyleResolver::StyleApplicationPass pass> | 233 template <StyleResolver::StyleApplicationPass pass> |
| 237 void applyAllProperty(StyleResolverState&, CSSValue*); | 234 void applyAllProperty(StyleResolverState&, CSSValue*); |
| 238 | 235 |
| 239 void collectViewportRules(); | |
| 240 | |
| 241 // FIXME: This likely belongs on RuleSet. | 236 // FIXME: This likely belongs on RuleSet. |
| 242 typedef WillBeHeapHashMap<StringImpl*, RefPtrWillBeMember<StyleRuleKeyframes
> > KeyframesRuleMap; | 237 typedef WillBeHeapHashMap<StringImpl*, RefPtrWillBeMember<StyleRuleKeyframes
> > KeyframesRuleMap; |
| 243 KeyframesRuleMap m_keyframesRuleMap; | 238 KeyframesRuleMap m_keyframesRuleMap; |
| 244 | 239 |
| 245 static RenderStyle* s_styleNotYetAvailable; | 240 static RenderStyle* s_styleNotYetAvailable; |
| 246 | 241 |
| 247 MatchedPropertiesCache m_matchedPropertiesCache; | 242 MatchedPropertiesCache m_matchedPropertiesCache; |
| 248 | 243 |
| 249 OwnPtr<MediaQueryEvaluator> m_medium; | 244 OwnPtr<MediaQueryEvaluator> m_medium; |
| 250 MediaQueryResultList m_viewportDependentMediaQueryResults; | 245 MediaQueryResultList m_viewportDependentMediaQueryResults; |
| 251 | 246 |
| 252 RawPtrWillBeMember<Document> m_document; | 247 RawPtrWillBeMember<Document> m_document; |
| 253 | 248 |
| 254 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; | |
| 255 | |
| 256 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS
heets; | 249 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS
heets; |
| 257 | 250 |
| 258 // FIXME: The entire logic of collecting features on StyleResolver, as well
as transferring them | 251 // FIXME: The entire logic of collecting features on StyleResolver, as well
as transferring them |
| 259 // between various parts of machinery smells wrong. This needs to be better
somehow. | 252 // between various parts of machinery smells wrong. This needs to be better
somehow. |
| 260 RuleFeatureSet m_features; | 253 RuleFeatureSet m_features; |
| 261 OwnPtrWillBeMember<RuleSet> m_attributeRuleSet; | 254 OwnPtrWillBeMember<RuleSet> m_attributeRuleSet; |
| 262 | 255 |
| 263 bool m_needCollectFeatures; | 256 bool m_needCollectFeatures; |
| 264 bool m_printMediaType; | 257 bool m_printMediaType; |
| 265 | 258 |
| 266 StyleResourceLoader m_styleResourceLoader; | 259 StyleResourceLoader m_styleResourceLoader; |
| 267 | 260 |
| 268 unsigned m_styleSharingDepth; | 261 unsigned m_styleSharingDepth; |
| 269 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth>
m_styleSharingLists; | 262 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth>
m_styleSharingLists; |
| 270 | 263 |
| 271 OwnPtr<StyleResolverStats> m_styleResolverStats; | 264 OwnPtr<StyleResolverStats> m_styleResolverStats; |
| 272 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 265 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
| 273 unsigned m_styleResolverStatsSequence; | 266 unsigned m_styleResolverStatsSequence; |
| 274 | 267 |
| 275 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 268 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
| 276 unsigned m_accessCount; | 269 unsigned m_accessCount; |
| 277 }; | 270 }; |
| 278 | 271 |
| 279 } // namespace blink | 272 } // namespace blink |
| 280 | 273 |
| 281 #endif // StyleResolver_h | 274 #endif // StyleResolver_h |
| OLD | NEW |