| 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, 2007, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) | 5 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class CSSRuleList; | 33 class CSSRuleList; |
| 34 class CSSStyleSheet; | 34 class CSSStyleSheet; |
| 35 class StyleRuleBase; | 35 class StyleRuleBase; |
| 36 | 36 |
| 37 class CORE_EXPORT CSSRule : public GarbageCollectedFinalized<CSSRule>, public Sc
riptWrappable { | 37 class CORE_EXPORT CSSRule : public GarbageCollectedFinalized<CSSRule>, public Sc
riptWrappable { |
| 38 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
| 39 public: | 39 public: |
| 40 virtual ~CSSRule() { } | 40 virtual ~CSSRule() { } |
| 41 | 41 |
| 42 enum Type { | 42 enum Type { |
| 43 STYLE_RULE = 1, | 43 kStyleRule = 1, |
| 44 CHARSET_RULE = 2, | 44 kCharsetRule = 2, |
| 45 IMPORT_RULE = 3, | 45 kImportRule = 3, |
| 46 MEDIA_RULE = 4, | 46 kMediaRule = 4, |
| 47 FONT_FACE_RULE = 5, | 47 kFontFaceRule = 5, |
| 48 PAGE_RULE = 6, | 48 kPageRule = 6, |
| 49 KEYFRAMES_RULE = 7, | 49 kKeyframesRule = 7, |
| 50 WEBKIT_KEYFRAMES_RULE = KEYFRAMES_RULE, | 50 kWebkitKeyframesRule = kKeyframesRule, |
| 51 KEYFRAME_RULE = 8, | 51 kKeyframeRule = 8, |
| 52 WEBKIT_KEYFRAME_RULE = KEYFRAME_RULE, | 52 kWebkitKeyframeRule = kKeyframeRule, |
| 53 NAMESPACE_RULE = 10, | 53 kNamespaceRule = 10, |
| 54 SUPPORTS_RULE = 12, | 54 kSupportsRule = 12, |
| 55 VIEWPORT_RULE = 15, | 55 kViewportRule = 15, |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 virtual Type type() const = 0; | 58 virtual Type type() const = 0; |
| 59 virtual String cssText() const = 0; | 59 virtual String cssText() const = 0; |
| 60 virtual void reattach(StyleRuleBase*) = 0; | 60 virtual void reattach(StyleRuleBase*) = 0; |
| 61 | 61 |
| 62 virtual CSSRuleList* cssRules() const { return 0; } | 62 virtual CSSRuleList* cssRules() const { return 0; } |
| 63 | 63 |
| 64 void setParentStyleSheet(CSSStyleSheet* styleSheet) | 64 void setParentStyleSheet(CSSStyleSheet* styleSheet) |
| 65 { | 65 { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 CSSStyleSheet* m_parentStyleSheet; | 110 CSSStyleSheet* m_parentStyleSheet; |
| 111 }; | 111 }; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ | 114 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ |
| 115 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME,
rule.type() == CSSRule::TYPE_NAME) | 115 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME,
rule.type() == CSSRule::TYPE_NAME) |
| 116 | 116 |
| 117 } // namespace blink | 117 } // namespace blink |
| 118 | 118 |
| 119 #endif // CSSRule_h | 119 #endif // CSSRule_h |
| OLD | NEW |