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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.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 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after
3741 } 3741 }
3742 3742
3743 void Element::detachAttrNodeFromElementWithValue(Attr* attrNode, 3743 void Element::detachAttrNodeFromElementWithValue(Attr* attrNode,
3744 const AtomicString& value) { 3744 const AtomicString& value) {
3745 DCHECK(attrNodeList()); 3745 DCHECK(attrNodeList());
3746 attrNode->detachFromElementWithValue(value); 3746 attrNode->detachFromElementWithValue(value);
3747 3747
3748 AttrNodeList* list = attrNodeList(); 3748 AttrNodeList* list = attrNodeList();
3749 size_t index = list->find(attrNode); 3749 size_t index = list->find(attrNode);
3750 DCHECK_NE(index, kNotFound); 3750 DCHECK_NE(index, kNotFound);
3751 list->remove(index); 3751 list->erase(index);
3752 if (list->isEmpty()) 3752 if (list->isEmpty())
3753 removeAttrNodeList(); 3753 removeAttrNodeList();
3754 } 3754 }
3755 3755
3756 void Element::detachAllAttrNodesFromElement() { 3756 void Element::detachAllAttrNodesFromElement() {
3757 AttrNodeList* list = this->attrNodeList(); 3757 AttrNodeList* list = this->attrNodeList();
3758 if (!list) 3758 if (!list)
3759 return; 3759 return;
3760 3760
3761 AttributeCollection attributes = elementData()->attributes(); 3761 AttributeCollection attributes = elementData()->attributes();
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 } 4171 }
4172 4172
4173 DEFINE_TRACE_WRAPPERS(Element) { 4173 DEFINE_TRACE_WRAPPERS(Element) {
4174 if (hasRareData()) { 4174 if (hasRareData()) {
4175 visitor->traceWrappers(elementRareData()); 4175 visitor->traceWrappers(elementRareData());
4176 } 4176 }
4177 ContainerNode::traceWrappers(visitor); 4177 ContainerNode::traceWrappers(visitor);
4178 } 4178 }
4179 4179
4180 } // namespace blink 4180 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698