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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } | 68 const CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } |
69 | 69 |
70 private: | 70 private: |
71 const RuleData* m_ruleData; | 71 const RuleData* m_ruleData; |
72 unsigned m_specificity; | 72 unsigned m_specificity; |
73 CascadeScope m_cascadeScope; | 73 CascadeScope m_cascadeScope; |
74 uint64_t m_position; | 74 uint64_t m_position; |
75 const CSSStyleSheet* m_parentStyleSheet; | 75 const CSSStyleSheet* m_parentStyleSheet; |
76 }; | 76 }; |
77 | 77 |
| 78 // FIXME: oilpan: when transition types are gone this class can be replaced with
HeapVector. |
78 class StyleRuleList : public RefCounted<StyleRuleList> { | 79 class StyleRuleList : public RefCounted<StyleRuleList> { |
79 public: | 80 public: |
80 static PassRefPtr<StyleRuleList> create() { return adoptRef(new StyleRuleLis
t()); } | 81 static PassRefPtr<StyleRuleList> create() { return adoptRef(new StyleRuleLis
t()); } |
81 Vector<StyleRule*> m_list; | 82 WillBePersistentHeapVector<RawPtrWillBeMember<StyleRule> > m_list; |
82 }; | 83 }; |
83 | 84 |
84 // ElementRuleCollector is designed to be used as a stack object. | 85 // ElementRuleCollector is designed to be used as a stack object. |
85 // Create one, ask what rules the ElementResolveContext matches | 86 // Create one, ask what rules the ElementResolveContext matches |
86 // and then let it go out of scope. | 87 // and then let it go out of scope. |
87 // FIXME: Currently it modifies the RenderStyle but should not! | 88 // FIXME: Currently it modifies the RenderStyle but should not! |
88 class ElementRuleCollector { | 89 class ElementRuleCollector { |
89 WTF_MAKE_NONCOPYABLE(ElementRuleCollector); | 90 WTF_MAKE_NONCOPYABLE(ElementRuleCollector); |
90 public: | 91 public: |
91 ElementRuleCollector(const ElementResolveContext&, const SelectorFilter&, Re
nderStyle* = 0); | 92 ElementRuleCollector(const ElementResolveContext&, const SelectorFilter&, Re
nderStyle* = 0); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 144 |
144 // Output. | 145 // Output. |
145 RefPtr<StaticCSSRuleList> m_cssRuleList; | 146 RefPtr<StaticCSSRuleList> m_cssRuleList; |
146 RefPtr<StyleRuleList> m_styleRuleList; | 147 RefPtr<StyleRuleList> m_styleRuleList; |
147 MatchResult m_result; | 148 MatchResult m_result; |
148 }; | 149 }; |
149 | 150 |
150 } // namespace WebCore | 151 } // namespace WebCore |
151 | 152 |
152 #endif // ElementRuleCollector_h | 153 #endif // ElementRuleCollector_h |
OLD | NEW |