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 11 matching lines...) Expand all Loading... |
22 #ifndef StyleResolver_h | 22 #ifndef StyleResolver_h |
23 #define StyleResolver_h | 23 #define StyleResolver_h |
24 | 24 |
25 #include "core/animation/PropertyHandle.h" | 25 #include "core/animation/PropertyHandle.h" |
26 #include "core/css/ElementRuleCollector.h" | 26 #include "core/css/ElementRuleCollector.h" |
27 #include "core/css/PseudoStyleRequest.h" | 27 #include "core/css/PseudoStyleRequest.h" |
28 #include "core/css/RuleFeature.h" | 28 #include "core/css/RuleFeature.h" |
29 #include "core/css/RuleSet.h" | 29 #include "core/css/RuleSet.h" |
30 #include "core/css/SelectorChecker.h" | 30 #include "core/css/SelectorChecker.h" |
31 #include "core/css/SelectorFilter.h" | 31 #include "core/css/SelectorFilter.h" |
32 #include "core/css/TreeBoundaryCrossingRules.h" | |
33 #include "core/css/resolver/CSSPropertyPriority.h" | 32 #include "core/css/resolver/CSSPropertyPriority.h" |
34 #include "core/css/resolver/MatchedPropertiesCache.h" | 33 #include "core/css/resolver/MatchedPropertiesCache.h" |
35 #include "core/css/resolver/StyleBuilder.h" | 34 #include "core/css/resolver/StyleBuilder.h" |
36 #include "core/css/resolver/StyleResourceLoader.h" | 35 #include "core/css/resolver/StyleResourceLoader.h" |
37 #include "core/style/AuthorStyleInfo.h" | 36 #include "core/style/AuthorStyleInfo.h" |
38 #include "core/style/CachedUAStyle.h" | 37 #include "core/style/CachedUAStyle.h" |
39 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
40 #include "wtf/Deque.h" | 39 #include "wtf/Deque.h" |
41 #include "wtf/HashMap.h" | 40 #include "wtf/HashMap.h" |
42 #include "wtf/HashSet.h" | 41 #include "wtf/HashSet.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 unsigned accessCount() const { return m_accessCount; } | 181 unsigned accessCount() const { return m_accessCount; } |
183 void didAccess() { ++m_accessCount; } | 182 void didAccess() { ++m_accessCount; } |
184 | 183 |
185 void increaseStyleSharingDepth() { ++m_styleSharingDepth; } | 184 void increaseStyleSharingDepth() { ++m_styleSharingDepth; } |
186 void decreaseStyleSharingDepth() { --m_styleSharingDepth; } | 185 void decreaseStyleSharingDepth() { --m_styleSharingDepth; } |
187 | 186 |
188 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElementIfNeeded(Element& p
arent, PseudoId); | 187 PassRefPtrWillBeRawPtr<PseudoElement> createPseudoElementIfNeeded(Element& p
arent, PseudoId); |
189 | 188 |
190 DECLARE_TRACE(); | 189 DECLARE_TRACE(); |
191 | 190 |
192 void addTreeBoundaryCrossingScope(ContainerNode& scope); | |
193 | |
194 private: | 191 private: |
195 PassRefPtr<ComputedStyle> initialStyleForElement(); | 192 PassRefPtr<ComputedStyle> initialStyleForElement(); |
196 | 193 |
197 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl
eRule>>& watchedSelectors); | 194 void initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBeMember<Styl
eRule>>& watchedSelectors); |
198 | 195 |
199 // FIXME: This should probably go away, folded into FontBuilder. | 196 // FIXME: This should probably go away, folded into FontBuilder. |
200 void updateFont(StyleResolverState&); | 197 void updateFont(StyleResolverState&); |
201 | 198 |
202 static AuthorStyleInfo authorStyleInfo(StyleResolverState&); | 199 static AuthorStyleInfo authorStyleInfo(StyleResolverState&); |
203 | 200 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; | 257 OwnPtrWillBeMember<ViewportStyleResolver> m_viewportStyleResolver; |
261 | 258 |
262 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS
heets; | 259 WillBeHeapListHashSet<RawPtrWillBeMember<CSSStyleSheet>, 16> m_pendingStyleS
heets; |
263 | 260 |
264 // FIXME: The entire logic of collecting features on StyleResolver, as well
as transferring them | 261 // FIXME: The entire logic of collecting features on StyleResolver, as well
as transferring them |
265 // between various parts of machinery smells wrong. This needs to be better
somehow. | 262 // between various parts of machinery smells wrong. This needs to be better
somehow. |
266 RuleFeatureSet m_features; | 263 RuleFeatureSet m_features; |
267 OwnPtrWillBeMember<RuleSet> m_siblingRuleSet; | 264 OwnPtrWillBeMember<RuleSet> m_siblingRuleSet; |
268 OwnPtrWillBeMember<RuleSet> m_uncommonAttributeRuleSet; | 265 OwnPtrWillBeMember<RuleSet> m_uncommonAttributeRuleSet; |
269 OwnPtrWillBeMember<RuleSet> m_watchedSelectorsRules; | 266 OwnPtrWillBeMember<RuleSet> m_watchedSelectorsRules; |
270 TreeBoundaryCrossingRules m_treeBoundaryCrossingRules; | |
271 | 267 |
272 bool m_needCollectFeatures; | 268 bool m_needCollectFeatures; |
273 bool m_printMediaType; | 269 bool m_printMediaType; |
274 | 270 |
275 StyleResourceLoader m_styleResourceLoader; | 271 StyleResourceLoader m_styleResourceLoader; |
276 | 272 |
277 unsigned m_styleSharingDepth; | 273 unsigned m_styleSharingDepth; |
278 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth>
m_styleSharingLists; | 274 WillBeHeapVector<OwnPtrWillBeMember<StyleSharingList>, styleSharingMaxDepth>
m_styleSharingLists; |
279 | 275 |
280 OwnPtr<StyleResolverStats> m_styleResolverStats; | 276 OwnPtr<StyleResolverStats> m_styleResolverStats; |
281 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; | 277 OwnPtr<StyleResolverStats> m_styleResolverStatsTotals; |
282 unsigned m_styleResolverStatsSequence; | 278 unsigned m_styleResolverStatsSequence; |
283 | 279 |
284 // Use only for Internals::updateStyleAndReturnAffectedElementCount. | 280 // Use only for Internals::updateStyleAndReturnAffectedElementCount. |
285 unsigned m_accessCount; | 281 unsigned m_accessCount; |
286 }; | 282 }; |
287 | 283 |
288 } // namespace blink | 284 } // namespace blink |
289 | 285 |
290 #endif // StyleResolver_h | 286 #endif // StyleResolver_h |
OLD | NEW |