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 upUse the document base url when resolving form action URLs #11219
Conversation
highfive
commented
May 17, 2016
|
Heads up! This PR modifies the following files:
|
| @@ -0,0 +1,6 @@ | |||
| <!DOCTYPE html> | |||
This comment has been minimized.
This comment has been minimized.
jdm
May 17, 2016
Member
This should be in tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/resources/, not servo's toplevel resources directory :)
highfive
commented
May 17, 2016
|
New code was committed to pull request. |
|
The function |
|
|
highfive
commented
May 18, 2016
|
New code was committed to pull request. |
|
Everything good now |
| @@ -2,6 +2,8 @@ | |||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | |||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
|
|
|||
| use dom::document::Document; | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
highfive
commented
May 20, 2016
|
New code was committed to pull request. |
|
Need changes ? |
|
|
|
r? @Ms2ger |
|
Reviewed 1 of 3 files at r2, 1 of 4 files at r3, 1 of 3 files at r4, 3 of 3 files at r7, 1 of 1 files at r8, 1 of 1 files at r9. components/script/dom/macros.rs, line 102 [r9] (raw file):
Drop the components/script/dom/macros.rs, line 102 [r9] (raw file):
Note: "URL", not "base URL". I'm not sure what @jdm had in mind, but this doesn't seem to be it. r? @jdm Comments from Reviewable |
|
Ok, the specification is oddly obscure here. The getter should actually reflect the content value (ie. not return a resolved URL at all), except when it's empty, in which case it should return the document URL (not base URL). HOWEVER, when we use the action value during the form submission process (steps 8-10), we need to resolve the value obtained from the getter against the document's base URL. |
|
Sorry for the incorrect original description in #10580. What we should do now:
|
|
Ok, I will modify this. |
|
@mylainos Are you still planning to finish this? |
|
Yes ! |
|
Closing due to inaction. If you continue to work on this, please feel free to reopen this PR. |
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 -->
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 -->
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 -->
…rl-11219); r=mbrubeck 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 servo/servo#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. Source-Repo: https://github.com/servo/servo Source-Revision: 040075ad085f7e74f207241fedba144d710f42b7
…rl-11219); r=mbrubeck 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 servo/servo#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. Source-Repo: https://github.com/servo/servo Source-Revision: 040075ad085f7e74f207241fedba144d710f42b7
…rl-11219); r=mbrubeck 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 servo/servo#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. Source-Repo: https://github.com/servo/servo Source-Revision: 040075ad085f7e74f207241fedba144d710f42b7 UltraBlame original commit: bd478fc9bb0ee7573e39cd9a48fe7d512981dbf1
…rl-11219); r=mbrubeck 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 servo/servo#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. Source-Repo: https://github.com/servo/servo Source-Revision: 040075ad085f7e74f207241fedba144d710f42b7 UltraBlame original commit: bd478fc9bb0ee7573e39cd9a48fe7d512981dbf1
…rl-11219); r=mbrubeck 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 servo/servo#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. Source-Repo: https://github.com/servo/servo Source-Revision: 040075ad085f7e74f207241fedba144d710f42b7 UltraBlame original commit: bd478fc9bb0ee7573e39cd9a48fe7d512981dbf1
mylainos commentedMay 17, 2016
•
edited by larsbergstrom
./mach build -ddoes not report any errors./mach test-tidy --fasterdoes not report any errorsThe test fail with
TIMEOUT.On screen
Unknown content type (application/json).is displayed, the target of the form isn't recognize as a html file. How can I fix this?This change is