RESOLVED FIXED214169
MobileSafari rotates its scene to portrait upside down if it has a PiP on screen
https://bugs.webkit.org/show_bug.cgi?id=214169
Summary MobileSafari rotates its scene to portrait upside down if it has a PiP on screen
Peng Liu
Reported 2020-07-09 17:45:42 PDT
MobileSafari rotates its scene to portrait upside down if it has a PiP on screen
Attachments
Patch (1.72 KB, patch)
2020-07-09 17:50 PDT, Peng Liu
no flags
Patch (2.17 KB, patch)
2020-07-10 10:37 PDT, Peng Liu
no flags
Peng Liu
Comment 1 2020-07-09 17:50:10 PDT
Peng Liu
Comment 2 2020-07-09 17:50:44 PDT
Sam Weinig
Comment 3 2020-07-09 17:51:39 PDT
Comment on attachment 403937 [details] Patch What will it take to make a test for this?
Jer Noble
Comment 4 2020-07-09 17:56:02 PDT
Comment on attachment 403937 [details] Patch I'm concerned that this line was in here for a good reason, like allowing a portrait-locked app to open video in landscape fullscreen. Maybe a better idea is to set `m_viewContrtoller.get()._ignoreAppSupportedOrientations = NO` when we hide the window?
Peng Liu
Comment 5 2020-07-10 10:32:09 PDT
(In reply to Sam Weinig from comment #3) > Comment on attachment 403937 [details] > Patch > > What will it take to make a test for this? We need a full UI test, where we can open a WK2 app, rotate the device into upside-down-mode, and verify that the UI doesn’t flip that way. That cannot be done with a layout test. We might be able to do that with an API test, but we need to fix a bug regarding video fullscreen and picture-in-picture test first (bug 212654).
Jer Noble
Comment 6 2020-07-10 10:35:39 PDT
(In reply to Peng Liu from comment #5) > (In reply to Sam Weinig from comment #3) > > Comment on attachment 403937 [details] > > Patch > > > > What will it take to make a test for this? > > We need a full UI test, where we can open a WK2 app, rotate the device into > upside-down-mode, and verify that the UI doesn’t flip that way. That cannot > be done with a layout test. We might be able to do that with an API test, > but we need to fix a bug regarding video fullscreen and picture-in-picture > test first (bug 212654). We need more than API tests, because we can't drive simulated hardware rotations from API tests. XCUITest would be a reasonable framework for doing this, I think, but we don't have any XCUITests set up at the moment. XCUITests would let us do a bunch more tests of things like "is the fullscreen airplay button "active" during an airplay session", and the like.
Peng Liu
Comment 7 2020-07-10 10:37:55 PDT
Peng Liu
Comment 8 2020-07-10 10:41:12 PDT
(In reply to Jer Noble from comment #4) > Comment on attachment 403937 [details] > Patch > > I'm concerned that this line was in here for a good reason, like allowing a > portrait-locked app to open video in landscape fullscreen. > > Maybe a better idea is to set > `m_viewContrtoller.get()._ignoreAppSupportedOrientations = NO` when we hide > the window? Good point! I think we need to ignore App's supported orientations when a video is in fullscreen. But, when the video is in picture-in-picture, we should NOT ignore that. I have uploaded a new patch.
Peng Liu
Comment 9 2020-07-10 10:43:03 PDT
(In reply to Jer Noble from comment #6) > (In reply to Peng Liu from comment #5) > > We need more than API tests, because we can't drive simulated hardware > rotations from API tests. XCUITest would be a reasonable framework for doing > this, I think, but we don't have any XCUITests set up at the moment. > > XCUITests would let us do a bunch more tests of things like "is the > fullscreen airplay button "active" during an airplay session", and the like. Right!
EWS
Comment 10 2020-07-10 13:13:38 PDT
Committed r264237: <https://trac.webkit.org/changeset/264237> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403981 [details].
Note You need to log in before you can comment on or make changes to this bug.