Open Bug 1302976 Opened 8 years ago Updated 2 years ago

Probably not allow user to put a video into fullscreen if the document is not allowed to

Categories

(Firefox :: Menus, defect, P3)

defect

Tracking

()

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(3 files)

Currently, chrome code has a privilege to put an element into fullscreen even if its owner document is not allowed to so. The only builtin UI for that is the "Full Screen" context menu of <video>.

I wonder whether we want to remove that privilege for chrome code, and hide "Full Screen" menu item if the document is not allowed to use fullscreen.

I don't think there is any security concern, but there is some UI consistency issue, as well as some issue which is probably hard to workaround like bug 1299795 (video in sidebar).

It seems hard to me to allow document in sidebar to enter fullscreen, so I'd prefer to just disable it.

For UI consistency, if you show controls for video, the fullscreen button wouldn't show if the document is not allowed to enter fullscreen, however the context menu would still show "Full Screen" even in that case, which seems to be inconsistent.
Assignee: nobody → xidorn+moz
Comment on attachment 8792390 [details]
Bug 1302976 part 1 - Make tests not rely on chrome privilege of fullscreen.

https://reviewboard.mozilla.org/r/79462/#review78070

lgtm
Attachment #8792390 - Flags: review?(jmaher) → review+
Why do we want this? I would expect videos in sandboxed document to be able to go to fullscreen if the chrome code (== user) wants that. Maybe. 
At least limiting that functionality might annoy users.

What do other browsers do?
(In reply to Olli Pettay [:smaug] (TPAC) from comment #7)
> Why do we want this? I would expect videos in sandboxed document to be able
> to go to fullscreen if the chrome code (== user) wants that. Maybe. 
> At least limiting that functionality might annoy users.

1. There are cases it seems hard to enter fullscreen, e.g. sidebar. (I'm concerned about sidebar and main browser entering fullscreen at the same time may confuse the browser state.)
2. Unexpected fullscreen change from subdocument might confuse their parent document somewhere?
3. There is UI inconsistency that the control bar doesn't show fullscreen button when in sandboxed document (because it's not chrome. But this can probably be resolved by making that allowed for ChromeOrXBL.)

> What do other browsers do?

Safari and Edge allows video to enter fullscreen for sandboxed document (with native UI e.g. control button or context menu). Chrome doesn't show fullscreen button when in sandboxed document, and it doesn't have context menu item for fullscreen.


Probably we don't want this, but I think we want to fix the UI inconsistency anyway... Probably we should also do some extra check for request from chrome to ensure fullscreen inside sidebar doesn't work.
Do Safari or Edge fire fullscreenchange event when entering to fullscreen in a document where web page can't trigger it, but it is browser chrome which does that?
They do fire that event.
Comment on attachment 8792364 [details]
Bug 1302976 part 2 - Not give chrome code privilege to enter fullscreen.

Clearing the request, since I think we'll need to sort this out in the spec level first.
Attachment #8792364 - Flags: review?(bugs)
Attachment #8792365 - Flags: review?(dao+bmo)

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → xidorn+moz
Severity: normal → S4
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: