| 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 18 matching lines...) Expand all Loading... |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class StylePropertySet; | 31 class StylePropertySet; |
| 32 | 32 |
| 33 class StyleRuleBase : public RefCounted<StyleRuleBase> { | 33 class StyleRuleBase : public RefCounted<StyleRuleBase> { |
| 34 WTF_MAKE_FAST_ALLOCATED; | 34 WTF_MAKE_FAST_ALLOCATED; |
| 35 public: | 35 public: |
| 36 enum Type { | 36 enum Type { |
| 37 Unknown, // Not used. | 37 Unknown, // Not used. |
| 38 Style, | 38 Style, |
| 39 FontFace = 4, | 39 FontFace, |
| 40 Keyframes = 5, | 40 Supports, |
| 41 Supports = 12, | |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 Type type() const { return static_cast<Type>(m_type); } | 43 Type type() const { return static_cast<Type>(m_type); } |
| 45 | 44 |
| 46 bool isFontFaceRule() const { return type() == FontFace; } | 45 bool isFontFaceRule() const { return type() == FontFace; } |
| 47 bool isKeyframesRule() const { return type() == Keyframes; } | |
| 48 bool isStyleRule() const { return type() == Style; } | 46 bool isStyleRule() const { return type() == Style; } |
| 49 bool isSupportsRule() const { return type() == Supports; } | 47 bool isSupportsRule() const { return type() == Supports; } |
| 50 | 48 |
| 51 void deref() | 49 void deref() |
| 52 { | 50 { |
| 53 if (derefBase()) | 51 if (derefBase()) |
| 54 destroy(); | 52 destroy(); |
| 55 } | 53 } |
| 56 | 54 |
| 57 protected: | 55 protected: |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 #define DEFINE_STYLE_RULE_TYPE_CASTS(Type) \ | 136 #define DEFINE_STYLE_RULE_TYPE_CASTS(Type) \ |
| 139 DEFINE_TYPE_CASTS(StyleRule##Type, StyleRuleBase, rule, rule->is##Type##Rule
(), rule.is##Type##Rule()) | 137 DEFINE_TYPE_CASTS(StyleRule##Type, StyleRuleBase, rule, rule->is##Type##Rule
(), rule.is##Type##Rule()) |
| 140 | 138 |
| 141 DEFINE_TYPE_CASTS(StyleRule, StyleRuleBase, rule, rule->isStyleRule(), rule.isSt
yleRule()); | 139 DEFINE_TYPE_CASTS(StyleRule, StyleRuleBase, rule, rule->isStyleRule(), rule.isSt
yleRule()); |
| 142 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); | 140 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); |
| 143 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); | 141 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); |
| 144 | 142 |
| 145 } // namespace blink | 143 } // namespace blink |
| 146 | 144 |
| 147 #endif // SKY_ENGINE_CORE_CSS_STYLERULE_H_ | 145 #endif // SKY_ENGINE_CORE_CSS_STYLERULE_H_ |
| OLD | NEW |