| 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 17 matching lines...) Expand all Loading... |
| 28 #include "core/css/StylePropertySet.h" | 28 #include "core/css/StylePropertySet.h" |
| 29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 30 #include "wtf/RefPtr.h" | 30 #include "wtf/RefPtr.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class CSSRule; | 34 class CSSRule; |
| 35 class CSSStyleSheet; | 35 class CSSStyleSheet; |
| 36 | 36 |
| 37 class CORE_EXPORT StyleRuleBase : public RefCountedWillBeGarbageCollectedFinaliz
ed<StyleRuleBase> { | 37 class CORE_EXPORT StyleRuleBase : public RefCountedWillBeGarbageCollectedFinaliz
ed<StyleRuleBase> { |
| 38 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleRuleBase); | 38 USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(StyleRuleBase, "blink::Styl
eRuleBase"); |
| 39 public: | 39 public: |
| 40 enum Type { | 40 enum Type { |
| 41 Charset, | 41 Charset, |
| 42 Style, | 42 Style, |
| 43 Import, | 43 Import, |
| 44 Media, | 44 Media, |
| 45 FontFace, | 45 FontFace, |
| 46 Page, | 46 Page, |
| 47 Keyframes, | 47 Keyframes, |
| 48 Keyframe, | 48 Keyframe, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 void destroy(); | 97 void destroy(); |
| 98 | 98 |
| 99 PassRefPtrWillBeRawPtr<CSSRule> createCSSOMWrapper(CSSStyleSheet* parentShee
t, CSSRule* parentRule) const; | 99 PassRefPtrWillBeRawPtr<CSSRule> createCSSOMWrapper(CSSStyleSheet* parentShee
t, CSSRule* parentRule) const; |
| 100 | 100 |
| 101 unsigned m_type : 5; | 101 unsigned m_type : 5; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 class CORE_EXPORT StyleRule : public StyleRuleBase { | 104 class CORE_EXPORT StyleRule : public StyleRuleBase { |
| 105 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleRule); | 105 USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(StyleRule, "blink::StyleRul
e"); |
| 106 public: | 106 public: |
| 107 // Adopts the selector list | 107 // Adopts the selector list |
| 108 static PassRefPtrWillBeRawPtr<StyleRule> create(CSSSelectorList& selectorLis
t, PassRefPtrWillBeRawPtr<StylePropertySet> properties) | 108 static PassRefPtrWillBeRawPtr<StyleRule> create(CSSSelectorList& selectorLis
t, PassRefPtrWillBeRawPtr<StylePropertySet> properties) |
| 109 { | 109 { |
| 110 return adoptRefWillBeNoop(new StyleRule(selectorList, properties)); | 110 return adoptRefWillBeNoop(new StyleRule(selectorList, properties)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ~StyleRule(); | 113 ~StyleRule(); |
| 114 | 114 |
| 115 const CSSSelectorList& selectorList() const { return m_selectorList; } | 115 const CSSSelectorList& selectorList() const { return m_selectorList; } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); | 283 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); |
| 284 DEFINE_STYLE_RULE_TYPE_CASTS(Page); | 284 DEFINE_STYLE_RULE_TYPE_CASTS(Page); |
| 285 DEFINE_STYLE_RULE_TYPE_CASTS(Media); | 285 DEFINE_STYLE_RULE_TYPE_CASTS(Media); |
| 286 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); | 286 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); |
| 287 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); | 287 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); |
| 288 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); | 288 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); |
| 289 | 289 |
| 290 } // namespace blink | 290 } // namespace blink |
| 291 | 291 |
| 292 #endif // StyleRule_h | 292 #endif // StyleRule_h |
| OLD | NEW |