[webkit-reviews] review denied: [Bug 176719] WKBundlePageWillSendSubmitEventCallback is called with incorrect frame parameter : [Attachment 320465] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 13 11:20:18 PDT 2017


Chris Dumez <cdumez at apple.com> has denied Michael Catanzaro
<mcatanzaro at igalia.com>'s request for review:
Bug 176719: WKBundlePageWillSendSubmitEventCallback is called with incorrect
frame parameter
https://bugs.webkit.org/show_bug.cgi?id=176719

Attachment 320465: Patch

https://bugs.webkit.org/attachment.cgi?id=320465&action=review




--- Comment #8 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 320465
  --> https://bugs.webkit.org/attachment.cgi?id=320465
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=320465&action=review

Good fix but I have a suggestion to make the fix a bit cleaner.

> Source/WebCore/html/HTMLFormElement.cpp:281
> +    auto temporarySubmission = FormSubmission::create(*this, m_attributes,
&event, LockHistory::Yes, NotSubmittedByJavaScript);

I do not like this part. I would suggest:
1. Add an effectiveTarget() method to HTMLFormElement which uses the
submitButton's formtarget attribute is available, falls back to
HTMLFormElement::target() and then falls back to document().baseTarget().
2. Use	effectiveTarget() here instead of constructing a FormSubmission
3. Use effectiveTarget() in FormSubmission::create() to avoid code duplication.


More information about the webkit-reviews mailing list