Last Comment Bug 756992 - Only show fullscreen warning when requesting across domain or in unapproved documents
: Only show fullscreen warning when requesting across domain or in unapproved d...
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla15
Assigned To: Chris Pearce (:cpearce)
: Andrew Overholt [:overholt]
Depends on: 753546
  Show dependency treegraph
Reported: 2012-05-21 02:36 PDT by Chris Pearce (:cpearce)
Modified: 2012-05-22 06:33 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch: MozEnteredDomFullscreen dispatch change (5.63 KB, patch)
2012-05-21 02:39 PDT, Chris Pearce (:cpearce)
bugs: review+
Details | Diff | Splinter Review

Description User image Chris Pearce (:cpearce) 2012-05-21 02:36:10 PDT
Currently we always show the fullscreen approval UI/enter warning whenever we enter fullscreen or rollback fullscreen to the previous element. I think this behaviour is annoying; if you've approved a domain for fullscreen, then requesting fullscreen in another element on the same domain (say in a video on that page) will cause another "$domain is now fullscreen" warning. I don't think it makes sense to warn again in the same-origin case, since the current domain is trusted.

I think we should only show the warning/approval UI when:
* We request/rollback fullscreen in/to a document cross-origin, or
* When requesting fullscreen in a document that hasn't already been approved for fullscreen by the permission manager or by an explicit grant by the user.

The cross-origin case should always trump; we should still show the warning when entering a fullscreen on a pre-approved origin cross domain.

So this patch changes behaviour so that we only show the fullscreen warning/approval UI when fullscreen is requested in different origin than the previous fullscreen element, or when a document isn't already approved by permission or explicit approval.
Comment 1 User image Chris Pearce (:cpearce) 2012-05-21 02:39:42 PDT
Created attachment 625585 [details] [diff] [review]
Patch: MozEnteredDomFullscreen dispatch change

We dispatch MozEnteredDomFullscreen in order to signal to chrome when it should display the warning/approval UI, so alter its firing to only fire on unapproved or cross-origin domains.

Greenish on Try:
(Builds there if you want to test behaviour too)
Comment 3 User image Ed Morley [:emorley] 2012-05-22 06:33:38 PDT

Note You need to log in before you can comment on or make changes to this bug.