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

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

Issue 1954823002: Remove WebFormElement::getNamedElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/public/web/WebFormElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 WebString WebFormElement::name() const 55 WebString WebFormElement::name() const
56 { 56 {
57 return constUnwrap<HTMLFormElement>()->name(); 57 return constUnwrap<HTMLFormElement>()->name();
58 } 58 }
59 59
60 WebString WebFormElement::method() const 60 WebString WebFormElement::method() const
61 { 61 {
62 return constUnwrap<HTMLFormElement>()->method(); 62 return constUnwrap<HTMLFormElement>()->method();
63 } 63 }
64 64
65 void WebFormElement::getNamedElements(const WebString& name,
66 WebVector<WebNode>& result)
67 {
68 HeapVector<Member<Element>> tempVector;
69 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector);
70 result.assign(tempVector);
71 }
72
73 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re sult) const 65 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re sult) const
74 { 66 {
75 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); 67 const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
76 Vector<WebFormControlElement> formControlElements; 68 Vector<WebFormControlElement> formControlElements;
77 69
78 const FormAssociatedElement::List& associatedElements = form->associatedElem ents(); 70 const FormAssociatedElement::List& associatedElements = form->associatedElem ents();
79 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg in(); it != associatedElements.end(); ++it) { 71 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg in(); it != associatedElements.end(); ++it) {
80 if ((*it)->isFormControlElement()) 72 if ((*it)->isFormControlElement())
81 formControlElements.append(toHTMLFormControlElement(*it)); 73 formControlElements.append(toHTMLFormControlElement(*it));
82 } 74 }
(...skipping 22 matching lines...) Expand all
105 m_private = e; 97 m_private = e;
106 return *this; 98 return *this;
107 } 99 }
108 100
109 WebFormElement::operator HTMLFormElement*() const 101 WebFormElement::operator HTMLFormElement*() const
110 { 102 {
111 return toHTMLFormElement(m_private.get()); 103 return toHTMLFormElement(m_private.get());
112 } 104 }
113 105
114 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/public/web/WebFormElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698