Make form.action return the actual form submission URL |
|||
Issue descriptionChrome Version: Version 60.0.3104.0 (Official Build) canary (64-bit) OS: Win 10 Tests at http://w3c-test.org/html/semantics/forms/the-form-element/form-action-reflection.html and http://w3c-test.org/html/semantics/forms/the-form-element/form-action-reflection-with-base-url.html Spec at https://html.spec.whatwg.org/multipage/forms.html#dom-fs-action Per the separate tests at http://w3c-test.org/html/semantics/forms/the-form-element/form-action-submission.html and http://w3c-test.org/html/semantics/forms/the-form-element/form-action-submission-with-base-url.html, Chrome uses the spec's algorithm for determining the actual URL to which the form submits. However, it does not return the correct URL for form.action. No browser seems to follow the spec here, but they violate it in different ways, so this is probably safe to change.
,
May 26 2017
,
Jan 11 2018
Is this bug still available? If so, I would like to work on it
,
Jan 11 2018
> Is this bug still available? If so, I would like to work on it Yes, please go ahead. The test form-action-reflection*.html were already imported to the Chromium source tree.
,
Jan 17 2018
Great! I've been working on this but hit a wall fast.
From what I read here [1], my understanding is that I can run the relevant test (which, should fail, I think) with:
python third_party/WebKit/Tools/Scripts/run-webkit-tests -t Default third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-form-element/form-action-reflection.html
However, the test passes! I can see that the issue in the bug is still in place though:
> let form = document.createElement("form");
> document.body.appendChild(form);
> form.action === "" // true
Am I running the tests incorrectly? Any help you could provide would be greatly appreciated (first bug here, so still getting my sea legsā¦)
Also, if there is a better place to ask these kinds of questions, please nudge me and I'll head over there
1. https://chromium.googlesource.com/chromium/src/+/master/docs/testing/layout_tests.md
,
Jan 17 2018
The command you ran was correct. The command succeeds because our current expectation is that the test contains one failure. Please take a look at form-action-reflection-expected.txt in the same directory. It contains a line: FAIL A missing action content attribute should cause the IDL attribute to return the document's URL (= the document's base URL in this case) assert_equals: expected "http://web-platform.test:8001/html/semantics/forms/the-form-element/form-action-reflection.html" but got "" What we should do is: * Update C++ code (maybe, HTMLFormElement.cpp) so that form-action-reflection.html produces no FAIL lines. * Update form-action-reflection-expected.txt by "run-webkit-tests ... --reset" * If the -expected.txt contains only PASS lines, we need to remove the -expected.txt > if there is a better place to ask these kinds of questions, blink-dev@chromium.org mail list and #chromium IRC channel might be better.
,
Jan 26 2018
Based on discussion from blink-dev@chromium.org, I will remove the [Reflect] WebIDL attribute, and implement the action/setAction methods. Shouldn't take long
,
Feb 8 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e7d9eab88cefcc037d6149a969bcfb3e580178f7 commit e7d9eab88cefcc037d6149a969bcfb3e580178f7 Author: Peter Snyder <snyderp@gmail.com> Date: Thu Feb 08 02:20:25 2018 Make form.action return the actual form submission URL Changes the behavior of the form.action attribute to resolve the form's action against the current page's URL. If the action attribute is empty or missing, the form's action attribute returns the current document URL (as per the HTML spec). This change also removes several FAIL cases in the WebKit layout tests (and the containing *-expected.html files), since those imported tests now pass. Bug: 724596 Change-Id: Ieab1615180a2c78d73c0731d9ff1f5beb346f10e Reviewed-on: https://chromium-review.googlesource.com/888664 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#535262} [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/AUTHORS [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-forms-expected.txt [delete] https://crrev.com/258943a62a7a4373a1db40d5b60ae8a0c0941e9e/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-form-element/form-action-reflection-expected.txt [delete] https://crrev.com/258943a62a7a4373a1db40d5b60ae8a0c0941e9e/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-form-element/form-action-reflection-with-base-url-expected.txt [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/third_party/WebKit/Source/core/exported/WebFormElement.cpp [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/third_party/WebKit/Source/core/exported/WebSearchableFormData.cpp [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/third_party/WebKit/Source/core/html/forms/HTMLFormElement.cpp [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/third_party/WebKit/Source/core/html/forms/HTMLFormElement.h [modify] https://crrev.com/e7d9eab88cefcc037d6149a969bcfb3e580178f7/third_party/WebKit/Source/core/html/forms/HTMLFormElement.idl
,
Feb 8 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, May 21 2017