| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void WebFormElement::submit() | 73 void WebFormElement::submit() |
| 74 { | 74 { |
| 75 unwrap<HTMLFormElement>()->submit(); | 75 unwrap<HTMLFormElement>()->submit(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void WebFormElement::getNamedElements(const WebString& name, | 78 void WebFormElement::getNamedElements(const WebString& name, |
| 79 WebVector<WebNode>& result) | 79 WebVector<WebNode>& result) |
| 80 { | 80 { |
| 81 Vector<RefPtr<Element> > tempVector; | 81 WillBeHeapVector<RefPtrWillBeMember<Element> > tempVector; |
| 82 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); | 82 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); |
| 83 #if ENABLE(OILPAN) | |
| 84 // FIXME: The second argument of HTMLFormElement::getNamedElements should be | |
| 85 // HeapVector<Member<Element>>. | |
| 86 Vector<WebNode> tempVector2; | |
| 87 tempVector2.reserveCapacity(tempVector.size()); | |
| 88 for (size_t i = 0; i < tempVector.size(); ++i) | |
| 89 tempVector2.append(WebNode(tempVector[i].get())); | |
| 90 result.assign(tempVector2); | |
| 91 #else | |
| 92 result.assign(tempVector); | 83 result.assign(tempVector); |
| 93 #endif | |
| 94 } | 84 } |
| 95 | 85 |
| 96 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
sult) const | 86 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
sult) const |
| 97 { | 87 { |
| 98 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); | 88 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); |
| 99 Vector<WebFormControlElement> formControlElements; | 89 Vector<WebFormControlElement> formControlElements; |
| 100 | 90 |
| 101 const FormAssociatedElement::List& associatedElements = form->associatedElem
ents(); | 91 const FormAssociatedElement::List& associatedElements = form->associatedElem
ents(); |
| 102 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg
in(); it != associatedElements.end(); ++it) { | 92 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg
in(); it != associatedElements.end(); ++it) { |
| 103 if ((*it)->isFormControlElement()) | 93 if ((*it)->isFormControlElement()) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 126 m_private = e; | 116 m_private = e; |
| 127 return *this; | 117 return *this; |
| 128 } | 118 } |
| 129 | 119 |
| 130 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const | 120 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const |
| 131 { | 121 { |
| 132 return toHTMLFormElement(m_private.get()); | 122 return toHTMLFormElement(m_private.get()); |
| 133 } | 123 } |
| 134 | 124 |
| 135 } // namespace blink | 125 } // namespace blink |
| OLD | NEW |