Only unlock orientation if the received mozfullscreenchange is for fullscreen being disabled

RESOLVED FIXED in Firefox 14

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(firefox14- fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 617024 [details] [diff] [review]
Patch v1

It happens that if you do something like:
addEventListener("mozfullscreenchange", function() {
  screen.mozLockOrientation("landscape");
});

The orientation will be changed to "landscape-foo" then back to the previous orientation is that when lock() is called, we add an event listener listening to the 'mozfullscreenchange' event which - and I had no idea that was the case before - is called immediately. The handler of that event is unlocking the screen so basically the lock() becomes some kind of a no-op.
Attachment #617024 - Flags: review?(bugs)
(Assignee)

Comment 1

5 years ago
We should fix that for Gecko 14 because it could be quite an annoying bug for that new experimental feature (which comes with Gecko 14).
status-firefox14: --- → affected
tracking-firefox14: --- → ?

Comment 2

5 years ago
Comment on attachment 617024 [details] [diff] [review]
Patch v1

Can we get a a testcase for this?
Attachment #617024 - Flags: review?(bugs) → review+
(Assignee)

Updated

5 years ago
Attachment #617024 - Flags: approval-mozilla-central?
(Assignee)

Comment 3

5 years ago
(In reply to Olli Pettay [:smaug] from comment #2)
> Comment on attachment 617024 [details] [diff] [review]
> Patch v1
> 
> Can we get a a testcase for this?

We actually don't have tests for that. That would require writing Android tests (this is no fun) and screen orientation is using hardware sensors so even if we could test a few things it might limit us and generate random oranges. I was planning to dig into this later actually.
Attachment #617024 - Flags: approval-mozilla-central? → approval-mozilla-central+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/6b26bdffa1bc
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
status-firefox14: affected → fixed
Resolution: --- → FIXED

Updated

5 years ago
tracking-firefox14: ? → -
You need to log in before you can comment on or make changes to this bug.