| 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 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef ScopedStyleResolver_h | 27 #ifndef ScopedStyleResolver_h |
| 28 #define ScopedStyleResolver_h | 28 #define ScopedStyleResolver_h |
| 29 | 29 |
| 30 #include "core/css/ElementRuleCollector.h" | 30 #include "core/css/ElementRuleCollector.h" |
| 31 #include "core/css/RuleSet.h" | 31 #include "core/css/RuleSet.h" |
| 32 #include "core/dom/ContainerNode.h" | 32 #include "core/dom/ContainerNode.h" |
| 33 #include "wtf/HashMap.h" | 33 #include "wtf/HashMap.h" |
| 34 #include "wtf/HashSet.h" |
| 34 #include "wtf/OwnPtr.h" | 35 #include "wtf/OwnPtr.h" |
| 35 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
| 36 | 37 |
| 37 namespace WebCore { | 38 namespace WebCore { |
| 38 | 39 |
| 39 class MediaQueryEvaluator; | 40 class MediaQueryEvaluator; |
| 40 class PageRuleCollector; | 41 class PageRuleCollector; |
| 41 class ShadowRoot; | 42 class ShadowRoot; |
| 42 class StyleSheetContents; | 43 class StyleSheetContents; |
| 43 | 44 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 54 void setParent(ScopedStyleResolver* newParent) { m_parent = newParent; } | 55 void setParent(ScopedStyleResolver* newParent) { m_parent = newParent; } |
| 55 ScopedStyleResolver* parent() { return m_parent; } | 56 ScopedStyleResolver* parent() { return m_parent; } |
| 56 | 57 |
| 57 public: | 58 public: |
| 58 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima
tionName); | 59 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima
tionName); |
| 59 void addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes>); | 60 void addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyframes>); |
| 60 | 61 |
| 61 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule
s, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder); | 62 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule
s, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder); |
| 62 void matchPageRules(PageRuleCollector&); | 63 void matchPageRules(PageRuleCollector&); |
| 63 void addRulesFromSheet(CSSStyleSheet*, const MediaQueryEvaluator&, StyleReso
lver*); | 64 void addRulesFromSheet(CSSStyleSheet*, const MediaQueryEvaluator&, StyleReso
lver*); |
| 64 void collectFeaturesTo(RuleFeatureSet&); | 65 void collectFeaturesTo(RuleFeatureSet&, HashSet<const StyleSheetContents*>&
visitedSharedStyleSheetContents); |
| 65 void resetAuthorStyle(); | 66 void resetAuthorStyle(); |
| 66 void collectViewportRulesTo(StyleResolver*) const; | 67 void collectViewportRulesTo(StyleResolver*) const; |
| 67 | 68 |
| 68 private: | 69 private: |
| 69 explicit ScopedStyleResolver(ContainerNode& scopingNode) : m_scopingNode(sco
pingNode), m_parent(0) { } | 70 explicit ScopedStyleResolver(ContainerNode& scopingNode) : m_scopingNode(sco
pingNode), m_parent(0) { } |
| 70 | 71 |
| 71 ContainerNode& m_scopingNode; | 72 ContainerNode& m_scopingNode; |
| 72 ScopedStyleResolver* m_parent; | 73 ScopedStyleResolver* m_parent; |
| 73 | 74 |
| 74 Vector<CSSStyleSheet*> m_authorStyleSheets; | 75 Vector<CSSStyleSheet*> m_authorStyleSheets; |
| 75 | 76 |
| 76 typedef WillBePersistentHeapHashMap<const StringImpl*, RefPtrWillBeMember<St
yleRuleKeyframes> > KeyframesRuleMap; | 77 typedef WillBePersistentHeapHashMap<const StringImpl*, RefPtrWillBeMember<St
yleRuleKeyframes> > KeyframesRuleMap; |
| 77 KeyframesRuleMap m_keyframesRuleMap; | 78 KeyframesRuleMap m_keyframesRuleMap; |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace WebCore | 81 } // namespace WebCore |
| 81 | 82 |
| 82 #endif // ScopedStyleResolver_h | 83 #endif // ScopedStyleResolver_h |
| OLD | NEW |