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

Snapshot allowfullscreen #2187

Closed
wants to merge 1 commit into from
Closed

Conversation

zcorpan
Copy link
Member

@zcorpan zcorpan commented Dec 16, 2016

According to #2184 (comment)
the page that was previously broken by allowfullscreen not being
live has now changed, so it may be possible to move back to the
snapshot model used by <iframe sandbox> and Feature Policy.

Fixes #2143.

This partially reverts 9f6b91c.


@upsuper said:

If we decide to switch the behavior, I hope all browsers can coordinate to switch at roughly the same time, so that if any website is regressed, we can ask them to fix their website, rather than changing our behavior back and forth.

So, first, interest to do this at all, then y'all can figure out how to coordinate when to switch.

@zcorpan zcorpan added compat Standard is not web compatible or proprietary feature needs standardizing needs implementer interest Moving the issue forward requires implementers to express interest needs tests Moving the issue forward requires someone to write tests labels Dec 16, 2016
@foolip
Copy link
Member

foolip commented Dec 16, 2016

I would definitely like to see allowfullscreen eventually defined in terms of Feature Policy, so the more similar we can make it in the interim the better. @clelland @LoonyBean, do you know what the exact timing of when Feature Policy would snapshot its state is? I'd like to add a use counter to see how often this change would prevent fullscreen currently allowed.

@zcorpan
Copy link
Member Author

zcorpan commented Dec 16, 2016

Tests for allowfullscreen: web-platform-tests/wpt#4354

Tests for allowpaymentrequest: web-platform-tests/wpt#4369

@clelland
Copy link
Contributor

@foolip - The plan is to have the embedding document's feature policy snapshotted at the point where the nested browsing context of the frame is navigated. (This is roughly the same behaviour as that of the iframe sandbox attribute.)

The full policy won't be set at that point; it will need to wait until the HTTP headers for the framed content have been received. The snapshotted policy from the embedder will be combined with the embedded document's headers at the point when the embedded Document is created, I believe.

@bzbarsky
Copy link
Contributor

@clelland the iframe sandbox attribute is snapshotted, per spec, when the new document in the subframe is created. That's certainly what Firefox does. Is that not what Chrome does?

I expected feature policy to work exactly the same way, based on the explainer, which says "Define an inherited policy for feature for origin when document is initialized".

@clelland
Copy link
Contributor

Thanks, @bzbarsky -- you're right there -- it's part of [Initializing a new Document object], and it looks like Chrome follows the spec. That means we definitely can resolve the policy inherited from the parent at the same time that we construct the policy for the child.

@foolip
Copy link
Member

foolip commented Dec 16, 2016

@clelland, as implemented in Blink, is it indistinguishable in timing from when the sandbox attribute is read, even if not close by in the code?

@zcorpan
Copy link
Member Author

zcorpan commented Dec 19, 2016

@clelland @bzbarsky I written a test for the timing aspect in web-platform-tests/wpt@c050814

According to #2184 (comment)
the page that was previously broken by allowfullscreen not being
live has now changed, so it may be possible to move back to the
snapshot model used by <iframe sandbox> and Feature Policy.

Fixes #2143.

