| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 m_childRuleCSSOMWrappers.insert(index, Member<CSSRule>(nullptr)); | 96 m_childRuleCSSOMWrappers.insert(index, Member<CSSRule>(nullptr)); |
| 97 return index; | 97 return index; |
| 98 } | 98 } |
| 99 | 99 |
| 100 void CSSGroupingRule::deleteRule(unsigned index, | 100 void CSSGroupingRule::deleteRule(unsigned index, |
| 101 ExceptionState& exceptionState) { | 101 ExceptionState& exceptionState) { |
| 102 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); | 102 ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size()); |
| 103 | 103 |
| 104 if (index >= m_groupRule->childRules().size()) { | 104 if (index >= m_groupRule->childRules().size()) { |
| 105 exceptionState.throwDOMException( | 105 exceptionState.throwDOMException( |
| 106 IndexSizeError, "the index " + String::number(index) + | 106 IndexSizeError, |
| 107 " is greated than the length of the rule list."); | 107 "the index " + String::number(index) + |
| 108 " is greated than the length of the rule list."); |
| 108 return; | 109 return; |
| 109 } | 110 } |
| 110 | 111 |
| 111 CSSStyleSheet::RuleMutationScope mutationScope(this); | 112 CSSStyleSheet::RuleMutationScope mutationScope(this); |
| 112 | 113 |
| 113 m_groupRule->wrapperRemoveRule(index); | 114 m_groupRule->wrapperRemoveRule(index); |
| 114 | 115 |
| 115 if (m_childRuleCSSOMWrappers[index]) | 116 if (m_childRuleCSSOMWrappers[index]) |
| 116 m_childRuleCSSOMWrappers[index]->setParentRule(0); | 117 m_childRuleCSSOMWrappers[index]->setParentRule(0); |
| 117 m_childRuleCSSOMWrappers.remove(index); | 118 m_childRuleCSSOMWrappers.remove(index); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 159 } |
| 159 | 160 |
| 160 DEFINE_TRACE(CSSGroupingRule) { | 161 DEFINE_TRACE(CSSGroupingRule) { |
| 161 CSSRule::trace(visitor); | 162 CSSRule::trace(visitor); |
| 162 visitor->trace(m_childRuleCSSOMWrappers); | 163 visitor->trace(m_childRuleCSSOMWrappers); |
| 163 visitor->trace(m_groupRule); | 164 visitor->trace(m_groupRule); |
| 164 visitor->trace(m_ruleListCSSOMWrapper); | 165 visitor->trace(m_ruleListCSSOMWrapper); |
| 165 } | 166 } |
| 166 | 167 |
| 167 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |