Screen.orientation.lock() support for Windows tablet
Categories
(Core :: DOM: Device Interfaces, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(3 files)
SetDisplayAutoRotationPrefereces can lock screen orientation if tablet mode on Windows 10. IE11 and old (EdgeHTML's) Edge supported screen orientation lock by msLockOrientation
API.
Assignee | ||
Comment 1•1 year ago
|
||
Since Windows tablet mode has a orientation lock API, this patch
implements orientation lock backend for Windows tablet mode.
GetAutoRotationState
API recognizes whether orientation API is supported on
the device. So this fix uses this API to check orientation API capability.
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Since I have added Windows backend for lock orientation by Part 1. fix, I
would like to use it in screen.orientation.lock()
.
Since dom.screenorientation.allow-lock
is still false on all platfroms even
if this fix is applied, orientation lock isn't turned on as default.
If lock orientation isn't supported in the device, the backend will throw
NS_ERROR_DOM_NOT_SUPPORTED_ERR
.
Depends on D162451
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/48b2c96d1c66 Part 1. Lock orientation backend for Windows Tablet. r=gsvelto https://hg.mozilla.org/integration/autoland/rev/cb4c463e552f Part 2. Use windows backend for screen.orientation.lock(). r=smaug
Comment 4•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/48b2c96d1c66
https://hg.mozilla.org/mozilla-central/rev/cb4c463e552f
Comment 5•1 year ago
|
||
This change seems to have broken my Windows build environment. I'm getting errors about AR_STATE not being defined, even though AR_STATE is definitely in WinUser.h (and windows.h should include that). I've updated Visual Studio, bootstrapped, etc., all to no avail. I don't have time to look into this properly right now, but I'll file a bug another day if I still can't get this working.
Assignee | ||
Comment 6•1 year ago
|
||
(In reply to James Teh [:Jamie] from comment #5)
This change seems to have broken my Windows build environment. I'm getting errors about AR_STATE not being defined, even though AR_STATE is definitely in WinUser.h (and windows.h should include that). I've updated Visual Studio, bootstrapped, etc., all to no avail. I don't have time to look into this properly right now, but I'll file a bug another day if I still can't get this working.
Thanks for notification and sorry. I guess that it seems to depend on Windows SDK version (the latest version of Windows 11 SDK). Fix is coming soon.
Assignee | ||
Comment 7•1 year ago
|
||
Comment 8•1 year ago
|
||
What's odd is that I ran the Visual Studio installer to get the latest updates. The SDK I have is 10.0.22621, which seems to be the latest. So, I don't understand why this doesn't work for me.
Assignee | ||
Comment 9•1 year ago
|
||
Now hal uses AR_STATE for screen orientation, so we should move it from
WinUtils.cpp to WinUtils.h for newer Windows 11 SDK.
Also, newer Windows SDK has to set WINVER to WIN8 to use auto rotation API.
Comment 10•1 year ago
|
||
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/81a6f7f802a0 Part 3. Fix build error for newer Windows SDK. r=gsvelto
Comment 11•1 year ago
|
||
bugherder |
Description
•