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

Unified Diff: Source/core/html/forms/SubmitInputType.cpp

Issue 27746003: Have InputType factories take an HTMLInputElement reference in parameter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/SubmitInputType.h ('k') | Source/core/html/forms/TelephoneInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/SubmitInputType.cpp
diff --git a/Source/core/html/forms/SubmitInputType.cpp b/Source/core/html/forms/SubmitInputType.cpp
index 260f9665e785220144a2d18d800528cc8edc85ce..cda83bfca94d8f2dbe94e040fd63c515ac432a50 100644
--- a/Source/core/html/forms/SubmitInputType.cpp
+++ b/Source/core/html/forms/SubmitInputType.cpp
@@ -42,7 +42,7 @@
namespace WebCore {
-PassRefPtr<InputType> SubmitInputType::create(HTMLInputElement* element)
+PassRefPtr<InputType> SubmitInputType::create(HTMLInputElement& element)
{
return adoptRef(new SubmitInputType(element));
}
@@ -54,9 +54,9 @@ const AtomicString& SubmitInputType::formControlType() const
bool SubmitInputType::appendFormData(FormDataList& encoding, bool) const
{
- if (!element()->isActivatedSubmit())
+ if (!element().isActivatedSubmit())
return false;
- encoding.appendData(element()->name(), element()->valueWithDefault());
+ encoding.appendData(element().name(), element().valueWithDefault());
return true;
}
@@ -67,7 +67,7 @@ bool SubmitInputType::supportsRequired() const
void SubmitInputType::handleDOMActivateEvent(Event* event)
{
- RefPtr<HTMLInputElement> element = this->element();
+ RefPtr<HTMLInputElement> element(this->element());
if (element->isDisabledFormControl() || !element->form())
return;
element->setActivatedSubmit(true);
« no previous file with comments | « Source/core/html/forms/SubmitInputType.h ('k') | Source/core/html/forms/TelephoneInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698