Last Comment Bug 782852 - full-screen-api.approval-required pref should affect nsDocument::mIsApprovedForFullscreen
: full-screen-api.approval-required pref should affect nsDocument::mIsApprovedF...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla17
Assigned To: Chris Pearce (:cpearce)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-14 17:47 PDT by Chris Pearce (:cpearce)
Modified: 2012-08-17 05:28 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.26 KB, patch)
2012-08-14 17:51 PDT, Chris Pearce (:cpearce)
bugs: review+
Details | Diff | Splinter Review

Description Chris Pearce (:cpearce) 2012-08-14 17:47:41 PDT
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.
Comment 1 Chris Pearce (:cpearce) 2012-08-14 17:51:03 PDT
Created attachment 651952 [details] [diff] [review]
Patch

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.
Comment 3 Ed Morley [:emorley] 2012-08-17 05:28:48 PDT
https://hg.mozilla.org/mozilla-central/rev/e9dbc925fde8

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