RESOLVED LATER 213341
Move some form submission logic into HTMLFormElement
https://bugs.webkit.org/show_bug.cgi?id=213341
Summary Move some form submission logic into HTMLFormElement
Rob Buis
Reported 2020-06-18 07:40:09 PDT
Move form submission logic into HTMLFrameElement, this allows us to remove some state and complexity out of FrameLoader.
Attachments
Patch (10.77 KB, patch)
2020-06-18 07:59 PDT, Rob Buis
no flags
Patch (10.76 KB, patch)
2020-06-18 09:11 PDT, Rob Buis
no flags
Patch (10.75 KB, patch)
2020-06-18 11:49 PDT, Rob Buis
no flags
Patch (7.08 KB, patch)
2020-06-23 02:09 PDT, Rob Buis
no flags
Patch (7.08 KB, patch)
2020-06-23 05:46 PDT, Rob Buis
no flags
Patch (7.08 KB, patch)
2020-06-23 08:38 PDT, Rob Buis
no flags
Patch (8.04 KB, patch)
2020-06-24 10:43 PDT, Rob Buis
no flags
Rob Buis
Comment 1 2020-06-18 07:59:35 PDT
Chris Dumez
Comment 2 2020-06-18 08:30:03 PDT
Comment on attachment 402208 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402208&action=review > Source/WebCore/ChangeLog:3 > + Move form submission logic into HTMLFrameElement You probably mean HTMLFormElement. HTMLFrameElement would not make much sense.
Rob Buis
Comment 3 2020-06-18 08:44:20 PDT
Comment on attachment 402208 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402208&action=review >> Source/WebCore/ChangeLog:3 >> + Move form submission logic into HTMLFrameElement > > You probably mean HTMLFormElement. HTMLFrameElement would not make much sense. Thanks Chris, you are correct, will fix. I was doing too many things at the same time...
Rob Buis
Comment 4 2020-06-18 09:11:58 PDT
Rob Buis
Comment 5 2020-06-18 11:49:25 PDT
Rob Buis
Comment 6 2020-06-23 02:09:06 PDT
Rob Buis
Comment 7 2020-06-23 05:46:09 PDT
Rob Buis
Comment 8 2020-06-23 08:38:07 PDT
Rob Buis
Comment 9 2020-06-24 10:43:06 PDT
Darin Adler
Comment 10 2020-06-24 12:52:52 PDT
Comment on attachment 402662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402662&action=review > Source/WebCore/ChangeLog:9 > + Move some form submission logic into HTMLFormElement, this > + allows us to remove some state and complexity out of FrameLoader. Generally looks OK. It’s a little sad when an HTML element class has so much of this sort of logic, but on balance I agree that this is an improvement. > Source/WebCore/html/HTMLFormElement.cpp:383 > + ASSERT(!formSubmission->state().sourceDocument().frame() || formSubmission->state().sourceDocument().frame() == frame.get()); I think this should be something you can write without "get()". > Source/WebCore/html/HTMLFormElement.cpp:386 > + if (!frame->page()) > + return; This is a significant change in behavior. Before, in a case like this, the code below would run. We will leave m_shouldSubmit set to true now, for example. Is this a desirable change? > Source/WebCore/html/HTMLFormElement.cpp:389 > + return; Ditto. > Source/WebCore/html/HTMLFormElement.cpp:394 > + return; Ditto. > Source/WebCore/loader/FrameLoader.cpp:2222 > - m_quickRedirectComing = (lockBackForwardList == LockBackForwardList::Yes || history().currentItemShouldBeReplaced()) && m_documentLoader && !m_isExecutingJavaScriptFormAction; > + m_quickRedirectComing = (lockBackForwardList == LockBackForwardList::Yes || history().currentItemShouldBeReplaced()) && m_documentLoader; What makes this change safe? Was this boolean doing anything useful before? If so, why isn’t it needed now?
Note You need to log in before you can comment on or make changes to this bug.