ScreenOrientation requests lock after coming back to the tab
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox-esr91 disabled, firefox99 disabled, firefox100 disabled, firefox101 fixed)
People
(Reporter: petru, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Saw while adding support for the https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock api on Fenix
by implementing the https://bugzilla.mozilla.org/show_bug.cgi?id=1697647 and https://bugzilla.mozilla.org/show_bug.cgi?id=1744101 GeckoView callbacks
in https://github.com/mozilla-mobile/fenix/pull/24027 and https://github.com/mozilla-mobile/android-components/pull/11789
that after we get the unlock callback from GeckoView, switch to another tab then return to that same tab which previously called onOrientationUnlock
we immediately get an unexpected onOrientationLock
call and as such the app will try to set an orientation lock.
This seems like a bug in GeckoView which doesn't update an internal state to know that orientation lock finished.
Comment 2•2 years ago
|
||
Makoto, do you know if any of the currently filed bugs addresses this?
Assignee | ||
Comment 3•2 years ago
|
||
From https://w3c.github.io/screen-orientation/#interaction-with-fullscreen-api
When that pre-lock condition applies, whenever the Document's fullscreen element is empty and a screen orientation lock is applied, the user agent MUST lock the orientation of the Document to the Document's default screen orientation.
I think that we shouldn't lock orientation again when exiting full screen by switching other tab. It depends on full screen state.
Assignee | ||
Comment 4•2 years ago
|
||
Makoto, do you know if any of the currently filed bugs addresses this?
I guess no.
Comment 5•2 years ago
|
||
Makoto, is this bug related to your other full screen bugs? How soon should we fix this bug?
Assignee | ||
Comment 6•2 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #5)
Makoto, is this bug related to your other full screen bugs? How soon should we fix this bug?
No, this is screen orientation issue. Actually we don't enable lock orientation on all channels yet, so this isn't urgent.
Comment 7•2 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #6)
No, this is screen orientation issue. Actually we don't enable lock orientation on all channels yet, so this isn't urgent.
Thanks. In that case, I'll leave this bug at P3.
Assignee | ||
Comment 8•2 years ago
|
||
Orientation lock allows on full screen state only now. Then if exiting full
screen, orientation lock is unlocked without screen.orientation.unlock
call.
Although we store orientation lock state in browsing context, we don't clear
when exiting full screen. So when current content is re-activated by switching
tab etc, we try to apply orientation lock state from browsing context
unfortunately.
So we should clear this state when exiting full screen even if unlock
isn't
called.
Updated•2 years ago
|
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/51f668ac4278 Update orientation lock information in browsing context when exiting full screen. r=smaug
Comment 10•2 years ago
|
||
bugherder |
Comment 11•2 years ago
•
|
||
Setting status-firefox100=disabled because we don't need to uplift to Beta 100. The dom.screenorientation.allow-lock
pref is false by default, so this bug doesn't affect regular users.
Description
•