Title: [288987] branches/safari-613-branch
Revision
288987
Author
[email protected]
Date
2022-02-02 12:41:05 -0800 (Wed, 02 Feb 2022)

Log Message

Cherry-pick r288955. rdar://problem/88359001

    Unreviewed, reverting r286988.
    https://bugs.webkit.org/show_bug.cgi?id=236006

    Broke form submission for multiple <input type='image'>

    Reverted changeset:

    "A FormData constructed in the form's submit event listener
    shouldn't include the submitter"
    https://bugs.webkit.org/show_bug.cgi?id=234069
    https://commits.webkit.org/r286988

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (288986 => 288987)


--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-02-02 20:41:01 UTC (rev 288986)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-02-02 20:41:05 UTC (rev 288987)
@@ -1,3 +1,35 @@
+2022-02-02  Russell Epstein  <[email protected]>
+
+        Cherry-pick r288955. rdar://problem/88359001
+
+    Unreviewed, reverting r286988.
+    https://bugs.webkit.org/show_bug.cgi?id=236006
+    
+    Broke form submission for multiple <input type='image'>
+    
+    Reverted changeset:
+    
+    "A FormData constructed in the form's submit event listener
+    shouldn't include the submitter"
+    https://bugs.webkit.org/show_bug.cgi?id=234069
+    https://commits.webkit.org/r286988
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-02  Commit Queue  <[email protected]>
+
+            Unreviewed, reverting r286988.
+            https://bugs.webkit.org/show_bug.cgi?id=236006
+
+            Broke form submission for multiple <input type='image'>
+
+            Reverted changeset:
+
+            "A FormData constructed in the form's submit event listener
+            shouldn't include the submitter"
+            https://bugs.webkit.org/show_bug.cgi?id=234069
+            https://commits.webkit.org/r286988
+
 2022-01-24  Alan Coon  <[email protected]>
 
         Cherry-pick r288304. rdar://problem/87836459

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt (288986 => 288987)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt	2022-02-02 20:41:01 UTC (rev 288986)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt	2022-02-02 20:41:05 UTC (rev 288987)
@@ -21,5 +21,5 @@
 PASS "formData" IDL attribute should have entries for form-associated elements in the first event handler, and the second handler can read entries set by the first handler.
 PASS Entries added to "formData" IDL attribute should be submitted.
 PASS Entries added to the "formdata" IDL attribute shouldn't be newline normalized in the resulting FormData
-PASS The constructed FormData object should not contain an entry for the submit button that was used to submit the form.
+FAIL The constructed FormData object should not contain an entry for the submit button that was used to submit the form. assert_false: expected false got true
 

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (288986 => 288987)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-02 20:41:01 UTC (rev 288986)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-02 20:41:05 UTC (rev 288987)
@@ -1,5 +1,37 @@
 2022-02-02  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288955. rdar://problem/88359001
+
+    Unreviewed, reverting r286988.
+    https://bugs.webkit.org/show_bug.cgi?id=236006
+    
+    Broke form submission for multiple <input type='image'>
+    
+    Reverted changeset:
+    
+    "A FormData constructed in the form's submit event listener
+    shouldn't include the submitter"
+    https://bugs.webkit.org/show_bug.cgi?id=234069
+    https://commits.webkit.org/r286988
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-02  Commit Queue  <[email protected]>
+
+            Unreviewed, reverting r286988.
+            https://bugs.webkit.org/show_bug.cgi?id=236006
+
+            Broke form submission for multiple <input type='image'>
+
+            Reverted changeset:
+
+            "A FormData constructed in the form's submit event listener
+            shouldn't include the submitter"
+            https://bugs.webkit.org/show_bug.cgi?id=234069
+            https://commits.webkit.org/r286988
+
+2022-02-02  Russell Epstein  <[email protected]>
+
         Cherry-pick r288423. rdar://problem/87701738
 
     m_lastStyleChangeEventStyle null ptr deref for accelerated CSS Animation with no duration and an implicit keyframe

Modified: branches/safari-613-branch/Source/WebCore/html/HTMLButtonElement.cpp (288986 => 288987)


--- branches/safari-613-branch/Source/WebCore/html/HTMLButtonElement.cpp	2022-02-02 20:41:01 UTC (rev 288986)
+++ branches/safari-613-branch/Source/WebCore/html/HTMLButtonElement.cpp	2022-02-02 20:41:05 UTC (rev 288987)
@@ -146,6 +146,7 @@
 
             if (auto currentForm = form()) {
                 if (m_type == SUBMIT) {
+                    SetForScope<bool> activatedSubmitState(m_isActivatedSubmit, true);
                     currentForm->submitIfPossible(&event, this);
                 }
 

Modified: branches/safari-613-branch/Source/WebCore/html/ImageInputType.cpp (288986 => 288987)


--- branches/safari-613-branch/Source/WebCore/html/ImageInputType.cpp	2022-02-02 20:41:01 UTC (rev 288986)
+++ branches/safari-613-branch/Source/WebCore/html/ImageInputType.cpp	2022-02-02 20:41:05 UTC (rev 288987)
@@ -87,6 +87,8 @@
 
     Ref<HTMLFormElement> protectedForm(*protectedElement->form());
 
+    protectedElement->setActivatedSubmit(true);
+
     m_clickLocation = IntPoint();
     if (event.underlyingEvent()) {
         Event& underlyingEvent = *event.underlyingEvent();
@@ -104,6 +106,7 @@
     if (auto currentForm = protectedElement->form())
         currentForm->submitIfPossible(&event); // Event handlers can run.
 
+    protectedElement->setActivatedSubmit(false);
     event.setDefaultHandled();
 }
 

Modified: branches/safari-613-branch/Source/WebCore/html/SubmitInputType.cpp (288986 => 288987)


--- branches/safari-613-branch/Source/WebCore/html/SubmitInputType.cpp	2022-02-02 20:41:01 UTC (rev 288986)
+++ branches/safari-613-branch/Source/WebCore/html/SubmitInputType.cpp	2022-02-02 20:41:05 UTC (rev 288987)
@@ -74,8 +74,10 @@
     // the Form or button relationships.
     protectedElement->document().updateLayoutIgnorePendingStylesheets();
 
+    protectedElement->setActivatedSubmit(true);
     if (RefPtr currentForm = protectedElement->form())
         currentForm->submitIfPossible(&event, element()); // Event handlers can run.
+    protectedElement->setActivatedSubmit(false);
     event.setDefaultHandled();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to