| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool WebFormElement::wasUserSubmitted() const | 65 bool WebFormElement::wasUserSubmitted() const |
| 66 { | 66 { |
| 67 return constUnwrap<HTMLFormElement>()->wasUserSubmitted(); | 67 return constUnwrap<HTMLFormElement>()->wasUserSubmitted(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void WebFormElement::getNamedElements(const WebString& name, | 70 void WebFormElement::getNamedElements(const WebString& name, |
| 71 WebVector<WebNode>& result) | 71 WebVector<WebNode>& result) |
| 72 { | 72 { |
| 73 WillBeHeapVector<RefPtrWillBeMember<Element>> tempVector; | 73 HeapVector<Member<Element>> tempVector; |
| 74 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); | 74 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); |
| 75 result.assign(tempVector); | 75 result.assign(tempVector); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
sult) const | 78 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
sult) const |
| 79 { | 79 { |
| 80 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); | 80 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); |
| 81 Vector<WebFormControlElement> formControlElements; | 81 Vector<WebFormControlElement> formControlElements; |
| 82 | 82 |
| 83 const FormAssociatedElement::List& associatedElements = form->associatedElem
ents(); | 83 const FormAssociatedElement::List& associatedElements = form->associatedElem
ents(); |
| 84 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg
in(); it != associatedElements.end(); ++it) { | 84 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg
in(); it != associatedElements.end(); ++it) { |
| 85 if ((*it)->isFormControlElement()) | 85 if ((*it)->isFormControlElement()) |
| 86 formControlElements.append(toHTMLFormControlElement(*it)); | 86 formControlElements.append(toHTMLFormControlElement(*it)); |
| 87 } | 87 } |
| 88 result.assign(formControlElements); | 88 result.assign(formControlElements); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool WebFormElement::checkValidity() | 91 bool WebFormElement::checkValidity() |
| 92 { | 92 { |
| 93 return unwrap<HTMLFormElement>()->checkValidity(); | 93 return unwrap<HTMLFormElement>()->checkValidity(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResul
t result) | 96 void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResul
t result) |
| 97 { | 97 { |
| 98 unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormEle
ment::AutocompleteResult>(result)); | 98 unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormEle
ment::AutocompleteResult>(result)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 WebFormElement::WebFormElement(const PassRefPtrWillBeRawPtr<HTMLFormElement>& e) | 101 WebFormElement::WebFormElement(const RawPtr<HTMLFormElement>& e) |
| 102 : WebElement(e) | 102 : WebElement(e) |
| 103 { | 103 { |
| 104 } | 104 } |
| 105 | 105 |
| 106 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, isHTMLFormElement(constUnwrap<Node>()
)); | 106 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, isHTMLFormElement(constUnwrap<Node>()
)); |
| 107 | 107 |
| 108 WebFormElement& WebFormElement::operator=(const PassRefPtrWillBeRawPtr<HTMLFormE
lement>& e) | 108 WebFormElement& WebFormElement::operator=(const RawPtr<HTMLFormElement>& e) |
| 109 { | 109 { |
| 110 m_private = e; | 110 m_private = e; |
| 111 return *this; | 111 return *this; |
| 112 } | 112 } |
| 113 | 113 |
| 114 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const | 114 WebFormElement::operator RawPtr<HTMLFormElement>() const |
| 115 { | 115 { |
| 116 return toHTMLFormElement(m_private.get()); | 116 return toHTMLFormElement(m_private.get()); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace blink | 119 } // namespace blink |
| OLD | NEW |