Closed Bug 1595800 Opened 5 years ago Closed 5 years ago

Persist orientation state of device while in RDM

Categories

(DevTools :: Responsive Design Mode, defect, P1)

defect

Tracking

(firefox73 verified)

VERIFIED FIXED
Firefox 73
Tracking Status
firefox73 --- verified

People

(Reporter: mtigley, Assigned: mtigley)

References

(Blocks 1 open bug)

Details

(Whiteboard: fission-rdm-mvp)

Attachments

(4 files)

Steps to Reproduce

  1. Make sure devtools.responsive.browserUI.enabled
  2. Open RDM, and select the iPad from the devices list.
  3. Rotate the viewport by pressing the "Rotate Viewport" icon located in the toolbar.
  4. Check the screen.orientation object in the DevTools console. The type attribute should be "landscape-primary" and the angle attribute should be 90.
  5. Refresh the page and check these values again.

ER:
type and angle values should still be "landscape-primary" and 90, respectively.

AR:
Values reflect the orientation of the physical device.

Priority: -- → P2
Whiteboard: fission-rdm-mvp
Assignee: nobody → mtigley
Status: NEW → ASSIGNED
Priority: P2 → P1
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/196ca9fefb06 Part 1: Move screen orientation attributes from Document to BrowsingContext r=smaug https://hg.mozilla.org/integration/autoland/rev/2f607bbc19b9 Part 2: Use screen orientation attributes from BrowsingContext instead of Document. r=smaug https://hg.mozilla.org/integration/autoland/rev/d44c8dde04be Part 3: Remove screen orientation attributes used for RDM from Document. r=smaug https://hg.mozilla.org/integration/autoland/rev/7d6f51331aed Part 4: Update RDM to use setRDMPaneOrientation from BrowsingContext r=bradwerth
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2167343f5bd3 Part 1: Move screen orientation attributes from Document to BrowsingContext r=smaug https://hg.mozilla.org/integration/autoland/rev/ef7f9e251137 Part 2: Use screen orientation attributes from BrowsingContext instead of Document. r=smaug https://hg.mozilla.org/integration/autoland/rev/558449ce7d0a Part 3: Remove screen orientation attributes used for RDM from Document. r=smaug https://hg.mozilla.org/integration/autoland/rev/c78cb9bbddb9 Part 4: Update RDM to use setRDMPaneOrientation from BrowsingContext r=bradwerth

Backed out 4 changesets (bug 1595800) for failing at browser_orientationchange_event.js on a CLOSED TREE.

Backout link: https://hg.mozilla.org/integration/autoland/rev/103d411e6606c7b58dc5c76d28f3c3270d2d4546

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=c78cb9bbddb90b887b9cc68b7fc8e62ace183cb5&selectedJob=279440515

Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=279440515&repo=autoland&lineNumber=16103

Log snippet:

