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

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

Issue 2261393002: Fixed the behaviour of form submit to Firefox: form does not submit once it has been removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review change Created 4 years, 4 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
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 53b47e973450e2b06b2e9d55df92b5d233e12752..491608592bab77800dda6f306d3f01daa1befdc2 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -350,9 +350,12 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton)
LocalFrame* frame = document().frame();
if (!view || !frame || !frame->page())
return;
+
+ // Do not submit if the form is not attached to the document.
tkent 2016/08/25 00:52:54 I don't think this comment and the CL description
iclelland 2016/08/25 13:17:30 Agreed -- that's better. (I looked for that kind o
lunalu1 2016/08/25 15:05:35 Done.
+ // This matches the behaviour in Firefox.
// See crbug.com/586749.
tkent 2016/08/25 00:52:54 Remove this line. The bug won't be so helpful aft
lunalu1 2016/08/25 15:05:35 Done.
if (!isConnected())
- UseCounter::count(document(), UseCounter::FormSubmissionNotInDocumentTree);
tkent 2016/08/25 00:52:54 Need to remove FormSubmissionNotInDocumentTree fro
+ return;
if (m_isSubmitting)
return;

Powered by Google App Engine
This is Rietveld 408576698