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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 65 void WebFormElement::getNamedElements(const WebString& name,
66 WebVector<WebNode>& result) 66 WebVector<WebNode>& result)
67 { 67 {
68 WillBeHeapVector<RefPtrWillBeMember<Element>> tempVector; 68 HeapVector<Member<Element>> tempVector;
69 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); 69 unwrap<HTMLFormElement>()->getNamedElements(name, tempVector);
70 result.assign(tempVector); 70 result.assign(tempVector);
71 } 71 }
72 72
73 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re sult) const 73 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re sult) const
74 { 74 {
75 const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); 75 const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
76 Vector<WebFormControlElement> formControlElements; 76 Vector<WebFormControlElement> formControlElements;
77 77
78 const FormAssociatedElement::List& associatedElements = form->associatedElem ents(); 78 const FormAssociatedElement::List& associatedElements = form->associatedElem ents();
79 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg in(); it != associatedElements.end(); ++it) { 79 for (FormAssociatedElement::List::const_iterator it = associatedElements.beg in(); it != associatedElements.end(); ++it) {
80 if ((*it)->isFormControlElement()) 80 if ((*it)->isFormControlElement())
81 formControlElements.append(toHTMLFormControlElement(*it)); 81 formControlElements.append(toHTMLFormControlElement(*it));
82 } 82 }
83 result.assign(formControlElements); 83 result.assign(formControlElements);
84 } 84 }
85 85
86 bool WebFormElement::checkValidity() 86 bool WebFormElement::checkValidity()
87 { 87 {
88 return unwrap<HTMLFormElement>()->checkValidity(); 88 return unwrap<HTMLFormElement>()->checkValidity();
89 } 89 }
90 90
91 void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResul t result) 91 void WebFormElement::finishRequestAutocomplete(WebFormElement::AutocompleteResul t result)
92 { 92 {
93 unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormEle ment::AutocompleteResult>(result)); 93 unwrap<HTMLFormElement>()->finishRequestAutocomplete(static_cast<HTMLFormEle ment::AutocompleteResult>(result));
94 } 94 }
95 95
96 WebFormElement::WebFormElement(const PassRefPtrWillBeRawPtr<HTMLFormElement>& e) 96 WebFormElement::WebFormElement(const RawPtr<HTMLFormElement>& e)
97 : WebElement(e) 97 : WebElement(e)
98 { 98 {
99 } 99 }
100 100
101 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, isHTMLFormElement(constUnwrap<Node>() )); 101 DEFINE_WEB_NODE_TYPE_CASTS(WebFormElement, isHTMLFormElement(constUnwrap<Node>() ));
102 102
103 WebFormElement& WebFormElement::operator=(const PassRefPtrWillBeRawPtr<HTMLFormE lement>& e) 103 WebFormElement& WebFormElement::operator=(const RawPtr<HTMLFormElement>& e)
104 { 104 {
105 m_private = e; 105 m_private = e;
106 return *this; 106 return *this;
107 } 107 }
108 108
109 WebFormElement::operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const 109 WebFormElement::operator RawPtr<HTMLFormElement>() const
110 { 110 {
111 return toHTMLFormElement(m_private.get()); 111 return toHTMLFormElement(m_private.get());
112 } 112 }
113 113
114 } // namespace blink 114 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFormControlElement.cpp ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698