Closed
Bug 743217
Opened 14 years ago
Closed 14 years ago
Do not allow iframes to lock the screen if a parent window's element is fullscreened
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(1 file)
|
915 bytes,
patch
|
smaug
:
review+
mounir
:
checkin+
|
Details | Diff | Splinter Review |
This could be abused *and* that was causing a bug because the 'mozfullscreenchange' event is only sent to parent windows so leaving fullscreen wasn't unlocking the screen.
Attachment #612864 -
Flags: review?(bugs)
Comment 1•14 years ago
|
||
Comment on attachment 612864 [details] [diff] [review]
Patch
># HG changeset patch
># Parent da0d07b5ca1e79037eb66bad22bd2b3aeb106dc8
># User Mounir Lamouri <mounir.lamouri@gmail.com>
># Date 1333718342 -7200
>
>diff --git a/dom/base/nsScreen.cpp b/dom/base/nsScreen.cpp
>--- a/dom/base/nsScreen.cpp
>+++ b/dom/base/nsScreen.cpp
>@@ -367,18 +367,25 @@ nsScreen::MozLockOrientation(const nsASt
> }
>
> if (!GetOwner()) {
> *aReturn = false;
> return NS_OK;
> }
>
> if (!IsChromeType(GetOwner()->GetDocShell())) {
>+ nsCOMPtr<nsIDOMDocument> doc;
>+ GetOwner()->GetDocument(getter_AddRefs(doc));
>+ if (!doc) {
>+ *aReturn = false;
>+ return NS_OK;
>+ }
>+
> bool fullscreen;
>- GetOwner()->GetFullScreen(&fullscreen);
>+ doc->GetMozFullScreen(&fullscreen);
> if (!fullscreen) {
> *aReturn = false;
> return NS_OK;
> }
>
> nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(GetOwner());
> if (!target) {
> *aReturn = false;
Attachment #612864 -
Flags: review?(bugs) → review+
| Assignee | ||
Updated•14 years ago
|
Attachment #612864 -
Flags: checkin+
| Assignee | ||
Updated•14 years ago
|
Whiteboard: [needs review]
Target Milestone: --- → mozilla14
Comment 2•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•