New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 794439 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug

Blocking:
issue 787821



Sign in to add a comment

Browser doesn't rotate to match device orientation after dismissing GLIF screen.

Project Member Reported by pmadalla@chromium.org, Dec 13 2017

Issue description

App 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

 

Comment 1 by sczs@chromium.org, Dec 13 2017

Cc: kkhorimoto@chromium.org sczs@chromium.org edchin@chromium.org
Owner: gambard@chromium.org
Status: Assigned (was: Untriaged)
gambard@ since you know NTP and Toolbar could you PTAL. Not sure if Clean Toolbar is needed.

Also adding edchin for presentation flag and Kurt as GLIF owner.
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.
Cc: gambard@chromium.org marq@chromium.org rohitrao@chromium.org
Owner: kkhorimoto@chromium.org
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?
Labels: zine-triaged
Owner: ----
Status: Available (was: Assigned)
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.
Blocking: 787821
Labels: Bling-Arch-BVC-Presentation
Owner: kkhorimoto@chromium.org
Status: Assigned (was: Available)
Summary: Browser doesnt changes as per the device orientation after dismissing GLIF screen. (was: NTP screen doesnt changes as per the device orientation after dismissing GLIF screen.)
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.

Comment 7 by marq@chromium.org, Dec 26 2017

Summary: Browser doesn't rotate to match device orientation after dismissing GLIF screen. (was: Browser doesnt changes as per the device orientation after dismissing GLIF screen.)
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.
Cc: linds...@chromium.org
Status: Started (was: Assigned)
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.
Project Member

Comment 9 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
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.

Comment 12 by cmasso@google.com, Jan 5 2018

Labels: End-of-January

Sign in to add a comment