Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 3, 2015

Conversation

@simartin
Copy link
Contributor

simartin commented Nov 2, 2015

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

Review on Reviewable

@jdm
Copy link
Member

jdm commented Nov 2, 2015

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

@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2015

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

@simartin
Copy link
Contributor Author

simartin commented Nov 8, 2015

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
Copy link
Contributor Author

simartin commented Nov 8, 2015

Will resolve once the discussion with jdm on testing is complete


Comments from the review on Reviewable.io

@simartin simartin force-pushed the simartin:issue_8113 branch from bb4d33f to 5c03df4 Nov 8, 2015
@simartin simartin force-pushed the simartin:issue_8113 branch from 5c03df4 to 31442cc Nov 8, 2015
@jdm
Copy link
Member

jdm commented Nov 11, 2015

@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?

@simartin
Copy link
Contributor Author

simartin commented Nov 11, 2015

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
Contributor

eefriedman commented Nov 11, 2015

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
Copy link
Member

jdm commented Nov 12, 2015

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

@simartin
Copy link
Contributor Author

simartin commented Nov 12, 2015

@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
Copy link
Member

jdm commented Nov 18, 2015

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

@simartin
Copy link
Contributor Author

simartin commented Nov 18, 2015

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

@simartin
Copy link
Contributor Author

simartin commented Dec 1, 2015

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

@jdm
Copy link
Member

jdm commented Dec 2, 2015

💃

@simartin simartin force-pushed the simartin:issue_8113 branch from 31442cc to 2b332a2 Dec 2, 2015
@simartin
Copy link
Contributor Author

simartin commented Dec 2, 2015

wpt test added as suggested


Comments from the review on Reviewable.io

@jdm
Copy link
Member

jdm commented Dec 2, 2015

@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
Contributor

bors-servo commented Dec 2, 2015

📌 Commit 2b332a2 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Dec 3, 2015

Testing commit 2b332a2 with merge 1a7d393...

bors-servo added 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
Contributor

bors-servo commented Dec 3, 2015

💔 Test failed - linux-rel

@jdm
Copy link
Member

jdm commented Dec 3, 2015

@bors-servo: retry

@bors-servo
Copy link
Contributor

bors-servo commented Dec 3, 2015

Testing commit 2b332a2 with merge 18f74a3...

bors-servo added 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
Contributor

bors-servo commented Dec 3, 2015

@bors-servo bors-servo merged commit 2b332a2 into servo:master Dec 3, 2015
3 checks passed
3 checks passed
code-review/reviewable Review complete: all files reviewed, all discussions resolved
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@simartin simartin deleted the simartin:issue_8113 branch Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.