| 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #include "config.h" | 22 #include "config.h" |
| 23 #include "core/css/StyleRule.h" | 23 #include "core/css/StyleRule.h" |
| 24 | 24 |
| 25 #include "core/css/CSSFontFaceRule.h" | 25 #include "core/css/CSSFontFaceRule.h" |
| 26 #include "core/css/CSSImportRule.h" | 26 #include "core/css/CSSImportRule.h" |
| 27 #include "core/css/CSSKeyframesRule.h" | 27 #include "core/css/CSSKeyframesRule.h" |
| 28 #include "core/css/CSSMediaRule.h" | 28 #include "core/css/CSSMediaRule.h" |
| 29 #include "core/css/CSSNamespaceRule.h" |
| 29 #include "core/css/CSSPageRule.h" | 30 #include "core/css/CSSPageRule.h" |
| 30 #include "core/css/CSSStyleRule.h" | 31 #include "core/css/CSSStyleRule.h" |
| 31 #include "core/css/CSSSupportsRule.h" | 32 #include "core/css/CSSSupportsRule.h" |
| 32 #include "core/css/CSSViewportRule.h" | 33 #include "core/css/CSSViewportRule.h" |
| 33 #include "core/css/StyleRuleImport.h" | 34 #include "core/css/StyleRuleImport.h" |
| 34 #include "core/css/StyleRuleKeyframe.h" | 35 #include "core/css/StyleRuleKeyframe.h" |
| 35 #include "core/css/StyleRuleNamespace.h" | 36 #include "core/css/StyleRuleNamespace.h" |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 break; | 223 break; |
| 223 case Supports: | 224 case Supports: |
| 224 rule = CSSSupportsRule::create(toStyleRuleSupports(self), parentSheet); | 225 rule = CSSSupportsRule::create(toStyleRuleSupports(self), parentSheet); |
| 225 break; | 226 break; |
| 226 case Import: | 227 case Import: |
| 227 rule = CSSImportRule::create(toStyleRuleImport(self), parentSheet); | 228 rule = CSSImportRule::create(toStyleRuleImport(self), parentSheet); |
| 228 break; | 229 break; |
| 229 case Keyframes: | 230 case Keyframes: |
| 230 rule = CSSKeyframesRule::create(toStyleRuleKeyframes(self), parentSheet)
; | 231 rule = CSSKeyframesRule::create(toStyleRuleKeyframes(self), parentSheet)
; |
| 231 break; | 232 break; |
| 233 case Namespace: |
| 234 rule = CSSNamespaceRule::create(toStyleRuleNamespace(self), parentSheet)
; |
| 235 break; |
| 232 case Viewport: | 236 case Viewport: |
| 233 rule = CSSViewportRule::create(toStyleRuleViewport(self), parentSheet); | 237 rule = CSSViewportRule::create(toStyleRuleViewport(self), parentSheet); |
| 234 break; | 238 break; |
| 235 case Keyframe: | 239 case Keyframe: |
| 236 case Namespace: | |
| 237 case Charset: | 240 case Charset: |
| 238 ASSERT_NOT_REACHED(); | 241 ASSERT_NOT_REACHED(); |
| 239 return nullptr; | 242 return nullptr; |
| 240 } | 243 } |
| 241 if (parentRule) | 244 if (parentRule) |
| 242 rule->setParentRule(parentRule); | 245 rule->setParentRule(parentRule); |
| 243 return rule.release(); | 246 return rule.release(); |
| 244 } | 247 } |
| 245 | 248 |
| 246 unsigned StyleRule::averageSizeInBytes() | 249 unsigned StyleRule::averageSizeInBytes() |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 return *toMutableStylePropertySet(m_properties); | 428 return *toMutableStylePropertySet(m_properties); |
| 426 } | 429 } |
| 427 | 430 |
| 428 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) | 431 DEFINE_TRACE_AFTER_DISPATCH(StyleRuleViewport) |
| 429 { | 432 { |
| 430 visitor->trace(m_properties); | 433 visitor->trace(m_properties); |
| 431 StyleRuleBase::traceAfterDispatch(visitor); | 434 StyleRuleBase::traceAfterDispatch(visitor); |
| 432 } | 435 } |
| 433 | 436 |
| 434 } // namespace blink | 437 } // namespace blink |
| OLD | NEW |