| Summary: | [WPT] form.action does not return document.url when unset (part of https://wpt.live/html/dom/reflection-forms.html) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||||||
| Component: | DOM | Assignee: | Sam Weinig <sam> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | cdumez, changseok, ddkilzer, esprehn+autocc, ews-watchlist, gyuyoung.kim, kondapallykalyan, mifenton, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Sam Weinig
2020-06-15 12:32:25 PDT
Created attachment 401923 [details]
WIP
Created attachment 401930 [details]
WIP
Created attachment 401964 [details]
Patch
Created attachment 401972 [details]
Patch
Comment on attachment 401972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401972&action=review r=me > Source/WebCore/html/HTMLFormElement.cpp:641 > String HTMLFormElement::action() const > { > - return attributeWithoutSynchronization(actionAttr); > + auto& value = attributeWithoutSynchronization(actionAttr); > + if (value.isEmpty()) > + return document().url().string(); > + return document().completeURL(stripLeadingAndTrailingHTMLSpaces(value)).string(); > } HTMLFormElement::action() and HTMLFormControlElement::formAction() are now identical, except for the attribute retrieved. Is there a good place to share the code? Not necessary to land the patch; just noticed white reviewing. (In reply to David Kilzer (:ddkilzer) from comment #5) > Comment on attachment 401972 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=401972&action=review > > r=me > > > Source/WebCore/html/HTMLFormElement.cpp:641 > > String HTMLFormElement::action() const > > { > > - return attributeWithoutSynchronization(actionAttr); > > + auto& value = attributeWithoutSynchronization(actionAttr); > > + if (value.isEmpty()) > > + return document().url().string(); > > + return document().completeURL(stripLeadingAndTrailingHTMLSpaces(value)).string(); > > } > > HTMLFormElement::action() and HTMLFormControlElement::formAction() are now > identical, except for the attribute retrieved. > > Is there a good place to share the code? Not necessary to land the patch; > just noticed white reviewing. Not at the minute. Darin and I are discussing how to potentially cover more Reflection cases in https://bugs.webkit.org/show_bug.cgi?id=213227, which, depending on what we do, could cover this as well. Committed r263113: <https://trac.webkit.org/changeset/263113> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401972 [details]. |