Last Comment Bug 697636 - requestFullScreen should not work on navigated-away documents
: requestFullScreen should not work on navigated-away documents
Status: RESOLVED FIXED
[sg:low?][inbound]
: assertion, testcase
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: Chris Pearce (:cpearce)
:
Mentors:
Depends on:
Blocks: 326633 594645 545812
  Show dependency treegraph
 
Reported: 2011-10-26 18:20 PDT by Jesse Ruderman
Modified: 2011-11-02 06:31 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (546 bytes, text/html)
2011-10-26 18:20 PDT, Jesse Ruderman
no flags Details
assertion stacks (4.22 KB, text/plain)
2011-10-26 18:20 PDT, Jesse Ruderman
no flags Details
Patch v1 (4.54 KB, patch)
2011-10-27 20:55 PDT, Chris Pearce (:cpearce)
no flags Details | Diff | Splinter Review
Patch v2 (4.84 KB, patch)
2011-10-31 14:55 PDT, Chris Pearce (:cpearce)
bzbarsky: review+
Details | Diff | Splinter Review

Description Jesse Ruderman 2011-10-26 18:20:08 PDT
Created attachment 569856 [details]
testcase

== Steps ==

1. Set these prefs:
user_pref("full-screen-api.allow-trusted-requests-only", false);
user_pref("full-screen-api.enabled", true);

2. Load the testcase.

== Result ==

1. Firefox enters full-screen mode.

2. ###!!! ASSERTION: Document should report fullscreen: 'fullscreen', file content/html/content/src/nsGenericHTMLElement.cpp, line 3413

3. ###!!! ASSERTION: Should be in full screen state!: 'doc->IsFullScreenDoc()', file content/html/content/src/nsGenericHTMLElement.cpp, line 3414

== Expected ==

1. The requestFullScreen call should throw.

== Security impact ==

This might be bypass for lack of mozallowfullscreen attribute.
Comment 1 Jesse Ruderman 2011-10-26 18:20:52 PDT
Created attachment 569857 [details]
assertion stacks
Comment 2 Chris Pearce (:cpearce) 2011-10-26 18:24:22 PDT

*** This bug has been marked as a duplicate of bug 685402 ***
Comment 3 Chris Pearce (:cpearce) 2011-10-27 20:53:14 PDT
I'll reopen this bug and resolve it separately from bug 685402 to simplify patches, reviews, and landings.
Comment 4 Chris Pearce (:cpearce) 2011-10-27 20:55:29 PDT
Created attachment 570173 [details] [diff] [review]
Patch v1

Patch, with Jesse's testcase. Based on top of bug 688648 and bug 685779, so will hold of on requesting review until they're reviewed.
Comment 5 Chris Pearce (:cpearce) 2011-10-31 14:55:19 PDT
Created attachment 570855 [details] [diff] [review]
Patch v2

Rebased on top of patch in bug 685779 and bug 688468. Includes test.
Comment 6 Boris Zbarsky [:bz] 2011-10-31 20:53:12 PDT
Comment on attachment 570855 [details] [diff] [review]
Patch v2

r=me
Comment 8 Ed Morley [:emorley] 2011-11-02 06:31:59 PDT
https://hg.mozilla.org/mozilla-central/rev/d2bd5990a2fb

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