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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 class CORE_EXPORT StyleRuleBase : public RefCountedWillBeGarbageCollectedFinaliz
ed<StyleRuleBase> { | 38 class CORE_EXPORT StyleRuleBase : public RefCountedWillBeGarbageCollectedFinaliz
ed<StyleRuleBase> { |
39 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleRuleBase); | 39 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleRuleBase); |
40 public: | 40 public: |
41 enum Type { | 41 enum Type { |
42 Unknown, | 42 Unknown, |
43 Charset, | 43 Charset, |
44 Style, | 44 Style, |
45 Import, | 45 Import, |
46 Media, | 46 Media, |
47 FontFace, | |
48 Page, | 47 Page, |
49 Keyframes, | 48 Keyframes, |
50 Keyframe, | 49 Keyframe, |
51 Namespace, | 50 Namespace, |
52 Supports, | 51 Supports, |
| 52 FontFace, |
53 Viewport, | 53 Viewport, |
54 }; | 54 }; |
55 | 55 |
56 Type type() const { return static_cast<Type>(m_type); } | 56 Type type() const { return static_cast<Type>(m_type); } |
57 | 57 |
58 bool isCharsetRule() const { return type() == Charset; } | 58 bool isCharsetRule() const { return type() == Charset; } |
59 bool isFontFaceRule() const { return type() == FontFace; } | 59 bool isFontFaceRule() const { return type() == FontFace; } |
60 bool isKeyframesRule() const { return type() == Keyframes; } | 60 bool isKeyframesRule() const { return type() == Keyframes; } |
61 bool isKeyframeRule() const { return type() == Keyframe; } | 61 bool isKeyframeRule() const { return type() == Keyframe; } |
62 bool isNamespaceRule() const { return type() == Namespace; } | 62 bool isNamespaceRule() const { return type() == Namespace; } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 class StyleRuleFontFace : public StyleRuleBase { | 135 class StyleRuleFontFace : public StyleRuleBase { |
136 public: | 136 public: |
137 static PassRefPtrWillBeRawPtr<StyleRuleFontFace> create() { return adoptRefW
illBeNoop(new StyleRuleFontFace); } | 137 static PassRefPtrWillBeRawPtr<StyleRuleFontFace> create() { return adoptRefW
illBeNoop(new StyleRuleFontFace); } |
138 | 138 |
139 ~StyleRuleFontFace(); | 139 ~StyleRuleFontFace(); |
140 | 140 |
141 const StylePropertySet& properties() const { return *m_properties; } | 141 const StylePropertySet& properties() const { return *m_properties; } |
142 MutableStylePropertySet& mutableProperties(); | 142 MutableStylePropertySet& mutableProperties(); |
143 | 143 |
144 void setProperties(PassRefPtrWillBeRawPtr<StylePropertySet>); | 144 bool setProperties(PassRefPtrWillBeRawPtr<StylePropertySet>); |
145 | 145 |
146 PassRefPtrWillBeRawPtr<StyleRuleFontFace> copy() const { return adoptRefWill
BeNoop(new StyleRuleFontFace(*this)); } | 146 PassRefPtrWillBeRawPtr<StyleRuleFontFace> copy() const { return adoptRefWill
BeNoop(new StyleRuleFontFace(*this)); } |
147 | 147 |
148 DECLARE_TRACE_AFTER_DISPATCH(); | 148 DECLARE_TRACE_AFTER_DISPATCH(); |
149 | 149 |
150 private: | 150 private: |
151 StyleRuleFontFace(); | 151 StyleRuleFontFace(); |
152 StyleRuleFontFace(const StyleRuleFontFace&); | 152 StyleRuleFontFace(const StyleRuleFontFace&); |
153 | 153 |
154 RefPtrWillBeMember<StylePropertySet> m_properties; // Cannot be null. | 154 RefPtrWillBeMember<StylePropertySet> m_properties; // Cannot be null. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); | 279 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); |
280 DEFINE_STYLE_RULE_TYPE_CASTS(Page); | 280 DEFINE_STYLE_RULE_TYPE_CASTS(Page); |
281 DEFINE_STYLE_RULE_TYPE_CASTS(Media); | 281 DEFINE_STYLE_RULE_TYPE_CASTS(Media); |
282 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); | 282 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); |
283 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); | 283 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); |
284 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); | 284 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); |
285 | 285 |
286 } // namespace blink | 286 } // namespace blink |
287 | 287 |
288 #endif // StyleRule_h | 288 #endif // StyleRule_h |
OLD | NEW |