Bug 177356

Summary: Require <form> to be connected
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, rbuis, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Attachments
Patch (3.42 KB, patch)
2020-06-25 11:43 PDT, Rob Buis
no flags
Patch (3.52 KB, patch)
2020-06-27 08:14 PDT, Rob Buis
no flags
Rob Buis
Comment 1 2020-06-25 11:43:34 PDT
Darin Adler
Comment 2 2020-06-26 12:41:24 PDT
Comment on attachment 402755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402755&action=review > Source/WebCore/html/HTMLFormElement.cpp:337 > + // FIXME: duplicated in case prepareForSubmission was called. I don’t understand what "duplicated" means here. Could we be use a few more words and be explicit. I don’t understand what "in case prepareForSubmission was called. This doesn’t match our "sentence-case" comment formatting. Maybe this is the comment we want? // The prepareForSubmission function also does this check, but need to do it here too, since there are some code paths that bypass that function. But honestly, I don’t know if that’s what we’re trying to say.
Rob Buis
Comment 3 2020-06-26 13:16:51 PDT
Comment on attachment 402755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402755&action=review >> Source/WebCore/html/HTMLFormElement.cpp:337 >> + // FIXME: duplicated in case prepareForSubmission was called. > > I don’t understand what "duplicated" means here. Could we be use a few more words and be explicit. > > I don’t understand what "in case prepareForSubmission was called. > > This doesn’t match our "sentence-case" comment formatting. > > Maybe this is the comment we want? > > // The prepareForSubmission function also does this check, but need to do it here too, since there are some code paths that bypass that function. > > But honestly, I don’t know if that’s what we’re trying to say. Your statement is better. Basically I do not like to check for isConnected in two places, my wording was probably off (I guess I wrote it so that I would understand what to do, but maybe not others :)). How about "FIXME: ideally we have only one place to check isConnected in the submit process"? Or I can leave the comment off if we do not think it is a big deal.
Darin Adler
Comment 4 2020-06-26 13:29:26 PDT
Comment on attachment 402755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402755&action=review >>> Source/WebCore/html/HTMLFormElement.cpp:337 >>> + // FIXME: duplicated in case prepareForSubmission was called. >> >> I don’t understand what "duplicated" means here. Could we be use a few more words and be explicit. >> >> I don’t understand what "in case prepareForSubmission was called. >> >> This doesn’t match our "sentence-case" comment formatting. >> >> Maybe this is the comment we want? >> >> // The prepareForSubmission function also does this check, but need to do it here too, since there are some code paths that bypass that function. >> >> But honestly, I don’t know if that’s what we’re trying to say. > > Your statement is better. Basically I do not like to check for isConnected in two places, my wording was probably off (I guess I wrote it so that I would understand what to do, but maybe not others :)). How about "FIXME: ideally we have only one place to check isConnected in the submit process"? Or I can leave the comment off if we do not think it is a big deal. I would not comment that "it would be better to only check once". The best purpose for a comment is to help people the reason behind something non-obvious. So a comment here would answer "why is this check also here since it’s already checked elsewhere" or be omitted.
Rob Buis
Comment 5 2020-06-27 08:14:01 PDT
EWS
Comment 6 2020-06-27 09:44:06 PDT
Committed r263624: <https://trac.webkit.org/changeset/263624> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402955 [details].
Radar WebKit Bug Importer
Comment 7 2020-06-27 09:45:21 PDT
Note You need to log in before you can comment on or make changes to this bug.