WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
Patch
(10.76 KB, patch)
2020-06-18 09:11 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(10.75 KB, patch)
2020-06-18 11:49 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(7.08 KB, patch)
2020-06-23 02:09 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(7.08 KB, patch)
2020-06-23 05:46 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(7.08 KB, patch)
2020-06-23 08:38 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(8.04 KB, patch)
2020-06-24 10:43 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2020-06-18 07:59:35 PDT
Created
attachment 402208
[details]
Patch
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
Created
attachment 402210
[details]
Patch
Rob Buis
Comment 5
2020-06-18 11:49:25 PDT
Created
attachment 402220
[details]
Patch
Rob Buis
Comment 6
2020-06-23 02:09:06 PDT
Created
attachment 402539
[details]
Patch
Rob Buis
Comment 7
2020-06-23 05:46:09 PDT
Created
attachment 402548
[details]
Patch
Rob Buis
Comment 8
2020-06-23 08:38:07 PDT
Created
attachment 402562
[details]
Patch
Rob Buis
Comment 9
2020-06-24 10:43:06 PDT
Created
attachment 402662
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug