RDM doesn't fire change event of screen.orientation
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(firefox135 fixed)
| Tracking | Status | |
|---|---|---|
| firefox135 | --- | fixed |
People
(Reporter: m_kato, Assigned: rubicon)
References
()
Details
Attachments
(1 file, 1 obsolete file)
What were you doing?
- https://makotokato.github.io/demo/orientation.html
- Use RDM in devtools
- Click rotation icon
What happened?
orientationchange event on window object is fired, but change event on screen.orientation object isn't fired.
What should have happened?
change event on screen.orientation object isn't fired.
I guess that we should simulate change event in simulateScreenOrientationChange or _setRDMPaneOrientation
Comment 1•4 years ago
|
||
Thanks, we might have to fix this in https://searchfox.org/mozilla-central/rev/9bed2623831804ac086bbb80cb666e5c3b00416a/docshell/base/BrowsingContext.h#608
Comment 3•4 years ago
|
||
So I guess we should call dom/base/ScreenOrientation.cpp#576-592 from docshell/base/BrowsingContext.h#608.
Micah, I see you modified BrowsingContext.h not too long ago , do you think you could take care of this issue ? If not, do you know we should ask for this (maybe calu) ? Thanks!
Comment 4•4 years ago
|
||
I can take a look into this. Thanks Nicolas!
Comment 5•4 years ago
|
||
nsGlobalWindowInner::Orientation seems like it won't look at the BrowsingContext orientation either.
Can we do the browsingcontext orientation thing as a sort-of override rather than keeping the values stored in the browsing context for all documents? That might be simpler.
Comment 6•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)
nsGlobalWindowInner::Orientationseems like it won't look at the BrowsingContext orientation either.Can we do the browsingcontext orientation thing as a sort-of override rather than keeping the values stored in the browsing context for all documents? That might be simpler.
If I remember correctly, the orientation values were stored on the browsing context so that they persisted across refreshes while in RDM. I'm not entirely sure if there's now/already another way to do this.
Comment 7•4 years ago
|
||
Sure, and that's totally fine. My point is that right now we're treating the BrowsingContext values as the source of truth even when RDM is disabled. It'd be slightly easier to follow if this worked like other overrides, e.g.:
if (Maybe<uint16_t> angle = bc->GetOverrideAngle()) {
return *angle;
}
return ScreenAngle();
But anyways I guess that's sort of an implementation detail that can be changed at any time :)
Comment 8•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
| Assignee | ||
Comment 9•1 year ago
|
||
The change event is fired in ResponseActor.dispatchOrientationChangeEvent, along side the orientationchange event.
Updated•1 year ago
|
| Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
Description
•