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, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSRule* parentRule) const | 53 PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSRule* parentRule) const |
54 { | 54 { |
55 return createCSSOMWrapper(0, parentRule); | 55 return createCSSOMWrapper(0, parentRule); |
56 } | 56 } |
57 | 57 |
58 void StyleRuleBase::destroy() | 58 void StyleRuleBase::destroy() |
59 { | 59 { |
60 switch (type()) { | 60 switch (type()) { |
61 case Style: | 61 case Style: |
62 delete static_cast<StyleRule*>(this); | 62 delete toStyleRule(this); |
63 return; | 63 return; |
64 case Page: | 64 case Page: |
65 delete static_cast<StyleRulePage*>(this); | 65 delete static_cast<StyleRulePage*>(this); |
66 return; | 66 return; |
67 case FontFace: | 67 case FontFace: |
68 delete static_cast<StyleRuleFontFace*>(this); | 68 delete static_cast<StyleRuleFontFace*>(this); |
69 return; | 69 return; |
70 case Media: | 70 case Media: |
71 delete static_cast<StyleRuleMedia*>(this); | 71 delete static_cast<StyleRuleMedia*>(this); |
72 return; | 72 return; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ASSERT_NOT_REACHED(); | 136 ASSERT_NOT_REACHED(); |
137 return 0; | 137 return 0; |
138 } | 138 } |
139 | 139 |
140 PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet
, CSSRule* parentRule) const | 140 PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet
, CSSRule* parentRule) const |
141 { | 141 { |
142 RefPtr<CSSRule> rule; | 142 RefPtr<CSSRule> rule; |
143 StyleRuleBase* self = const_cast<StyleRuleBase*>(this); | 143 StyleRuleBase* self = const_cast<StyleRuleBase*>(this); |
144 switch (type()) { | 144 switch (type()) { |
145 case Style: | 145 case Style: |
146 rule = CSSStyleRule::create(static_cast<StyleRule*>(self), parentSheet); | 146 rule = CSSStyleRule::create(toStyleRule(self), parentSheet); |
147 break; | 147 break; |
148 case Page: | 148 case Page: |
149 rule = CSSPageRule::create(static_cast<StyleRulePage*>(self), parentShee
t); | 149 rule = CSSPageRule::create(static_cast<StyleRulePage*>(self), parentShee
t); |
150 break; | 150 break; |
151 case FontFace: | 151 case FontFace: |
152 rule = CSSFontFaceRule::create(static_cast<StyleRuleFontFace*>(self), pa
rentSheet); | 152 rule = CSSFontFaceRule::create(static_cast<StyleRuleFontFace*>(self), pa
rentSheet); |
153 break; | 153 break; |
154 case Media: | 154 case Media: |
155 rule = CSSMediaRule::create(static_cast<StyleRuleMedia*>(self), parentSh
eet); | 155 rule = CSSMediaRule::create(static_cast<StyleRuleMedia*>(self), parentSh
eet); |
156 break; | 156 break; |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 m_properties = m_properties->mutableCopy(); | 389 m_properties = m_properties->mutableCopy(); |
390 return static_cast<MutableStylePropertySet*>(m_properties.get()); | 390 return static_cast<MutableStylePropertySet*>(m_properties.get()); |
391 } | 391 } |
392 | 392 |
393 void StyleRuleFilter::setProperties(PassRefPtr<StylePropertySet> properties) | 393 void StyleRuleFilter::setProperties(PassRefPtr<StylePropertySet> properties) |
394 { | 394 { |
395 m_properties = properties; | 395 m_properties = properties; |
396 } | 396 } |
397 | 397 |
398 } // namespace WebCore | 398 } // namespace WebCore |
OLD | NEW |