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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormElement.cpp

Issue 2416033002: Fixed the behaviour of form submit to match the standard: no submit is taken place when the form is… (Closed)
Patch Set: Added a test-case (submit cloned form) in third_party/WebKit/LayoutTests/fast/forms/submit-form-not… Created 4 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 | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLFormElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
index dd75c5daae1fbcb830b111b104382efebc578db8..3e145614b542b71d9beab41bc90788b2d360dd38 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -347,9 +347,12 @@ void HTMLFormElement::submit(Event* event,
if (!view || !frame || !frame->page())
return;
- // See crbug.com/586749.
+ // https://html.spec.whatwg.org/multipage/forms.html#form-submission-algorithm
+ // 2. If form document is not connected, has no associated browsing context,
+ // or its active sandboxing flag set has its sandboxed forms browsing
+ // context flag set, then abort these steps without doing anything.
if (!isConnected())
- UseCounter::count(document(), UseCounter::FormSubmissionNotInDocumentTree);
+ return;
tkent 2016/10/13 22:19:06 Let's show a console warning in order to notice wh
lunalu1 2016/10/14 15:08:45 Done.
if (m_isSubmitting)
return;
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698