Update orientation state (window.screen.orientation) in Responsive Design Mode
Categories
(DevTools :: Responsive Design Mode, defect, P1)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: mail.eraserhead, Assigned: mtigley)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [rdm-mvp] [dt-q])
Attachments
(2 files)
Updated•7 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
window.orientation
is deprecated according to https://developer.mozilla.org/en-US/docs/Web/API/Window/orientation so I will close this bug as wontfix.
Please don't close this. The point is not if window.orientation or window.screen.orientation but that the state doesn't get updated/set in responsive view in either; e.g. when you choose iPad or iPhone in portrait mode the screenOrientation object shows angle: 0; type: "landscape-primary"
Comment 7•6 years ago
|
||
It looks like window.screen.orientation is still supported and we can re-orient the bug around updating that object's behavior.
Comment 8•6 years ago
|
||
Good point, I got carried away with the window.orientation
example but indeed we need to fix it for window.screen.orientation
. I added it to our quality backlog.
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Spec algorithm for determining proper value of screen.orientation is at: https://w3c.github.io/screen-orientation/#updating-the-orientation-information
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 10•6 years ago
|
||
Following the suggested approach here, we can extend the "orientationchange" event handler to update the values of window.screen.orientation
and even window.screen.angle
on the content document.
Since orientation
and angle
are readonly attributes we can't simply modify them directly. Perhaps the next step here is to expose some webidl property allows setting these values only while in RDM. We may be able to reuse SetCurrentOrientationsomewhere.
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Backed out changeset 90ff166702b5 (Bug 1357774) for build bustages at AndroidHal.cpp
Backout: https://hg.mozilla.org/integration/autoland/rev/9c251c872a3370203295a8196c970195abc3bcca
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&revision=90ff166702b5dd7e9848eef62746457b11d8fe92&selectedJob=246511687
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=246511687&repo=autoland&lineNumber=13159
Assignee | ||
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
bugherder |
Assignee | ||
Comment 18•6 years ago
•
|
||
Comment 19•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 20•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•