| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 return m_features; | 190 return m_features; |
| 191 } | 191 } |
| 192 | 192 |
| 193 StyleSharingList& styleSharingList(); | 193 StyleSharingList& styleSharingList(); |
| 194 | 194 |
| 195 bool hasRulesForId(const AtomicString&) const; | 195 bool hasRulesForId(const AtomicString&) const; |
| 196 | 196 |
| 197 void addToStyleSharingList(Element&); | 197 void addToStyleSharingList(Element&); |
| 198 void clearStyleSharingList(); | 198 void clearStyleSharingList(); |
| 199 | 199 |
| 200 // FIXME: These should be either generated or moved to CascadedValues |
| 201 static bool isValidFirstLetterStyleProperty(CSSPropertyID); |
| 202 static bool isValidCueStyleProperty(CSSPropertyID); |
| 203 |
| 200 StyleResolverStats* stats() { return m_styleResolverStats.get(); } | 204 StyleResolverStats* stats() { return m_styleResolverStats.get(); } |
| 201 StyleResolverStats* statsTotals() { return m_styleResolverStatsTotals.get();
} | 205 StyleResolverStats* statsTotals() { return m_styleResolverStatsTotals.get();
} |
| 202 enum StatsReportType { ReportDefaultStats, ReportSlowStats }; | 206 enum StatsReportType { ReportDefaultStats, ReportSlowStats }; |
| 203 void enableStats(StatsReportType = ReportDefaultStats); | 207 void enableStats(StatsReportType = ReportDefaultStats); |
| 204 void disableStats(); | 208 void disableStats(); |
| 205 void printStats(); | 209 void printStats(); |
| 206 | 210 |
| 207 unsigned accessCount() const { return m_accessCount; } | 211 unsigned accessCount() const { return m_accessCount; } |
| 208 void didAccess() { ++m_accessCount; } | 212 void didAccess() { ++m_accessCount; } |
| 209 | 213 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 245 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
| 242 bool applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; | 246 bool applyAnimatedProperties(StyleResolverState&, Element* animatingElement)
; |
| 243 | 247 |
| 244 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember
<ScopedStyleResolver>, 8>&); | 248 void resolveScopedStyles(const Element*, WillBeHeapVector<RawPtrWillBeMember
<ScopedStyleResolver>, 8>&); |
| 245 void collectScopedResolversForHostedShadowTrees(const Element*, WillBeHeapVe
ctor<RawPtrWillBeMember<ScopedStyleResolver>, 8>&); | 249 void collectScopedResolversForHostedShadowTrees(const Element*, WillBeHeapVe
ctor<RawPtrWillBeMember<ScopedStyleResolver>, 8>&); |
| 246 | 250 |
| 247 enum StyleApplicationPass { | 251 enum StyleApplicationPass { |
| 248 HighPriorityProperties, | 252 HighPriorityProperties, |
| 249 LowPriorityProperties | 253 LowPriorityProperties |
| 250 }; | 254 }; |
| 251 template <StyleResolver::StyleApplicationPass pass> | 255 template <StyleApplicationPass pass> |
| 252 static inline CSSPropertyID firstCSSPropertyId(); | 256 static inline CSSPropertyID firstCSSPropertyId(); |
| 253 template <StyleResolver::StyleApplicationPass pass> | 257 template <StyleApplicationPass pass> |
| 254 static inline CSSPropertyID lastCSSPropertyId(); | 258 static inline CSSPropertyID lastCSSPropertyId(); |
| 255 template <StyleResolver::StyleApplicationPass pass> | 259 template <StyleApplicationPass pass> |
| 256 static inline bool isPropertyForPass(CSSPropertyID); | 260 static inline bool isPropertyForPass(CSSPropertyID); |
| 257 template <StyleApplicationPass pass> | 261 |
| 258 void applyMatchedProperties(StyleResolverState&, const MatchResult&, bool im
portant, int startIndex, int endIndex, bool inheritedOnly); | |
| 259 template <StyleApplicationPass pass> | |
| 260 void applyProperties(StyleResolverState&, const StylePropertySet* properties
, StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = Prop
ertyWhitelistNone); | |
| 261 template <StyleApplicationPass pass> | 262 template <StyleApplicationPass pass> |
| 262 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS
SPropertyID, RefPtrWillBeMember<Interpolation> >&); | 263 void applyAnimatedProperties(StyleResolverState&, const WillBeHeapHashMap<CS
SPropertyID, RefPtrWillBeMember<Interpolation> >&); |
| 263 template <StyleResolver::StyleApplicationPass pass> | |
| 264 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; |
| 271 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } | 270 bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); } |
| 272 bool isFirstPage(int pageIndex) const; | 271 bool isFirstPage(int pageIndex) const; |
| 273 String pageName(int pageIndex) const; | 272 String pageName(int pageIndex) const; |
| 274 | 273 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 314 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
| 316 unsigned m_styleResolverStatsSequence; | 315 unsigned m_styleResolverStatsSequence; |
| 317 | 316 |
| 318 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 317 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
| 319 unsigned m_accessCount; | 318 unsigned m_accessCount; |
| 320 }; | 319 }; |
| 321 | 320 |
| 322 } // namespace blink | 321 } // namespace blink |
| 323 | 322 |
| 324 #endif // StyleResolver_h | 323 #endif // StyleResolver_h |
| OLD | NEW |