RESOLVED FIXED Bug 93961
Automatic features should work in sandboxed iframes if "allow-scripts" flag is set
https://bugs.webkit.org/show_bug.cgi?id=93961
Summary Automatic features should work in sandboxed iframes if "allow-scripts" flag i...
Jussi Kukkonen (jku)
Reported 2012-08-14 06:17:19 PDT
Looks like media/no-auto-play-in-sandbox.html test (and the functionality it tests) is wrong. It expects the media to _not_ autoplay in an iframe with sandbox="allow-scripts allow-same-origin". This seems incorrect as according to spec (both whatwg and w3c working draft) autoplay is restricted by "automatic features browsing context flag" which should not be set if allow-scripts is set.
Attachments
Patch (10.25 KB, patch)
2012-09-04 00:01 PDT, Chris Dumez
no flags
Chris Dumez
Comment 2 2012-09-03 06:58:44 PDT
It also impacts: fast/forms/no-autofocus-in-sandbox.html Autofocus should work in a sandboxed iframe that has allow-scripts flag set (according to latest spec). Manual test: http://samples.msdn.microsoft.com/ietestcenter/html5/sandbox/automatic-feature-block-autofocus-form-control.htm
Chris Dumez
Comment 3 2012-09-04 00:01:42 PDT
Created attachment 161974 [details] Patch Unfortunately, the present patch removes the test cases that check that autoplay / autofocus are blocked in sandboxed iframes. Those tests are no longer working since they rely on the "allow-scripts" flag to be set in order to work. It is not easy to automatically test this but I'm open to suggestions on how to better handle this. I have validated the patch using the LayoutTests added in the patch and the following manual tests: http://samples.msdn.microsoft.com/ietestcenter/html5/sandbox/automatic-feature-block-autoplay-video.htm http://samples.msdn.microsoft.com/ietestcenter/html5/sandbox/automatic-feature-block-autofocus-form-control.htm
Eric Seidel (no email)
Comment 4 2012-09-04 00:33:53 PDT
This is for you Adam. :)
Adam Barth
Comment 5 2012-09-04 11:00:40 PDT
Comment on attachment 161974 [details] Patch Thanks for fixing this. Yeah, I'm not sure how to test these features anymore...
WebKit Review Bot
Comment 6 2012-09-04 11:57:56 PDT
Comment on attachment 161974 [details] Patch Clearing flags on attachment: 161974 Committed r127481: <http://trac.webkit.org/changeset/127481>
WebKit Review Bot
Comment 7 2012-09-04 11:58:00 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.