[task 2019-12-03T23:01:18.507Z] 23:01:18 INFO - GECKO(2454) | [Parent 2454: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 12 (0x7f44f5881800) [pid = 2454] [serial = 219] [outer = (nil)] [url = chrome://devtools/content/responsive/index.xhtml]
[task 2019-12-03T23:02:35.961Z] 23:02:35 INFO - Longer timeout required, waiting longer... Remaining timeouts: 1
[task 2019-12-03T23:03:49.831Z] 23:03:49 INFO - Console message: [JavaScript Error: "getScreenshot(http://example.com/) failed: TypeError: NetworkError when attempting to fetch resource." {file: "resource://activity-stream/lib/Screenshots.jsm" line: 59}]
[task 2019-12-03T23:03:49.831Z] 23:03:49 INFO - getScreenshotForURL@resource://activity-stream/lib/Screenshots.jsm:59:10
[task 2019-12-03T23:03:49.831Z] 23:03:49 INFO - asyncmaybeCacheScreenshot@resource://activity-stream/lib/Screenshots.jsm:112:37
[task 2019-12-03T23:03:49.831Z] 23:03:49 INFO - _fetchScreenshot@resource://activity-stream/lib/TopSitesFeed.jsm:527:23
[task 2019-12-03T23:03:49.831Z] 23:03:49 INFO - _fetchIcon@resource://activity-stream/lib/TopSitesFeed.jsm:515:16
[task 2019-12-03T23:03:49.831Z] 23:03:49 INFO - getLinksWithDefaults@resource://activity-stream/lib/TopSitesFeed.jsm:408:16
[task 2019-12-03T23:03:49.832Z] 23:03:49 INFO - async
refresh@resource://activity-stream/lib/TopSitesFeed.jsm:431:30
[task 2019-12-03T23:03:49.832Z] 23:03:49 INFO - onAction@resource://activity-stream/lib/TopSitesFeed.jsm:771:14
[task 2019-12-03T23:03:49.833Z] 23:03:49 INFO - _middleware/</<@resource://activity-stream/lib/Store.jsm:63:17
[task 2019-12-03T23:03:49.834Z] 23:03:49 INFO - Store/this[method]@resource://activity-stream/lib/Store.jsm:39:54
[task 2019-12-03T23:03:49.834Z] 23:03:49 INFO - init/this.intervalId<@resource://activity-stream/lib/SystemTickFeed.jsm:27:24
[task 2019-12-03T23:03:49.835Z] 23:03:49 INFO - notify@resource://gre/modules/Timer.jsm:62:17
[task 2019-12-03T23:03:49.836Z] 23:03:49 INFO -
[task 2019-12-03T23:05:15.782Z] 23:05:15 INFO - GECKO(2454) | [2019-12-03T23:05:15Z WARN rkv::backend::impl_safe::environment] Ignoring map_size=16777216
[task 2019-12-03T23:05:35.959Z] 23:05:35 INFO - TEST-INFO | started process screentopng
[task 2019-12-03T23:05:36.651Z] 23:05:36 INFO - TEST-INFO | screentopng: exit 0
[task 2019-12-03T23:05:36.654Z] 23:05:36 INFO - TEST-UNEXPECTED-FAIL | devtools/client/responsive/test/browser/browser_orientationchange_event.js | Test timed out -
[task 2019-12-03T23:05:36.655Z] 23:05:36 INFO - Removing tab.
[task 2019-12-03T23:05:36.656Z] 23:05:36 INFO - Waiting for event: 'TabClose' on [object XULElement].

Flags: needinfo?(mtigley)

Ah, I misinterpreted this intermittent from the last try push as an already existing intermittent from Bug 1557985 . However, this failure in devtools/client/responsive/test/browser/browser_orientationchange_event.js is new and definitely caused by Part 4 of the patch series.

Now that RDM is no longer setting the orientation state every reload, the UI no longer fires the "only-viewport-orientation-changed" and was introduced in Bug 1556533. This event is a way for RDM to tell the browser to change orientation state, but not dispatch the "orientationchange" event! Ways this can happen is by changing the device, opening RDM, and previously reloading.

To fix this, the tests need to be updated to not expect this event when the browser is reloaded.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=31c1b88b2dfd79a7c004738fb4d097498e043120

Flags: needinfo?(mtigley)
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c1e05bac0e6 Part 1: Move screen orientation attributes from Document to BrowsingContext r=smaug https://hg.mozilla.org/integration/autoland/rev/2ae7aa5e9591 Part 2: Use screen orientation attributes from BrowsingContext instead of Document. r=smaug https://hg.mozilla.org/integration/autoland/rev/9a2b92229bfb Part 3: Remove screen orientation attributes used for RDM from Document. r=smaug https://hg.mozilla.org/integration/autoland/rev/ef1e1295c578 Part 4: Update RDM to use setRDMPaneOrientation from BrowsingContext r=bradwerth

Reproduced the issue with the steps from comment 0, using an affected Nightly build (2019-11-12).

This bug is verified as fixed on Beta 73.0b4 across platforms: Win 10 x64, macOS 10.13 and Ubuntu 18.04 x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: