| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 return 0; | 306 return 0; |
| 307 } | 307 } |
| 308 if (!m_childRuleCSSOMWrappers.isEmpty()) | 308 if (!m_childRuleCSSOMWrappers.isEmpty()) |
| 309 m_childRuleCSSOMWrappers.insert(index, RefPtrWillBeMember<CSSRule>(nullp
tr)); | 309 m_childRuleCSSOMWrappers.insert(index, RefPtrWillBeMember<CSSRule>(nullp
tr)); |
| 310 | 310 |
| 311 return index; | 311 return index; |
| 312 } | 312 } |
| 313 | 313 |
| 314 unsigned CSSStyleSheet::insertRule(const String& rule, ExceptionState& exception
State) | 314 unsigned CSSStyleSheet::insertRule(const String& rule, ExceptionState& exception
State) |
| 315 { | 315 { |
| 316 UseCounter::countDeprecation(callingExecutionContext(V8PerIsolateData::mainT
hreadIsolate()), UseCounter::CSSStyleSheetInsertRuleOptionalArg); | 316 UseCounter::countDeprecation(currentExecutionContext(V8PerIsolateData::mainT
hreadIsolate()), UseCounter::CSSStyleSheetInsertRuleOptionalArg); |
| 317 return insertRule(rule, 0, exceptionState); | 317 return insertRule(rule, 0, exceptionState); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void CSSStyleSheet::deleteRule(unsigned index, ExceptionState& exceptionState) | 320 void CSSStyleSheet::deleteRule(unsigned index, ExceptionState& exceptionState) |
| 321 { | 321 { |
| 322 ASSERT(m_childRuleCSSOMWrappers.isEmpty() || m_childRuleCSSOMWrappers.size()
== m_contents->ruleCount()); | 322 ASSERT(m_childRuleCSSOMWrappers.isEmpty() || m_childRuleCSSOMWrappers.size()
== m_contents->ruleCount()); |
| 323 | 323 |
| 324 if (index >= length()) { | 324 if (index >= length()) { |
| 325 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is larger than the maximum index (" + String::numbe
r(length() - 1) + ")."); | 325 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is larger than the maximum index (" + String::numbe
r(length() - 1) + ")."); |
| 326 return; | 326 return; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 visitor->trace(m_mediaQueries); | 450 visitor->trace(m_mediaQueries); |
| 451 visitor->trace(m_ownerNode); | 451 visitor->trace(m_ownerNode); |
| 452 visitor->trace(m_ownerRule); | 452 visitor->trace(m_ownerRule); |
| 453 visitor->trace(m_mediaCSSOMWrapper); | 453 visitor->trace(m_mediaCSSOMWrapper); |
| 454 visitor->trace(m_childRuleCSSOMWrappers); | 454 visitor->trace(m_childRuleCSSOMWrappers); |
| 455 visitor->trace(m_ruleListCSSOMWrapper); | 455 visitor->trace(m_ruleListCSSOMWrapper); |
| 456 StyleSheet::trace(visitor); | 456 StyleSheet::trace(visitor); |
| 457 } | 457 } |
| 458 | 458 |
| 459 } // namespace blink | 459 } // namespace blink |
| OLD | NEW |