New issue
Advanced search Search tips

Issue 862688 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Save card infobar layout breaks on iPhone X

Project Member Reported by mahmadi@chromium.org, Jul 11

Issue description

This likely has to do with the safe area inset as iPhone X is the only one with a bottom safe area inset. Currently as a temporary solution |-setFrame:| is overridden to call |-layoutIfNeeded| in order to update the layout of subviews immediately, if layout updates are pending, rather than waiting for the next update cycle. This goes against UIKit's optimization where it consolidates all of the layout updates to one update cycle.
 
iphonex-change-orientation (1).mp4
3.1 MB View Download
Cc: -khorimoto@chromium.org kkhorimoto@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d88e198988ce5d9f8782f20f53effcadd02c047

commit 8d88e198988ce5d9f8782f20f53effcadd02c047
Author: Moe Ahmadi <mahmadi@chromium.org>
Date: Thu Oct 11 16:03:47 2018

[IOS][AF] Fixes save card infobar crash on iPhone X

Currently to fix a layout issue in the save card infobar in iPhone X,
|-setFrame:| is overridden to call |-layoutIfNeeded| in order to update the
layout of subviews immediately. |-setFrame:| won't be required to be
overridden if the logic to adjust the layout constraints is moved from
|-sizeThatFits:| to |-layoutSubviews|. The existing logic is likely to be
wrong as the layout should not get updated in calls to |-sizeThatFits|.

This is likely the root cause for the crash in crbug.com/892144

Bug:  862688 ,892144
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Iee81a30afa14581f304813512b84b86fc5c6feb5
Reviewed-on: https://chromium-review.googlesource.com/c/1262087
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598784}
[modify] https://crrev.com/8d88e198988ce5d9f8782f20f53effcadd02c047/ios/chrome/browser/ui/autofill/save_card_infobar_view.mm

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Verified in:

App Version: 72.0.3581.0 canary, 71.0.3578.9 beta
Devices: iPhoneX
iOS Version: 11.4.1, 12.0.1

Save card infobar layout looks good 

Video:
https://drive.google.com/file/d/1RF9Vja7W2mI4kLhI9ErDLwLpUhDN21NI/view?usp=sharing

Sign in to add a comment