Support 'allow="fullscreen"' feature policy
<rdar://problem/55640448>
Created attachment 388799 [details] Patch
Comment on attachment 388799 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388799&action=review > Source/WebCore/dom/FullscreenManager.cpp:64 > + } This code is very similar with UserMediaController isAllowedToUse. Maybe we should add a routine for crawling up the tree. > Source/WebCore/html/FeaturePolicy.cpp:148 > + if (iframe.hasAttribute(allowfullscreenAttr) || iframe.hasAttribute(webkitallowfullscreenAttr)) { GTK does not like it, unified build issue maybe, HTMLNames.h missing probably. > LayoutTests/http/tests/fullscreen/fullscreen-feature-policy.html:55 > + <iframe allow="fullscreen *" data-enabled="true" src="http://localhost:8000/resources/pointer-lock/inner-iframe.html"></iframe> Maybe add a test like allow="fullscreen http://localhost..."? Also, there are probably WPT tests that are testing this but there is no rebasing. Are there some WPT test we should import?
Looking at WPT, I see LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow.html and LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html. But it seems they fail since they test document.fullscreenEnabled. It would be nice to add support for it along document.webkitFullscreenEnabled.
(In reply to youenn fablet from comment #3) > Comment on attachment 388799 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=388799&action=review > > > Source/WebCore/dom/FullscreenManager.cpp:64 > > + } > > This code is very similar with UserMediaController isAllowedToUse. > Maybe we should add a routine for crawling up the tree. > > > Source/WebCore/html/FeaturePolicy.cpp:148 > > + if (iframe.hasAttribute(allowfullscreenAttr) || iframe.hasAttribute(webkitallowfullscreenAttr)) { > > GTK does not like it, unified build issue maybe, HTMLNames.h missing > probably. Good point; will add. > > LayoutTests/http/tests/fullscreen/fullscreen-feature-policy.html:55 > > + <iframe allow="fullscreen *" data-enabled="true" src="http://localhost:8000/resources/pointer-lock/inner-iframe.html"></iframe> > > Maybe add a test like allow="fullscreen http://localhost..."? Sure! It’s super easy to add new tests this way. > Also, there are probably WPT tests that are testing this but there is no > rebasing. > Are there some WPT test we should import? I checked in wpt/feature-policy, but it looks like those depend on a DOM-exposed mechanism for querying feature policies that we haven’t yet implemented, and wpt/fullscreen didn’t include any of these checks. I didn’t think to check wpt/.../the-iframe-element/.
(In reply to youenn fablet from comment #4) > Looking at WPT, I see > LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/ > the-iframe-element/iframe-allow.html and > LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/ > the-iframe-element/iframe-allowfullscreen.html. > > But it seems they fail since they test document.fullscreenEnabled. > It would be nice to add support for it along > document.webkitFullscreenEnabled. We are holding off unprefixing the Fullscreen APIs till we fully implement the current spec. This feature policy work is some of that, but the largest remaining work is layout and stacking context changes.
Created attachment 388804 [details] Patch for landing
Created attachment 388805 [details] Patch for landing
Created attachment 388810 [details] Patch for landing
Created attachment 388863 [details] Patch for landing
Comment on attachment 388863 [details] Patch for landing Clearing flags on attachment: 388863 Committed r255162: <https://trac.webkit.org/changeset/255162>
All reviewed patches have been landed. Closing bug.
*** Bug 74660 has been marked as a duplicate of this bug. ***