Closed Bug 756992 Opened 12 years ago Closed 12 years ago

Only show fullscreen warning when requesting across domain or in unapproved documents

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

Attachments

(1 file)

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.
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:
https://tbpl.mozilla.org/?tree=Try&rev=51fda017a10d
(Builds there if you want to test behaviour too)
Assignee: nobody → cpearce
Status: NEW → ASSIGNED
Attachment #625585 - Flags: review?(bugs)
Attachment #625585 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/4e93159838a6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: