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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 public: | 60 public: |
61 bool checkRegionStyle(Element*); | 61 bool checkRegionStyle(Element*); |
62 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima
tionName); | 62 const StyleRuleKeyframes* keyframeStylesForAnimation(const StringImpl* anima
tionName); |
63 void addKeyframeStyle(PassRefPtr<StyleRuleKeyframes>); | 63 void addKeyframeStyle(PassRefPtr<StyleRuleKeyframes>); |
64 | 64 |
65 void matchHostRules(ElementRuleCollector&, bool includeEmptyRules); | 65 void matchHostRules(ElementRuleCollector&, bool includeEmptyRules); |
66 void matchAuthorRules(ElementRuleCollector&, bool includeEmptyRules, bool ap
plyAuthorStyles); | 66 void matchAuthorRules(ElementRuleCollector&, bool includeEmptyRules, bool ap
plyAuthorStyles); |
67 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule
s, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder); | 67 void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRule
s, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder); |
68 void matchPageRules(PageRuleCollector&); | 68 void matchPageRules(PageRuleCollector&); |
69 void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, Styl
eResolver*); | 69 void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, Styl
eResolver*, bool viewportRuleIsProcessed); |
70 void addHostRule(StyleRuleHost*, bool hasDocumentSecurityOrigin, const Conta
inerNode* scopingNode); | 70 void addHostRule(StyleRuleHost*, bool hasDocumentSecurityOrigin, const Conta
inerNode* scopingNode); |
| 71 void addViewportRule(StyleRuleViewport*); |
71 void collectFeaturesTo(RuleFeatureSet&); | 72 void collectFeaturesTo(RuleFeatureSet&); |
72 void resetAuthorStyle(); | 73 void resetAuthorStyle(); |
73 void resetAtHostRules(const ShadowRoot*); | 74 void resetAtHostRules(const ShadowRoot*); |
74 void collectViewportRulesTo(StyleResolver*) const; | 75 void collectViewportRulesTo(StyleResolver*) const; |
75 | 76 |
76 private: | 77 private: |
77 explicit ScopedStyleResolver(ContainerNode& scopingNode) : m_scopingNode(sco
pingNode), m_parent(0) { } | 78 explicit ScopedStyleResolver(ContainerNode& scopingNode) : m_scopingNode(sco
pingNode), m_parent(0) { } |
78 | 79 |
79 RuleSet* ensureAtHostRuleSetFor(const ShadowRoot*); | 80 RuleSet* ensureAtHostRuleSetFor(const ShadowRoot*); |
80 RuleSet* atHostRuleSetFor(const ShadowRoot*) const; | 81 RuleSet* atHostRuleSetFor(const ShadowRoot*) const; |
| 82 RuleSet* ensureAuthorStyle(); |
81 | 83 |
82 ContainerNode& m_scopingNode; | 84 ContainerNode& m_scopingNode; |
83 ScopedStyleResolver* m_parent; | 85 ScopedStyleResolver* m_parent; |
84 | 86 |
85 OwnPtr<RuleSet> m_authorStyle; | 87 OwnPtr<RuleSet> m_authorStyle; |
86 HashMap<const ShadowRoot*, OwnPtr<RuleSet> > m_atHostRules; | 88 HashMap<const ShadowRoot*, OwnPtr<RuleSet> > m_atHostRules; |
87 | 89 |
88 typedef HashMap<const StringImpl*, RefPtr<StyleRuleKeyframes> > KeyframesRul
eMap; | 90 typedef HashMap<const StringImpl*, RefPtr<StyleRuleKeyframes> > KeyframesRul
eMap; |
89 KeyframesRuleMap m_keyframesRuleMap; | 91 KeyframesRuleMap m_keyframesRuleMap; |
90 }; | 92 }; |
91 | 93 |
92 } // namespace WebCore | 94 } // namespace WebCore |
93 | 95 |
94 #endif // ScopedStyleResolver_h | 96 #endif // ScopedStyleResolver_h |
OLD | NEW |