Chromium Code Reviews| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 void adjustRenderStyle(StyleResolverState&, Element*); | 224 void adjustRenderStyle(StyleResolverState&, Element*); |
| 225 | 225 |
| 226 void appendCSSStyleSheet(CSSStyleSheet*); | 226 void appendCSSStyleSheet(CSSStyleSheet*); |
| 227 | 227 |
| 228 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId, unsigned rulesToInclude); | 228 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId, unsigned rulesToInclude); |
| 229 void matchUARules(ElementRuleCollector&, RuleSet*); | 229 void matchUARules(ElementRuleCollector&, RuleSet*); |
| 230 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule s); | 230 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule s); |
| 231 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers InShadowTree); | 231 void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool inc ludeEmptyRules, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& re solvers, WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8>& resolvers InShadowTree); |
| 232 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS MILProperties); | 232 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS MILProperties); |
| 233 void matchUARules(ElementRuleCollector&); | 233 void matchUARules(ElementRuleCollector&); |
| 234 // FIXME: watched selectors should be implemented using injected author styl esheets: http://crbug.com/316960 | |
| 235 void matchWatchSelectorRules(ElementRuleCollector&); | |
| 236 void collectFeatures(); | 234 void collectFeatures(); |
| 237 void resetRuleFeatures(); | 235 void resetRuleFeatures(); |
| 238 | 236 |
| 239 bool fastRejectSelector(const RuleData&) const; | 237 bool fastRejectSelector(const RuleData&) const; |
| 240 | 238 |
| 241 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 239 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
| 242 bool applyAnimatedProperties(StyleResolverState&, Element* animatingElement) ; | 240 bool applyAnimatedProperties(StyleResolverState&, Element* animatingElement) ; |
| 241 void applyCallbackSelectors(StyleResolverState&); | |
| 243 | 242 |
| 244 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember <ScopedStyleResolver>, 8>&); | 243 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember <ScopedStyleResolver>, 8>&); |
| 245 void collectScopedResolversForHostedShadowTrees(const Element*, WillBeHeapVe ctor<RawPtrWillBeMember<ScopedStyleResolver>, 8>&); | 244 void collectScopedResolversForHostedShadowTrees(const Element*, WillBeHeapVe ctor<RawPtrWillBeMember<ScopedStyleResolver>, 8>&); |
| 246 | 245 |
| 247 enum StyleApplicationPass { | 246 enum StyleApplicationPass { |
| 248 HighPriorityProperties, | 247 HighPriorityProperties, |
| 249 LowPriorityProperties | 248 LowPriorityProperties |
| 250 }; | 249 }; |
| 251 template <StyleResolver::StyleApplicationPass pass> | 250 template <StyleResolver::StyleApplicationPass pass> |
| 252 static inline CSSPropertyID firstCSSPropertyId(); | 251 static inline CSSPropertyID firstCSSPropertyId(); |
| 253 template <StyleResolver::StyleApplicationPass pass> | 252 template <StyleResolver::StyleApplicationPass pass> |
| 254 static inline CSSPropertyID lastCSSPropertyId(); | 253 static inline CSSPropertyID lastCSSPropertyId(); |
| 255 template <StyleResolver::StyleApplicationPass pass> | 254 template <StyleResolver::StyleApplicationPass pass> |
| 256 static inline bool isPropertyForPass(CSSPropertyID); | 255 static inline bool isPropertyForPass(CSSPropertyID); |
| 257 template <StyleApplicationPass pass> | 256 template <StyleApplicationPass pass> |
| 258 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im portant, int startIndex, int endIndex, bool inheritedOnly); | 257 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im portant, int startIndex, int endIndex, bool inheritedOnly); |
| 259 template <StyleApplicationPass pass> | 258 template <StyleApplicationPass pass> |
| 260 void applyProperties(StyleResolverState&, const StylePropertySet* properties , StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = Prop ertyWhitelistNone); | 259 void applyProperties(StyleResolverState&, const StylePropertySet* properties , bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelis tNone); |
| 261 template <StyleApplicationPass pass> | 260 template <StyleApplicationPass pass> |
| 262 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS SPropertyID, RefPtrWillBeMember<Interpolation> >&); | 261 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS SPropertyID, RefPtrWillBeMember<Interpolation> >&); |
| 263 template <StyleResolver::StyleApplicationPass pass> | 262 template <StyleResolver::StyleApplicationPass pass> |
| 264 void applyAllProperty(StyleResolverState&, CSSValue*); | 263 void applyAllProperty(StyleResolverState&, CSSValue*); |
| 265 | 264 |
| 266 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag e, const String& pageName); | 265 void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPag e, const String& pageName); |
| 267 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage > >& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage> >&, bool isLeftPage, bool isFirstPage, const String& pageName); | 266 void matchPageRulesForList(WillBeHeapVector<RawPtrWillBeMember<StyleRulePage > >& matchedRules, const WillBeHeapVector<RawPtrWillBeMember<StyleRulePage> >&, bool isLeftPage, bool isFirstPage, const String& pageName); |
| 268 void collectViewportRules(); | 267 void collectViewportRules(); |
| 269 | 268 |
| 270 bool isLeftPage(int pageIndex) const; | 269 bool isLeftPage(int pageIndex) const; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 292 | 291 |
| 293 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; | 292 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; |
| 294 | 293 |
| 295 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS heets; | 294 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS heets; |
| 296 | 295 |
| 297 // FIXME: The entire logic of collecting features on StyleResolver, as well as transferring them | 296 // FIXME: The entire logic of collecting features on StyleResolver, as well as transferring them |
| 298 // between various parts of machinery smells wrong. This needs to be better somehow. | 297 // between various parts of machinery smells wrong. This needs to be better somehow. |
| 299 RuleFeatureSet m_features; | 298 RuleFeatureSet m_features; |
| 300 OwnPtrWillBeMember<RuleSet> m_siblingRuleSet; | 299 OwnPtrWillBeMember<RuleSet> m_siblingRuleSet; |
| 301 OwnPtrWillBeMember<RuleSet> m_uncommonAttributeRuleSet; | 300 OwnPtrWillBeMember<RuleSet> m_uncommonAttributeRuleSet; |
| 302 | |
| 303 // FIXME: watched selectors should be implemented using injected author styl esheets: http://crbug.com/316960 | |
|
rune
2014/08/14 19:50:31
Add BUG=316960 to the description so that the comm
Timothy Loh
2014/08/15 09:40:39
Done.
| |
| 304 OwnPtrWillBeMember<RuleSet> m_watchedSelectorsRules; | 301 OwnPtrWillBeMember<RuleSet> m_watchedSelectorsRules; |
| 305 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; | 302 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; |
| 306 | 303 |
| 307 bool m_needCollectFeatures; | 304 bool m_needCollectFeatures; |
| 308 bool m_printMediaType; | 305 bool m_printMediaType; |
| 309 | 306 |
| 310 StyleResourceLoader m_styleResourceLoader; | 307 StyleResourceLoader m_styleResourceLoader; |
| 311 | 308 |
| 312 unsigned m_styleSharingDepth; | 309 unsigned m_styleSharingDepth; |
| 313 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth> m_styleSharingLists; | 310 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth> m_styleSharingLists; |
| 314 | 311 |
| 315 OwnPtr<StyleResolverStats> m_styleResolverStats; | 312 OwnPtr<StyleResolverStats> m_styleResolverStats; |
| 316 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 313 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
| 317 unsigned m_styleResolverStatsSequence; | 314 unsigned m_styleResolverStatsSequence; |
| 318 | 315 |
| 319 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 316 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
| 320 unsigned m_accessCount; | 317 unsigned m_accessCount; |
| 321 }; | 318 }; |
| 322 | 319 |
| 323 } // namespace blink | 320 } // namespace blink |
| 324 | 321 |
| 325 #endif // StyleResolver_h | 322 #endif // StyleResolver_h |
| OLD | NEW |