Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 bool success = m_contents->wrapperDeleteRule(index); 332 bool success = m_contents->wrapperDeleteRule(index);
333 if (!success) { 333 if (!success) {
334 exceptionState.throwDOMException(InvalidStateError, 334 exceptionState.throwDOMException(InvalidStateError,
335 "Failed to delete rule"); 335 "Failed to delete rule");
336 return; 336 return;
337 } 337 }
338 338
339 if (!m_childRuleCSSOMWrappers.isEmpty()) { 339 if (!m_childRuleCSSOMWrappers.isEmpty()) {
340 if (m_childRuleCSSOMWrappers[index]) 340 if (m_childRuleCSSOMWrappers[index])
341 m_childRuleCSSOMWrappers[index]->setParentStyleSheet(0); 341 m_childRuleCSSOMWrappers[index]->setParentStyleSheet(0);
342 m_childRuleCSSOMWrappers.remove(index); 342 m_childRuleCSSOMWrappers.erase(index);
343 } 343 }
344 } 344 }
345 345
346 int CSSStyleSheet::addRule(const String& selector, 346 int CSSStyleSheet::addRule(const String& selector,
347 const String& style, 347 const String& style,
348 int index, 348 int index,
349 ExceptionState& exceptionState) { 349 ExceptionState& exceptionState) {
350 StringBuilder text; 350 StringBuilder text;
351 text.append(selector); 351 text.append(selector);
352 text.append(" { "); 352 text.append(" { ");
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 visitor->trace(m_deviceDependentMediaQueryResults); 450 visitor->trace(m_deviceDependentMediaQueryResults);
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSValueList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698