Skip to content

Issue #8113: Support file, about and data schemes as form action. - #8293

Merged
bors-servo merged 1 commit into
servo:masterfrom
simartin:issue_8113
Dec 3, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
simartin:issue_8113

Conversation

@simartin

@simartin simartin commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

Fix #8113 by supporting those schemes as form action and unit test the "about:blank" case

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 2, 2015
@jdm

jdm commented Nov 2, 2015

Copy link
Copy Markdown
Member

Great work, especially on figuring out a way to test it :) I've got some suggestions to improve that below.
-S-awaiting-review +S-needs-code-changes


Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


components/script/dom/htmlformelement.rs, line 210 [r1] (raw file):
Let's do:

// https://html.spec.whatwg.org/multipage/#submit-get-action
("file", _) | ("about", _) | ("data", FormMethod::FormGet) |
("ftp", _) | ("javascript", _) => (),

tests/ref/basic.list, line 23 [r1] (raw file):
I don't think this test needs to be a reftest. Further suggestions below!


tests/ref/form_submit_about.html, line 8 [r1] (raw file):
I propose a WPT test (./mach create-wpt tests/wpt/mozilla/tests/mozilla/form_submit_about.html) which contains an <iframe>. The page in the iframe should contain a form that submits itself, targeted at about:blank. The test page can watch the iframe's onload and pass if there are two load events. Does that make sense?


tests/ref/form_submit_about_ref.html, line 1 [r1] (raw file):
We can remove this file.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 2, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #8354) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 5, 2015
@simartin

simartin commented Nov 8, 2015

Copy link
Copy Markdown
Contributor Author

tests/ref/form_submit_about.html, line 8 [r1] (raw file):
It makes perfect sense however I've failed so far unfortunately, and it looks to me like there might be another issue in Servo... Creating a test as you suggested, the iframe's onload is called only once, while it's called twice (as it should be) with Firefox or Chrome...


Comments from the review on Reviewable.io

@simartin

simartin commented Nov 8, 2015

Copy link
Copy Markdown
Contributor Author

Will resolve once the discussion with jdm on testing is complete


Comments from the review on Reviewable.io

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 8, 2015
@jdm

jdm commented Nov 11, 2015

Copy link
Copy Markdown
Member

@simartin What is the target of the form that gets submitted? What if you make a blank.html in the same directory and use that as the target? Does the missing onload event occur?

@jdm jdm added S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Nov 11, 2015
@simartin

Copy link
Copy Markdown
Contributor Author

In that case the onload event occurs... I guess there's something special with about:blank; I'll try with about:failure, that I understand will load failure.html

@eefriedman

Copy link
Copy Markdown
Contributor

The thing that's special about about:blank is that it's cross-origin... getting the load event to fire correctly depends on getting cross-origin wrappers working.

@jdm

jdm commented Nov 12, 2015

Copy link
Copy Markdown
Member

Actually cross-origin iframe load events are part of #6677.

@simartin

Copy link
Copy Markdown
Contributor Author

@jdm Thanks for the reference. So either we go with the initial way of testing that I proposed and close this ticket (and we move to wpt-testing when #6677 is fixed), or we defer closure until #6677 is closed. What would you suggest as next step?

@jdm jdm added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-answer Someone asked a question that requires an answer. labels Nov 13, 2015
@jdm

jdm commented Nov 18, 2015

Copy link
Copy Markdown
Member

#8558 is ready for review, so I'd like to merge that and then get the test using about:blank working.

@jdm jdm added S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 18, 2015
@simartin

Copy link
Copy Markdown
Contributor Author

Awesome! I'll keep an eye on #8558 and resume writing a wpt along with this patch.

@simartin

simartin commented Dec 1, 2015

Copy link
Copy Markdown
Contributor Author

The fix for #8558 has been merged, hence resuming work on this issue

@jdm

jdm commented Dec 2, 2015

Copy link
Copy Markdown
Member

💃

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. labels Dec 2, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Dec 2, 2015
@simartin

simartin commented Dec 2, 2015

Copy link
Copy Markdown
Contributor Author

wpt test added as suggested


Comments from the review on Reviewable.io

@jdm

jdm commented Dec 2, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+
Thanks for finishing this up!


Reviewed 7 of 7 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 2b332a2 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Dec 2, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2b332a2 with merge 1a7d393...

bors-servo pushed a commit that referenced this pull request Dec 3, 2015
Issue #8113: Support file, about and data schemes as form action.

Fix #8113 by supporting those schemes as form action and unit test the "about:blank" case

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8293)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Dec 3, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2b332a2 with merge 18f74a3...

bors-servo pushed a commit that referenced this pull request Dec 3, 2015
Issue #8113: Support file, about and data schemes as form action.

Fix #8113 by supporting those schemes as form action and unit test the "about:blank" case

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8293)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 3, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 2b332a2 into servo:master Dec 3, 2015
@simartin
simartin deleted the issue_8113 branch December 3, 2015 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants