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

Side by Side Diff: third_party/WebKit/Source/core/css/StylePropertySet.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, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (returnText) 223 if (returnText)
224 *returnText = ""; 224 *returnText = "";
225 return false; 225 return false;
226 } 226 }
227 227
228 if (returnText) 228 if (returnText)
229 *returnText = propertyAt(propertyIndex).value().cssText(); 229 *returnText = propertyAt(propertyIndex).value().cssText();
230 230
231 // A more efficient removal strategy would involve marking entries as empty 231 // A more efficient removal strategy would involve marking entries as empty
232 // and sweeping them when the vector grows too big. 232 // and sweeping them when the vector grows too big.
233 m_propertyVector.remove(propertyIndex); 233 m_propertyVector.erase(propertyIndex);
234 234
235 return true; 235 return true;
236 } 236 }
237 237
238 template <typename T> 238 template <typename T>
239 bool MutableStylePropertySet::removeProperty(T property, String* returnText) { 239 bool MutableStylePropertySet::removeProperty(T property, String* returnText) {
240 if (removeShorthandProperty(property)) { 240 if (removeShorthandProperty(property)) {
241 // FIXME: Return an equivalent shorthand when possible. 241 // FIXME: Return an equivalent shorthand when possible.
242 if (returnText) 242 if (returnText)
243 *returnText = ""; 243 *returnText = "";
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 612
613 MutableStylePropertySet* MutableStylePropertySet::create( 613 MutableStylePropertySet* MutableStylePropertySet::create(
614 const CSSProperty* properties, 614 const CSSProperty* properties,
615 unsigned count) { 615 unsigned count) {
616 return new MutableStylePropertySet(properties, count); 616 return new MutableStylePropertySet(properties, count);
617 } 617 }
618 618
619 DEFINE_TRACE(CSSLazyPropertyParser) {} 619 DEFINE_TRACE(CSSLazyPropertyParser) {}
620 620
621 } // namespace blink 621 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQuery.cpp ('k') | third_party/WebKit/Source/core/css/StyleRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698