Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upForm action url 11219 #13358
Form action url 11219 #13358
Conversation
highfive
commented
Sep 21, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @mbrubeck (or someone else) soon. |
highfive
commented
Sep 21, 2016
|
Heads up! This PR modifies the following files:
|
|
This looks good, thanks! Just a few minor changes are needed. |
| @@ -124,6 +124,26 @@ macro_rules! make_url_or_base_getter( | |||
| ); | |||
|
|
|||
| #[macro_export] | |||
| macro_rules! make_string_or_document_url( | |||
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 21, 2016
Contributor
I think the macro name should be expanded to make_string_or_document_url_getter!.
| @@ -0,0 +1,9 @@ | |||
| <!doctype html> | |||
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 21, 2016
Contributor
This test should be added to the manifest. You can use this command to do so:
./mach test-wpt --manifest-update tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-action-url.html
| <script src="/resources/testharnessreport.js"></script> | ||
| <script> | ||
| var t = async_test("Submit a form from an iframe with a base url"); | ||
| var success = t.step_func_done(); |
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 21, 2016
Contributor
I think this should be something like var success = function() { t.step_func_done(); };. Currently it calls step_func_done immediately, causing the test to always succeed.
This comment has been minimized.
This comment has been minimized.
Ms2ger
Sep 23, 2016
Contributor
This is not true; step_func_done already returns a function (hence func).
| @@ -0,0 +1,13 @@ | |||
| <!doctype html> | |||
| <base href="resources/"></base> | |||
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 21, 2016
Contributor
This file should be inside the resources directory itself (otherwise the test harness will think that it is a test). You could move the "target.html" file a subdirectory of resources and use that as the new base URL.
| <!doctype html> | ||
| <base href="resources/"></base> | ||
| <script src="/resources/testharness.js"></script> | ||
| <script src="/resources/testharnessreport.js"></script> |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the feedback. I made the changes to reflect but the test seems to just time out now. |
|
@rjgoldsborough The problem is the |
|
Sorry about that! I was seeing the test succeed even in a build without the fix, but I mis-diagnosed the cause... |
|
Heh. np :) Fixed the test and now it passes. |
|
That's #13340. |
|
|
|
Looks great, thanks! Please squash and rebase, and then this can land with r=mbrubeck. |
|
Sweet! I was just working on the rebase now and I can squash them all down as well. Thanks. |
|
@bors-servo: r=mbrubeck |
|
|
|
I think the manifest timeouts may be caused by an incorrect rebase of MANIFEST.json. @rjgoldsborough What if you run |
|
@jdm, think you nailed it. https://gist.github.com/rjgoldsborough/b62e2b09545533575f48a3cb3634f3e7 I noticed a lot change in the manifest when rebasing but I guessed those were just from the master changes. |
|
Should I try redoing this PR/fix the rebase? |
|
@rjgoldsborough I would just overwrite the contents of the manifest with the version from master, then run |
|
yeah, I should have rebased first, :( |
|
Yep. Rebase and squash the commits into one, and this will be fine to merge. |
using that macro with the form action, making the form submit process use base url, adding tests.
|
@bors-servo r=mbrubeck |
|
|
Form action url 11219 First pass at fixing #10580. I've added a new macro that returns a DomString with either the attr val or the doc url. I then made the form element use that macro on the action attribute. I also added a test that contains an iframe with a form and base url that submits to a page in a resources directory. I made all these changes based on #11219 (comment). The only thing I'm confused on is how to change step 8. It looks to just be getting the action so I'm wondering if I need to change either step 9 or 10 instead? --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #10580 (github issue number if applicable). - [X] There are tests for these changes OR using that macro with the form action, making the form submit process use base url, adding tests. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13358) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
|
|
ducks commentedSep 21, 2016
•
edited
First pass at fixing #10580.
I've added a new macro that returns a DomString with either the attr val or the doc url.
I then made the form element use that macro on the action attribute.
I also added a test that contains an iframe with a form and base url that submits to a page in
a resources directory.
I made all these changes based on #11219 (comment).
The only thing I'm confused on is how to change step 8. It looks to just be getting the action so I'm wondering if I need to change either step 9 or 10 instead?
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsusing that macro with the form action,
making the form submit process use base url,
adding tests.
This change is