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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 protected: | 188 protected: |
189 StyleRuleGroup(Type, Vector<RefPtr<StyleRuleBase> >& adoptRule); | 189 StyleRuleGroup(Type, Vector<RefPtr<StyleRuleBase> >& adoptRule); |
190 StyleRuleGroup(const StyleRuleGroup&); | 190 StyleRuleGroup(const StyleRuleGroup&); |
191 | 191 |
192 private: | 192 private: |
193 Vector<RefPtr<StyleRuleBase> > m_childRules; | 193 Vector<RefPtr<StyleRuleBase> > m_childRules; |
194 }; | 194 }; |
195 | 195 |
196 class StyleRuleMedia : public StyleRuleGroup { | 196 class StyleRuleMedia : public StyleRuleGroup { |
197 public: | 197 public: |
198 static PassRefPtrWillBeRawPtr<StyleRuleMedia> create(PassRefPtr<MediaQuerySe
t> media, Vector<RefPtr<StyleRuleBase> >& adoptRules) | 198 static PassRefPtrWillBeRawPtr<StyleRuleMedia> create(PassRefPtrWillBeRawPtr<
MediaQuerySet> media, Vector<RefPtr<StyleRuleBase> >& adoptRules) |
199 { | 199 { |
200 return adoptRefCountedWillBeRefCountedGarbageCollected(new StyleRuleMedi
a(media, adoptRules)); | 200 return adoptRefCountedWillBeRefCountedGarbageCollected(new StyleRuleMedi
a(media, adoptRules)); |
201 } | 201 } |
202 | 202 |
203 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } | 203 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } |
204 | 204 |
205 PassRefPtr<StyleRuleMedia> copy() const { return adoptRefCountedWillBeRefCou
ntedGarbageCollected(new StyleRuleMedia(*this)); } | 205 PassRefPtr<StyleRuleMedia> copy() const { return adoptRefCountedWillBeRefCou
ntedGarbageCollected(new StyleRuleMedia(*this)); } |
206 | 206 |
207 void traceAfterDispatch(Visitor* visitor) { StyleRuleGroup::traceAfterDispat
ch(visitor); } | 207 void traceAfterDispatch(Visitor* visitor) { StyleRuleGroup::traceAfterDispat
ch(visitor); } |
208 | 208 |
209 private: | 209 private: |
210 StyleRuleMedia(PassRefPtr<MediaQuerySet>, Vector<RefPtr<StyleRuleBase> >& ad
optRules); | 210 StyleRuleMedia(PassRefPtrWillBeRawPtr<MediaQuerySet>, Vector<RefPtr<StyleRul
eBase> >& adoptRules); |
211 StyleRuleMedia(const StyleRuleMedia&); | 211 StyleRuleMedia(const StyleRuleMedia&); |
212 | 212 |
213 RefPtr<MediaQuerySet> m_mediaQueries; | 213 RefPtrWillBePersistent<MediaQuerySet> m_mediaQueries; |
214 }; | 214 }; |
215 | 215 |
216 class StyleRuleSupports : public StyleRuleGroup { | 216 class StyleRuleSupports : public StyleRuleGroup { |
217 public: | 217 public: |
218 static PassRefPtrWillBeRawPtr<StyleRuleSupports> create(const String& condit
ionText, bool conditionIsSupported, Vector<RefPtr<StyleRuleBase> >& adoptRules) | 218 static PassRefPtrWillBeRawPtr<StyleRuleSupports> create(const String& condit
ionText, bool conditionIsSupported, Vector<RefPtr<StyleRuleBase> >& adoptRules) |
219 { | 219 { |
220 return adoptRefCountedWillBeRefCountedGarbageCollected(new StyleRuleSupp
orts(conditionText, conditionIsSupported, adoptRules)); | 220 return adoptRefCountedWillBeRefCountedGarbageCollected(new StyleRuleSupp
orts(conditionText, conditionIsSupported, adoptRules)); |
221 } | 221 } |
222 | 222 |
223 String conditionText() const { return m_conditionText; } | 223 String conditionText() const { return m_conditionText; } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); | 288 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); |
289 DEFINE_STYLE_RULE_TYPE_CASTS(Page); | 289 DEFINE_STYLE_RULE_TYPE_CASTS(Page); |
290 DEFINE_STYLE_RULE_TYPE_CASTS(Media); | 290 DEFINE_STYLE_RULE_TYPE_CASTS(Media); |
291 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); | 291 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); |
292 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); | 292 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); |
293 DEFINE_STYLE_RULE_TYPE_CASTS(Filter); | 293 DEFINE_STYLE_RULE_TYPE_CASTS(Filter); |
294 | 294 |
295 } // namespace WebCore | 295 } // namespace WebCore |
296 | 296 |
297 #endif // StyleRule_h | 297 #endif // StyleRule_h |
OLD | NEW |