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 12 matching lines...) Expand all Loading... |
23 #define StyleResolver_h | 23 #define StyleResolver_h |
24 | 24 |
25 #include "core/CoreExport.h" | 25 #include "core/CoreExport.h" |
26 #include "core/animation/PropertyHandle.h" | 26 #include "core/animation/PropertyHandle.h" |
27 #include "core/css/ElementRuleCollector.h" | 27 #include "core/css/ElementRuleCollector.h" |
28 #include "core/css/PseudoStyleRequest.h" | 28 #include "core/css/PseudoStyleRequest.h" |
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" | |
34 #include "core/css/resolver/CSSPropertyPriority.h" | 33 #include "core/css/resolver/CSSPropertyPriority.h" |
35 #include "core/css/resolver/MatchedPropertiesCache.h" | 34 #include "core/css/resolver/MatchedPropertiesCache.h" |
36 #include "core/css/resolver/StyleBuilder.h" | 35 #include "core/css/resolver/StyleBuilder.h" |
37 #include "core/css/resolver/StyleResolverStats.h" | 36 #include "core/css/resolver/StyleResolverStats.h" |
38 #include "core/css/resolver/StyleResourceLoader.h" | 37 #include "core/css/resolver/StyleResourceLoader.h" |
| 38 #include "core/dom/DocumentOrderedList.h" |
39 #include "core/style/AuthorStyleInfo.h" | 39 #include "core/style/AuthorStyleInfo.h" |
40 #include "core/style/CachedUAStyle.h" | 40 #include "core/style/CachedUAStyle.h" |
41 #include "platform/heap/Handle.h" | 41 #include "platform/heap/Handle.h" |
42 #include "wtf/Deque.h" | 42 #include "wtf/Deque.h" |
43 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
44 #include "wtf/HashSet.h" | 44 #include "wtf/HashSet.h" |
45 #include "wtf/ListHashSet.h" | 45 #include "wtf/ListHashSet.h" |
46 #include "wtf/RefPtr.h" | 46 #include "wtf/RefPtr.h" |
47 #include "wtf/Vector.h" | 47 #include "wtf/Vector.h" |
48 | 48 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 static AuthorStyleInfo authorStyleInfo(StyleResolverState&); | 194 static AuthorStyleInfo authorStyleInfo(StyleResolverState&); |
195 | 195 |
196 void loadPendingResources(StyleResolverState&); | 196 void loadPendingResources(StyleResolverState&); |
197 void adjustComputedStyle(StyleResolverState&, Element*); | 197 void adjustComputedStyle(StyleResolverState&, Element*); |
198 | 198 |
199 void appendCSSStyleSheet(CSSStyleSheet&); | 199 void appendCSSStyleSheet(CSSStyleSheet&); |
200 | 200 |
201 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); | 201 void collectPseudoRulesForElement(Element*, ElementRuleCollector&, PseudoId,
unsigned rulesToInclude); |
202 void matchRuleSet(ElementRuleCollector&, RuleSet*); | 202 void matchRuleSet(ElementRuleCollector&, RuleSet*); |
203 void matchUARules(ElementRuleCollector&); | 203 void matchUARules(ElementRuleCollector&); |
204 void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRule
s); | 204 void matchAuthorRules(const Element&, ElementRuleCollector&, bool includeEmp
tyRules); |
| 205 void matchHostRules(const Element&, ElementRuleCollector&, bool includeEmpty
Rules); |
| 206 void matchElementScopeRules(ScopedStyleResolver&, ElementRuleCollector&, boo
l includeEmptyRules); |
| 207 void matchScopedRules(const Element&, ElementRuleCollector&, bool includeEmp
tyRules); |
205 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); | 208 void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeS
MILProperties); |
206 void collectFeatures(); | 209 void collectFeatures(); |
207 void resetRuleFeatures(); | 210 void resetRuleFeatures(); |
208 | 211 |
209 void applyMatchedProperties(StyleResolverState&, const MatchResult&); | 212 void applyMatchedProperties(StyleResolverState&, const MatchResult&); |
210 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); | 213 bool applyAnimatedProperties(StyleResolverState&, const Element* animatingEl
ement); |
211 void applyCallbackSelectors(StyleResolverState&); | 214 void applyCallbackSelectors(StyleResolverState&); |
212 | 215 |
213 template <CSSPropertyPriority priority> | 216 template <CSSPropertyPriority priority> |
214 void applyMatchedProperties(StyleResolverState&, const MatchedPropertiesRang
e&, bool important, bool inheritedOnly); | 217 void applyMatchedProperties(StyleResolverState&, const MatchedPropertiesRang
e&, bool important, bool inheritedOnly); |
(...skipping 23 matching lines...) Expand all Loading... |
238 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; | 241 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; |
239 | 242 |
240 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS
heets; | 243 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS
heets; |
241 | 244 |
242 // FIXME: The entire logic of collecting features on StyleResolver, as well
as transferring them | 245 // FIXME: The entire logic of collecting features on StyleResolver, as well
as transferring them |
243 // between various parts of machinery smells wrong. This needs to be better
somehow. | 246 // between various parts of machinery smells wrong. This needs to be better
somehow. |
244 RuleFeatureSet m_features; | 247 RuleFeatureSet m_features; |
245 OwnPtrWillBeMember<RuleSet> m_siblingRuleSet; | 248 OwnPtrWillBeMember<RuleSet> m_siblingRuleSet; |
246 OwnPtrWillBeMember<RuleSet> m_uncommonAttributeRuleSet; | 249 OwnPtrWillBeMember<RuleSet> m_uncommonAttributeRuleSet; |
247 OwnPtrWillBeMember<RuleSet> m_watchedSelectorsRules; | 250 OwnPtrWillBeMember<RuleSet> m_watchedSelectorsRules; |
248 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; | 251 DocumentOrderedList m_treeBoundaryCrossingScopes; |
249 | 252 |
250 bool m_needCollectFeatures; | 253 bool m_needCollectFeatures; |
251 bool m_printMediaType; | 254 bool m_printMediaType; |
252 | 255 |
253 StyleResourceLoader m_styleResourceLoader; | 256 StyleResourceLoader m_styleResourceLoader; |
254 | 257 |
255 unsigned m_styleSharingDepth; | 258 unsigned m_styleSharingDepth; |
256 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth>
m_styleSharingLists; | 259 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth>
m_styleSharingLists; |
257 | 260 |
258 OwnPtr<StyleResolverStats> m_styleResolverStats; | 261 OwnPtr<StyleResolverStats> m_styleResolverStats; |
259 | 262 |
260 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 263 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
261 unsigned m_accessCount; | 264 unsigned m_accessCount; |
262 }; | 265 }; |
263 | 266 |
264 } // namespace blink | 267 } // namespace blink |
265 | 268 |
266 #endif // StyleResolver_h | 269 #endif // StyleResolver_h |
OLD | NEW |