New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627614 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 622585
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Compat



Sign in to add a comment

(webkit)requestFullscreen works even for elements inside shadow DOM

Reported by opet...@mozilla.com, Jul 12 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 /

Example URL:
data:text/html,<script>window.onload=function(){ document.body.innerHTML = "<div>"; document.body.firstChild.attachShadow({mode: "open"}); document.body.firstChild.shadowRoot.innerHTML = "<div onclick='this.webkitRequestFullScreen()'>click me</div>"}</script>

Steps to reproduce the problem:
Load
data:text/html,<script>window.onload=function(){ document.body.innerHTML = "<div>"; document.body.firstChild.attachShadow({mode: "open"}); document.body.firstChild.shadowRoot.innerHTML = "<div onclick='this.webkitRequestFullScreen()'>click me</div>"}</script>

Click the text

Browser enters to fullscreen

What is the expected behavior?
Per spec, fullscreen is supported only for elements in document. Otherwise document.fullscreenElement
(document.webkitFullscreenElement) leaks information about the shadow DOM to the light DOM.

What went wrong?
Chrome is not following the spec.
https://fullscreen.spec.whatwg.org

Does it occur on multiple sites: N/A

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? N/A 

Chrome version: Version 53.0.2785.8 dev (64-bit)  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 11.2 r202
 

Comment 1 by kochi@chromium.org, Jul 13 2016

Cc: hayato@chromium.org foolip@chromium.org
Components: Blink>Fullscreen Blink>WebComponents
Labels: -OS-Linux OS-All
Owner: kochi@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report, we are aware of the issue.

The behavior of fullscreen in shadow (to be exact, what document.fullscreenElement and shadowRoot.fullscreenElement should return)
is discussed at:
https://github.com/w3c/webcomponents/issues/180

and I'll work on the spec update for this.
If you have any concern about this, please add a comment in #180.

Related, Blink has a restriction that if any of the element is fullscreen,
only DOM-level descendants in the same tree is allowed to go to fullscreen
(tracking  bug 535164 ).

Comment 2 by kochi@chromium.org, Jul 14 2016

And this is the tracking issue for the spec.
https://github.com/whatwg/fullscreen/issues/42

Labels: Hotlist-Interop
Bulk-adding Hotlist-Interop to bugs filed by other browser vendors based on the summary.  Feel free to remove if this issue doesn't actually reflect a difference in behavior between engines.
https://github.com/whatwg/fullscreen/issues/42 is now closed, see https://fullscreen.spec.whatwg.org/#api and search for "shadow" to find most of how it's supposed to work.

kochi@, should this now be a dupe of issue 622585? It seems like one tracking bug for Fullscreen+Shadow DOM should suffice.

Comment 5 by kochi@chromium.org, Oct 7 2016

Mergedinto: 622585
Status: Duplicate (was: Assigned)
foolip@ yes, let's merge to it.

Sign in to add a comment