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

Side by Side Diff: third_party/WebKit/Source/web/WebFormElement.cpp

Issue 2612903007: Migrate WTF::Vector::append() to ::push_back() [part 15 of N] (Closed)
Patch Set: Created 3 years, 11 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 void WebFormElement::getFormControlElements( 61 void WebFormElement::getFormControlElements(
62 WebVector<WebFormControlElement>& result) const { 62 WebVector<WebFormControlElement>& result) const {
63 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); 63 const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
64 Vector<WebFormControlElement> formControlElements; 64 Vector<WebFormControlElement> formControlElements;
65 65
66 const ListedElement::List& listedElements = form->listedElements(); 66 const ListedElement::List& listedElements = form->listedElements();
67 for (ListedElement::List::const_iterator it = listedElements.begin(); 67 for (ListedElement::List::const_iterator it = listedElements.begin();
68 it != listedElements.end(); ++it) { 68 it != listedElements.end(); ++it) {
69 if ((*it)->isFormControlElement()) 69 if ((*it)->isFormControlElement())
70 formControlElements.append(toHTMLFormControlElement(*it)); 70 formControlElements.push_back(toHTMLFormControlElement(*it));
71 } 71 }
72 result.assign(formControlElements); 72 result.assign(formControlElements);
73 } 73 }
74 74
75 WebFormElement::WebFormElement(HTMLFormElement* e) : WebElement(e) {} 75 WebFormElement::WebFormElement(HTMLFormElement* e) : WebElement(e) {}
76 76
77 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, 77 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement,
78 isHTMLFormElement(constUnwrap<Node>())); 78 isHTMLFormElement(constUnwrap<Node>()));
79 79
80 WebFormElement& WebFormElement::operator=(HTMLFormElement* e) { 80 WebFormElement& WebFormElement::operator=(HTMLFormElement* e) {
81 m_private = e; 81 m_private = e;
82 return *this; 82 return *this;
83 } 83 }
84 84
85 WebFormElement::operator HTMLFormElement*() const { 85 WebFormElement::operator HTMLFormElement*() const {
86 return toHTMLFormElement(m_private.get()); 86 return toHTMLFormElement(m_private.get());
87 } 87 }
88 88
89 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFileChooserCompletionImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698