| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2002, 2006, 2008, 2012, 2013 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2006, 2008, 2012, 2013 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 100 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 101 public: | 101 public: |
| 102 static PassRefPtrWillBeRawPtr<StyleRule> create() { return adoptRefWillBeNoo
p(new StyleRule()); } | 102 static PassRefPtrWillBeRawPtr<StyleRule> create() { return adoptRefWillBeNoo
p(new StyleRule()); } |
| 103 | 103 |
| 104 ~StyleRule(); | 104 ~StyleRule(); |
| 105 | 105 |
| 106 const CSSSelectorList& selectorList() const { return m_selectorList; } | 106 const CSSSelectorList& selectorList() const { return m_selectorList; } |
| 107 const StylePropertySet& properties() const { return *m_properties; } | 107 const StylePropertySet& properties() const { return *m_properties; } |
| 108 MutableStylePropertySet& mutableProperties(); | 108 MutableStylePropertySet& mutableProperties(); |
| 109 | 109 |
| 110 void parserAdoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectors
) { m_selectorList.adoptSelectorVector(selectors); } | 110 void parserAdoptSelectorVector(Vector<OwnPtr<CSSParserSelector>>& selectors)
{ m_selectorList.adoptSelectorVector(selectors); } |
| 111 void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList.a
dopt(selectors); } | 111 void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList.a
dopt(selectors); } |
| 112 void setProperties(PassRefPtrWillBeRawPtr<StylePropertySet>); | 112 void setProperties(PassRefPtrWillBeRawPtr<StylePropertySet>); |
| 113 | 113 |
| 114 PassRefPtrWillBeRawPtr<StyleRule> copy() const { return adoptRefWillBeNoop(n
ew StyleRule(*this)); } | 114 PassRefPtrWillBeRawPtr<StyleRule> copy() const { return adoptRefWillBeNoop(n
ew StyleRule(*this)); } |
| 115 | 115 |
| 116 static unsigned averageSizeInBytes(); | 116 static unsigned averageSizeInBytes(); |
| 117 | 117 |
| 118 DECLARE_TRACE_AFTER_DISPATCH(); | 118 DECLARE_TRACE_AFTER_DISPATCH(); |
| 119 | 119 |
| 120 private: | 120 private: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 150 class StyleRulePage : public StyleRuleBase { | 150 class StyleRulePage : public StyleRuleBase { |
| 151 public: | 151 public: |
| 152 static PassRefPtrWillBeRawPtr<StyleRulePage> create() { return adoptRefWillB
eNoop(new StyleRulePage); } | 152 static PassRefPtrWillBeRawPtr<StyleRulePage> create() { return adoptRefWillB
eNoop(new StyleRulePage); } |
| 153 | 153 |
| 154 ~StyleRulePage(); | 154 ~StyleRulePage(); |
| 155 | 155 |
| 156 const CSSSelector* selector() const { return m_selectorList.first(); } | 156 const CSSSelector* selector() const { return m_selectorList.first(); } |
| 157 const StylePropertySet& properties() const { return *m_properties; } | 157 const StylePropertySet& properties() const { return *m_properties; } |
| 158 MutableStylePropertySet& mutableProperties(); | 158 MutableStylePropertySet& mutableProperties(); |
| 159 | 159 |
| 160 void parserAdoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectors
) { m_selectorList.adoptSelectorVector(selectors); } | 160 void parserAdoptSelectorVector(Vector<OwnPtr<CSSParserSelector>>& selectors)
{ m_selectorList.adoptSelectorVector(selectors); } |
| 161 void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList.a
dopt(selectors); } | 161 void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList.a
dopt(selectors); } |
| 162 void setProperties(PassRefPtrWillBeRawPtr<StylePropertySet>); | 162 void setProperties(PassRefPtrWillBeRawPtr<StylePropertySet>); |
| 163 | 163 |
| 164 PassRefPtrWillBeRawPtr<StyleRulePage> copy() const { return adoptRefWillBeNo
op(new StyleRulePage(*this)); } | 164 PassRefPtrWillBeRawPtr<StyleRulePage> copy() const { return adoptRefWillBeNo
op(new StyleRulePage(*this)); } |
| 165 | 165 |
| 166 DECLARE_TRACE_AFTER_DISPATCH(); | 166 DECLARE_TRACE_AFTER_DISPATCH(); |
| 167 | 167 |
| 168 private: | 168 private: |
| 169 StyleRulePage(); | 169 StyleRulePage(); |
| 170 StyleRulePage(const StyleRulePage&); | 170 StyleRulePage(const StyleRulePage&); |
| 171 | 171 |
| 172 RefPtrWillBeMember<StylePropertySet> m_properties; // Cannot be null. | 172 RefPtrWillBeMember<StylePropertySet> m_properties; // Cannot be null. |
| 173 CSSSelectorList m_selectorList; | 173 CSSSelectorList m_selectorList; |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 class StyleRuleGroup : public StyleRuleBase { | 176 class StyleRuleGroup : public StyleRuleBase { |
| 177 public: | 177 public: |
| 178 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >& childRules() con
st { return m_childRules; } | 178 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& childRules() cons
t { return m_childRules; } |
| 179 | 179 |
| 180 void wrapperInsertRule(unsigned, PassRefPtrWillBeRawPtr<StyleRuleBase>); | 180 void wrapperInsertRule(unsigned, PassRefPtrWillBeRawPtr<StyleRuleBase>); |
| 181 void wrapperRemoveRule(unsigned); | 181 void wrapperRemoveRule(unsigned); |
| 182 | 182 |
| 183 DECLARE_TRACE_AFTER_DISPATCH(); | 183 DECLARE_TRACE_AFTER_DISPATCH(); |
| 184 | 184 |
| 185 protected: | 185 protected: |
| 186 StyleRuleGroup(Type, WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >& a
doptRule); | 186 StyleRuleGroup(Type, WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& ad
optRule); |
| 187 StyleRuleGroup(const StyleRuleGroup&); | 187 StyleRuleGroup(const StyleRuleGroup&); |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> > m_childRules; | 190 WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> m_childRules; |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 class StyleRuleMedia : public StyleRuleGroup { | 193 class StyleRuleMedia : public StyleRuleGroup { |
| 194 public: | 194 public: |
| 195 static PassRefPtrWillBeRawPtr<StyleRuleMedia> create(PassRefPtrWillBeRawPtr<
MediaQuerySet> media, WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >& adop
tRules) | 195 static PassRefPtrWillBeRawPtr<StyleRuleMedia> create(PassRefPtrWillBeRawPtr<
MediaQuerySet> media, WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& adopt
Rules) |
| 196 { | 196 { |
| 197 return adoptRefWillBeNoop(new StyleRuleMedia(media, adoptRules)); | 197 return adoptRefWillBeNoop(new StyleRuleMedia(media, adoptRules)); |
| 198 } | 198 } |
| 199 | 199 |
| 200 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } | 200 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } |
| 201 | 201 |
| 202 PassRefPtrWillBeRawPtr<StyleRuleMedia> copy() const { return adoptRefWillBeN
oop(new StyleRuleMedia(*this)); } | 202 PassRefPtrWillBeRawPtr<StyleRuleMedia> copy() const { return adoptRefWillBeN
oop(new StyleRuleMedia(*this)); } |
| 203 | 203 |
| 204 DECLARE_TRACE_AFTER_DISPATCH(); | 204 DECLARE_TRACE_AFTER_DISPATCH(); |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 StyleRuleMedia(PassRefPtrWillBeRawPtr<MediaQuerySet>, WillBeHeapVector<RefPt
rWillBeMember<StyleRuleBase> >& adoptRules); | 207 StyleRuleMedia(PassRefPtrWillBeRawPtr<MediaQuerySet>, WillBeHeapVector<RefPt
rWillBeMember<StyleRuleBase>>& adoptRules); |
| 208 StyleRuleMedia(const StyleRuleMedia&); | 208 StyleRuleMedia(const StyleRuleMedia&); |
| 209 | 209 |
| 210 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; | 210 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 class StyleRuleSupports : public StyleRuleGroup { | 213 class StyleRuleSupports : public StyleRuleGroup { |
| 214 public: | 214 public: |
| 215 static PassRefPtrWillBeRawPtr<StyleRuleSupports> create(const String& condit
ionText, bool conditionIsSupported, WillBeHeapVector<RefPtrWillBeMember<StyleRul
eBase> >& adoptRules) | 215 static PassRefPtrWillBeRawPtr<StyleRuleSupports> create(const String& condit
ionText, bool conditionIsSupported, WillBeHeapVector<RefPtrWillBeMember<StyleRul
eBase>>& adoptRules) |
| 216 { | 216 { |
| 217 return adoptRefWillBeNoop(new StyleRuleSupports(conditionText, condition
IsSupported, adoptRules)); | 217 return adoptRefWillBeNoop(new StyleRuleSupports(conditionText, condition
IsSupported, adoptRules)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 String conditionText() const { return m_conditionText; } | 220 String conditionText() const { return m_conditionText; } |
| 221 bool conditionIsSupported() const { return m_conditionIsSupported; } | 221 bool conditionIsSupported() const { return m_conditionIsSupported; } |
| 222 PassRefPtrWillBeRawPtr<StyleRuleSupports> copy() const { return adoptRefWill
BeNoop(new StyleRuleSupports(*this)); } | 222 PassRefPtrWillBeRawPtr<StyleRuleSupports> copy() const { return adoptRefWill
BeNoop(new StyleRuleSupports(*this)); } |
| 223 | 223 |
| 224 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { StyleRuleGroup::traceAfterDispatch(vi
sitor); } | 224 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { StyleRuleGroup::traceAfterDispatch(vi
sitor); } |
| 225 | 225 |
| 226 private: | 226 private: |
| 227 StyleRuleSupports(const String& conditionText, bool conditionIsSupported, Wi
llBeHeapVector<RefPtrWillBeMember<StyleRuleBase> >& adoptRules); | 227 StyleRuleSupports(const String& conditionText, bool conditionIsSupported, Wi
llBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& adoptRules); |
| 228 StyleRuleSupports(const StyleRuleSupports&); | 228 StyleRuleSupports(const StyleRuleSupports&); |
| 229 | 229 |
| 230 String m_conditionText; | 230 String m_conditionText; |
| 231 bool m_conditionIsSupported; | 231 bool m_conditionIsSupported; |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 class StyleRuleViewport : public StyleRuleBase { | 234 class StyleRuleViewport : public StyleRuleBase { |
| 235 public: | 235 public: |
| 236 static PassRefPtrWillBeRawPtr<StyleRuleViewport> create() { return adoptRefW
illBeNoop(new StyleRuleViewport); } | 236 static PassRefPtrWillBeRawPtr<StyleRuleViewport> create() { return adoptRefW
illBeNoop(new StyleRuleViewport); } |
| 237 | 237 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 259 DEFINE_TYPE_CASTS(StyleRule, StyleRuleBase, rule, rule->isStyleRule(), rule.isSt
yleRule()); | 259 DEFINE_TYPE_CASTS(StyleRule, StyleRuleBase, rule, rule->isStyleRule(), rule.isSt
yleRule()); |
| 260 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); | 260 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); |
| 261 DEFINE_STYLE_RULE_TYPE_CASTS(Page); | 261 DEFINE_STYLE_RULE_TYPE_CASTS(Page); |
| 262 DEFINE_STYLE_RULE_TYPE_CASTS(Media); | 262 DEFINE_STYLE_RULE_TYPE_CASTS(Media); |
| 263 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); | 263 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); |
| 264 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); | 264 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| 267 | 267 |
| 268 #endif // StyleRule_h | 268 #endif // StyleRule_h |
| OLD | NEW |