| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above | 9 * 1. Redistributions of source code must retain the above |
| 10 * copyright notice, this list of conditions and the following | 10 * copyright notice, this list of conditions and the following |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 CSSGroupingRule::CSSGroupingRule(StyleRuleGroup* groupRule, CSSStyleSheet* paren
t) | 44 CSSGroupingRule::CSSGroupingRule(StyleRuleGroup* groupRule, CSSStyleSheet* paren
t) |
| 45 : CSSRule(parent) | 45 : CSSRule(parent) |
| 46 , m_groupRule(groupRule) | 46 , m_groupRule(groupRule) |
| 47 , m_childRuleCSSOMWrappers(groupRule->childRules().size()) | 47 , m_childRuleCSSOMWrappers(groupRule->childRules().size()) |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 CSSGroupingRule::~CSSGroupingRule() | 51 CSSGroupingRule::~CSSGroupingRule() |
| 52 { | 52 { |
| 53 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); | 53 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); |
| 54 #if !ENABLE(OILPAN) |
| 54 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { | 55 for (unsigned i = 0; i < m_childRuleCSSOMWrappers.size(); ++i) { |
| 55 if (m_childRuleCSSOMWrappers[i]) | 56 if (m_childRuleCSSOMWrappers[i]) |
| 56 m_childRuleCSSOMWrappers[i]->setParentRule(0); | 57 m_childRuleCSSOMWrappers[i]->setParentRule(0); |
| 57 } | 58 } |
| 59 #endif |
| 58 } | 60 } |
| 59 | 61 |
| 60 unsigned CSSGroupingRule::insertRule(const String& ruleString, unsigned index, E
xceptionState& exceptionState) | 62 unsigned CSSGroupingRule::insertRule(const String& ruleString, unsigned index, E
xceptionState& exceptionState) |
| 61 { | 63 { |
| 62 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); | 64 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); |
| 63 | 65 |
| 64 if (index > m_groupRule->childRules().size()) { | 66 if (index > m_groupRule->childRules().size()) { |
| 65 exceptionState.throwDOMException(IndexSizeError, "the index " + String::
number(index) + " must be less than or equal to the length of the rule list."); | 67 exceptionState.throwDOMException(IndexSizeError, "the index " + String::
number(index) + " must be less than or equal to the length of the rule list."); |
| 66 return 0; | 68 return 0; |
| 67 } | 69 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 155 |
| 154 void CSSGroupingRule::trace(Visitor* visitor) | 156 void CSSGroupingRule::trace(Visitor* visitor) |
| 155 { | 157 { |
| 156 CSSRule::trace(visitor); | 158 CSSRule::trace(visitor); |
| 157 #if ENABLE(OILPAN) | 159 #if ENABLE(OILPAN) |
| 158 visitor->trace(m_childRuleCSSOMWrappers); | 160 visitor->trace(m_childRuleCSSOMWrappers); |
| 159 #endif | 161 #endif |
| 160 } | 162 } |
| 161 | 163 |
| 162 } // namespace WebCore | 164 } // namespace WebCore |
| OLD | NEW |