Browser doesn't rotate to match device orientation after dismissing GLIF screen. |
||||||||||
Issue descriptionApp Version: 65.0.3292.0 canary iOS Version:10.3.3, 11.0.1 Device : iPhone only Precondition : 1- Enable flags: TabSwitcher Presents BVC, Clean Toolbar, Steps to reproduce : 1. Launch chrome in Portrait mode. 2. Tap on GLIF 3. Change the device orientation to landscape mode. 4. Dismiss the GLIF screen. Observed results: NTP screen stays in portrait mode itself. Expected results: NTP screen should change as per the device orientation. Number of times you were able to reproduce: 5/5 Bug reproducible after clean install: Yes Bug reproducible after clearing cache and cookies: Yes Bug reproducible on Chrome Mobile on Android: NA Bug reproducible on Dolphin/Safari/Firefox: Safari : NA Bug reproducible on current stable build (App Version, iOS Version): No, New UI implementation in M65 Bug reproducible on the current beta channel build (App Version, iOS Version): No, New UI implementation in M65 Link to video : https://drive.google.com/file/d/1k-47rY2W-3sqhu0qi6S5MwtZOlWTrthb/view?usp=sharing
,
Dec 13 2017
This is probably unrelated to GLIF, and more related to view controller presentation. It'll probably also reproduce if the settings view controller is presented instead of the GLIF view controller.
,
Dec 14 2017
Unrelated to NTP and CleanToolbar. I can reproduce on a WebPage, but I can't reproduce when displaying the settings. I think it might be because GLIF is shown as an overlay instead of being presented?
,
Dec 14 2017
,
Dec 14 2017
GLIF (and the language selection UI) are both presented view controllers. It looks like from the video, this is on a Plus or X device, since the horizontal size class is regular, which results in a form sheet presentation rather than a fully modal presentation for the language settings UI. It's possible that rotation logic is slightly different on Plus/X devices. In any case, this is related to NTP not receiving rotation events, not with the GLIF UI itself. This could maybe be solved by observing rotation notifications from NTP or by manually performing layout tasks before starting the GLIF dismissal animation.
,
Dec 15 2017
This is also reproducible on non-NTP (which is why I said "unrelated to NTP" and "I can reproduce on a WebPage" in #3). It is also reproducible on non-iPhone + (I reproduced on iPhone 6s). Other reproduction steps: 1. Open a WebPage 2. Tap the omnibox 3. Tap the Voice Search button on the keyboard 4. Rotate the device once the voice search screen is presented (no need to present the language selection sheet) 5. Close Voice Search FYI, iPhone X is compact width in landscape. This is very probably related to the way GLIF is presented (i.e. probably preventing the ViewController behind it to receive rotation event). As I also said in #3, I cannot reproduce with settings or other presented ViewController. This is triggered by the BVC-presentation flag. Marking it as blocking the BVC flag for further investigation.
,
Dec 26 2017
kkhorimoto@: This is caused by the first clause of the conditional in BVC's -shouldAutorotate method, which seems to assume that presenting VCs don't get -shouldAutorotate calls when they are presenting (they do). It looks like the intent of that clause is to avoid rotations during the present/dismiss animations, with the presumption that returning NO while the voice UI is present is a harmless side effect. Bypassing this clause by adding !TabSwitcherPresentsBVCEnabled() to the condition fixes this bug, but since it's not clear what behavior this condition guards against, it's difficult to test for a regression here.
,
Dec 27 2017
I've created crrev.com/c/844855, which updates the check to only return NO if the presented view controller is in a transition animation. + Lindsay. This CL is changing some behavior around BVC autorotation while view controllers are presented (i.e. voice search, settings, etc.). It *should* have no effect other than fixing this bug, but the code it's changing was written before upstreaming, so we have no git history to verify exactly what bug the original code fixed, making it difficult to test against regressions.
,
Dec 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3a449ceed13778480f3bed36186a2fc8767c1a0a commit 3a449ceed13778480f3bed36186a2fc8767c1a0a Author: Kurt Horimoto <kkhorimoto@chromium.org> Date: Wed Dec 27 20:05:00 2017 [iOS] Only disable BVC rotation during transition animations. The previous implementation assumed that a presented view controller's should autorotate was not called, where the actual behavior is that it is called for each view controller individually, Presumably, this clause was introduced to prevent rotation from occurring during presentation or dismissal animations, so this CL updates the check to specifically check for these conditions. Bug: 794439 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Id943e71ab407d00be46f9af248e3de6a08f69649 Reviewed-on: https://chromium-review.googlesource.com/844855 Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by: Mark Cogan <marq@chromium.org> Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#526238} [modify] https://crrev.com/3a449ceed13778480f3bed36186a2fc8767c1a0a/ios/chrome/browser/ui/browser_view_controller.mm
,
Dec 28 2017
,
Jan 4 2018
Verified on chrome canary version iPhone 8 with iOS 11.2.1 and iPhone 7 with iOS 10.3.3, following the steps mentioned in comment #6. Webpage change orientation upon changing the device orientation. Looks good.
,
Jan 5 2018
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by sczs@chromium.org
, Dec 13 2017Owner: gambard@chromium.org
Status: Assigned (was: Untriaged)