This partially reverts 9f6b91c.
@zcorpan zcorpan force-pushed the zcorpan/allowed-to-use-snapshot branch from 7cc791c to f33d421 Compare December 20, 2016 08:12
zcorpan added a commit that referenced this pull request Dec 20, 2016
New allow* attributes should use the snapshot model used by <iframe sandbox>
and Feature Policy. The allowfullscreen and allowusermedia attributes are
left with their current live behavior in this change, because it is not yet
clear if it is Web-compatible to change them (see #2187).

Part of #2143.
@zcorpan
Copy link
Member Author

zcorpan commented Dec 20, 2016

I made a new pull request to only change allowpaymentrequest in #2195 so that is not held up by allowfullscreen.

@zcorpan zcorpan removed the needs tests Moving the issue forward requires someone to write tests label Dec 20, 2016
@foolip
Copy link
Member

foolip commented Jan 5, 2017

Chromium: @foolip ?

I think we should do this, but there is a decent chance that it won't work out for the allowfullscreen case. However, as soon as there's one engine who wants to attempt the change, I think we should merge this. @upsuper, are you going to do it for Gecko? In Chromium, I wonder if it might be best to combine with @clelland's plans for defining allowfullscreen in terms of Feature Policy.

@zcorpan
Copy link
Member Author

zcorpan commented Jan 5, 2017

This PR is currently lagging behind #2195 so see that PR for now what the behavior should be. When that one is merged I will rebase and fixup this one for allowfullscreen/allowusermedia.

@upsuper
Copy link
Member

upsuper commented Jan 7, 2017

@foolip, I'm not sure about Gecko's plan of Feature Policy. @bzbarsky may know more about that. I guess it might be better to combine them for us as well. But with the previous experience, I think adding (or blocking) this solely for allowfullscreen should be straightforward as well, so I'm open to applying it to allowfullscreen whenever we can coordinate.

@n054
Copy link

n054 commented Jan 7, 2017

@foolip I run chrome on this device and would like to help test this pull request Would it be best to test it here on Github or should I pop over to the Google Git Chromium repo instead.

annevk pushed a commit that referenced this pull request Jan 14, 2017
New allow* attributes should use the snapshot model used by <iframe sandbox> and Feature Policy. The allowfullscreen attributes is left with its current live behavior in this change, because it is not yet clear if it is web-compatible to change it (see #2187).

Test: web-platform-tests/wpt#4369.

Part of #2143.
@zcorpan zcorpan changed the title Snapshot allowfullscreen/allowusermedia/allowpaymentrequest Snapshot allowfullscreen Feb 3, 2017
@zcorpan
Copy link
Member Author

zcorpan commented Feb 3, 2017

allowusermedia and allowpaymentrequest use the snapshot model in the current spec; so this pull request is about moving over allowfullscreen as well. I can brush up this PR when someone has tried to ship allowfullscreen with the snapshot model so we know what the web compat situation is like...

@zcorpan
Copy link
Member Author

zcorpan commented Feb 13, 2017

[blink-dev] Intent to Implement and Ship: Snapshot iframe allowfullscreen attribute
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/UKChYGBYvSk

@foolip
Copy link
Member

foolip commented Feb 14, 2017

We do have implementer interest now, but do we want to leave this open until we see the compat fallout? One downside of this is that any tests can't be done inside of web-platform-tests up-front and we may forget to share them later, but I don't see any way around this and think it's the right trade-off here.

@zcorpan
Copy link
Member Author

zcorpan commented Feb 14, 2017

To avoid flip-flopping the standard (and web-platform-tests) I think we should leave this open until we have a clearer picture of what the web compat situation is like. The time to merge this (or not) will maybe function as a reminder to upstream the tests. WDYT?

@zcorpan zcorpan removed the needs implementer interest Moving the issue forward requires implementers to express interest label Feb 14, 2017
@foolip
Copy link
Member

foolip commented Feb 14, 2017

I agree, let's go with that.

@annevk annevk added the do not merge yet Pull request must not be merged per rationale in comment label Feb 14, 2017
@annevk
Copy link
Member

annevk commented Dec 20, 2017

So it seems Chrome 62 shipped this change per @clelland in #3287. That PR will also obsolete this PR and I'll try to ensure that's noted in the eventual commit message. It seems there was already implementer interest so that's probably all okay.

@foolip
Copy link
Member

foolip commented Jan 27, 2018

Looks like, at least textually, #3287 doesn't include the same bits as this PR. Is this PR actually obsoleted, and if so should it be closed?

@annevk
Copy link
Member

annevk commented Jan 28, 2018

See #2187 (comment). I think we should close it once we land the other.

@foolip
Copy link
Member

foolip commented Jan 29, 2018

That is the comment I was reacting to, but OK, this isn't accidentally left open, which is what I suspected.

@domenic
Copy link
Member

domenic commented Nov 14, 2018

#3287 got merged, so we can close this. (Please reopen if I got that wrong...)

@domenic domenic closed this Nov 14, 2018
alice pushed a commit to alice/html that referenced this pull request Jan 8, 2019
New allow* attributes should use the snapshot model used by <iframe sandbox> and Feature Policy. The allowfullscreen attributes is left with its current live behavior in this change, because it is not yet clear if it is web-compatible to change it (see whatwg#2187).

Test: web-platform-tests/wpt#4369.

Part of whatwg#2143.
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request Oct 30, 2019
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request Jan 27, 2020
zcorpan added a commit to web-platform-tests/wpt that referenced this pull request Nov 13, 2020
foolip pushed a commit to web-platform-tests/wpt that referenced this pull request May 6, 2021
@annevk annevk deleted the zcorpan/allowed-to-use-snapshot branch October 15, 2021 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Standard is not web compatible or proprietary feature needs standardizing do not merge yet Pull request must not be merged per rationale in comment
Development

Successfully merging this pull request may close these issues.

"allowed to use" active document, browsing context container...
8 participants