Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 | 56 |
| 57 WebString WebFormElement::method() const { | 57 WebString WebFormElement::method() const { |
| 58 return constUnwrap<HTMLFormElement>()->method(); | 58 return constUnwrap<HTMLFormElement>()->method(); |
| 59 } | 59 } |
| 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 FormAssociatedElement::List& associatedElements = | 66 const ListedElement::List& associatedElements = form->associatedElements(); |
|
tkent
2016/12/02 13:24:37
Rename this variable to listedElements.
| |
| 67 form->associatedElements(); | 67 for (ListedElement::List::const_iterator it = associatedElements.begin(); |
| 68 for (FormAssociatedElement::List::const_iterator it = | |
| 69 associatedElements.begin(); | |
| 70 it != associatedElements.end(); ++it) { | 68 it != associatedElements.end(); ++it) { |
| 71 if ((*it)->isFormControlElement()) | 69 if ((*it)->isFormControlElement()) |
| 72 formControlElements.append(toHTMLFormControlElement(*it)); | 70 formControlElements.append(toHTMLFormControlElement(*it)); |
| 73 } | 71 } |
| 74 result.assign(formControlElements); | 72 result.assign(formControlElements); |
| 75 } | 73 } |
| 76 | 74 |
| 77 WebFormElement::WebFormElement(HTMLFormElement* e) : WebElement(e) {} | 75 WebFormElement::WebFormElement(HTMLFormElement* e) : WebElement(e) {} |
| 78 | 76 |
| 79 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, | 77 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, |
| 80 isHTMLFormElement(constUnwrap<Node>())); | 78 isHTMLFormElement(constUnwrap<Node>())); |
| 81 | 79 |
| 82 WebFormElement& WebFormElement::operator=(HTMLFormElement* e) { | 80 WebFormElement& WebFormElement::operator=(HTMLFormElement* e) { |
| 83 m_private = e; | 81 m_private = e; |
| 84 return *this; | 82 return *this; |
| 85 } | 83 } |
| 86 | 84 |
| 87 WebFormElement::operator HTMLFormElement*() const { | 85 WebFormElement::operator HTMLFormElement*() const { |
| 88 return toHTMLFormElement(m_private.get()); | 86 return toHTMLFormElement(m_private.get()); |
| 89 } | 87 } |
| 90 | 88 |
| 91 } // namespace blink | 89 } // namespace blink |
| OLD | NEW |