Closed Bug 782852 Opened 12 years ago Closed 12 years ago

full-screen-api.approval-required pref should affect nsDocument::mIsApprovedForFullscreen

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: cpearce, Assigned: cpearce)

Details

Attachments

(1 file)

If the pref "full-screen-api.approval-required" is false, pointerlock doesn't work on desktop.

"full-screen-api.approval-required" determines whether chrome JS shows approval UI for fullscreen. When the user approves fullscreen via the approval UI, chrome sends the "fullscreen-approved" notification to gecko, and if we have a pending pointer lock request it is granted.

So if the pref "full-screen-api.approval-required" is true, we won't ever show the approval UI, so we won't ever send "fullscreen-approved", and so pending pointer lock requests are never granted.

We should initialize nsDocument::mIsApprovedForFullscreen to true if full-screen-api.approval-required is false, i.e. we should take the same path for pointer lock as we do when fullscreen has been already approved by the user.
Attached patch PatchSplinter Review
As described in comment #0, initialize nsDocument::mIsApprovedForFullscreen to true if the "full-screen-api.approval-required" pref is false, i.e. take the same path for pointer lock as we do when fullscreen has been already approved by the user.

Pointer lock works when the "full-screen-api.approval-required" pref is false with this patch.
Attachment #651952 - Flags: review?(bugs)
Attachment #651952 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/e9dbc925fde8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: