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

Unified Diff: Source/core/html/HTMLFormControlElement.cpp

Issue 60573007: Non-activated default buttons prevent implicit form submission. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Retire dated comment on button names Created 7 years, 1 month 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/HTMLFormControlElement.h ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlElement.cpp
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
index e3c52907a668e751fff8cea93f78764b3a88191a..b296b848d6718bfc7ee2c7934fa3b0266a166918 100644
--- a/Source/core/html/HTMLFormControlElement.cpp
+++ b/Source/core/html/HTMLFormControlElement.cpp
@@ -503,6 +503,11 @@ HTMLFormElement* HTMLFormControlElement::virtualForm() const
return FormAssociatedElement::form();
}
+bool HTMLFormControlElement::isSuccessfulSubmitButton() const
+{
+ return canBeSuccessfulSubmitButton() && !isDisabledFormControl();
+}
+
bool HTMLFormControlElement::isDefaultButtonForForm() const
{
return isSuccessfulSubmitButton() && form() && form()->defaultButton() == this;
« no previous file with comments | « Source/core/html/HTMLFormControlElement.h ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698