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

Issue 765415 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Info bars such as translate overlap with the camera and sensor shelf while in landscape mode on iPhoneX

Project Member Reported by linds...@chromium.org, Sep 14 2017

Issue description

App Version: 63.0.3215.0
iOS Version: iOS11
Device: iPhoneX Sim
URL: Info Bar

Steps to reproduce:
  1. Launch app
  2. Open new tab
  3. Go to foo.es
  4. Tap Translate

Observed results:
Observe the Translate confirmation info bar overlaps with the camera and sensor shelf while in landscape mode on iPhoneX.

Expected results:
The Translate confirmation info bar shouldn't overlap with the camera and sensor shelf while in landscape mode on iPhoneX.

Screenshot: https://drive.google.com/file/d/0By4O1f2IQqQ_V2RnS1Z6UzNuRE0/view
 
 
Description: Show this description

Comment 2 by jif@chromium.org, Sep 15 2017

Owner: jif@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by jif@chromium.org, Sep 18 2017

Also, the close button is partially hidden
Screen Shot 2017-09-18 at 14.49.28.png
70.6 KB View Download

Comment 4 by jif@chromium.org, Sep 19 2017

Status: Started (was: Assigned)

Comment 5 by pkl@chromium.org, Sep 20 2017

Labels: M-63
M-63 because this is for landscape orientation.
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 29 2017

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

commit d6ae0d9cc19790a63968b2d6b1b7f1f2f80fcd1e
Author: Jean-François Geyelin <jif@chromium.org>
Date: Fri Sep 29 09:17:56 2017

Take into account the safe area in infobars.

This CL:
-Adds a compatibility header to obtain a view's
safeAreaInsets.
-Removes the unnecessary |imageViewContainer_| from the infobar view.
-Takes into account the safeAreaInsets where needed in the infobar view:
   * leftMarginOnFirstLine returns the space from the left edge of the
     screen to where the infobar's text should start.
     It handles 2 cases:
       A) When there's an icon (e.g. a translate icon)
          The old code was using |frameOfIcon|, which now already takes
          into account the safeArea. The logic needed to be changed, and
          it's now: icon.x + icon.width + margin.
       B) When there's no icon
          The safeAreaInset is taken into account.
   * rightMarginOnFirstLine is the space from the right edge of the screen
     to where the infobar's text should start.
     The safeAreaInset is taken into account.
   * heightThatFitsButtonsUnderOtherWidgets does not use
     leftMarginOnFirstLine nor rightMarginOnFirstLine because it handles
     views not on the first line. When not on the first line you have
     more space because the icon and the close button are not in the way.
     This function still needs to have an idea of how much horizontal space
     is available, and thus needs to take into account the horizontal
     safeArea (both left and right).
   * computeRequiredHeightAndLayoutSubviews returns the total height of
     the infobar. We add the safeAreaInset.bottom to the total
     computed height, which makes the infobar taller.
     This allows us to have more white space at the bottom of the
     infobars.
   * frameOfCloseButton is updated so that the close button
     is moved left to be in the safe area.
   * frameOfIcon is updated so that the icon is moved right
     to be in the safe area.

https://drive.google.com/open?id=0Bw-kA2pwDsU-OXlJSUE3VmxMZGc

Bug:  765415 
Change-Id: I35c1718ca170ccef245f51f28fa7eed63f1d9042
Reviewed-on: https://chromium-review.googlesource.com/671353
Reviewed-by: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Commit-Queue: Jean-François Geyelin <jif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505335}
[modify] https://crrev.com/d6ae0d9cc19790a63968b2d6b1b7f1f2f80fcd1e/ios/chrome/browser/ui/infobars/infobar_view.mm
[modify] https://crrev.com/d6ae0d9cc19790a63968b2d6b1b7f1f2f80fcd1e/ios/chrome/browser/ui/uikit_ui_util.h
[modify] https://crrev.com/d6ae0d9cc19790a63968b2d6b1b7f1f2f80fcd1e/ios/chrome/browser/ui/uikit_ui_util.mm

Comment 7 by pkl@chromium.org, Oct 3 2017

Is the fix in comment 6 enough or do you need further fixes?

Comment 8 by jif@chromium.org, Oct 3 2017

Status: Fixed (was: Started)

Comment 9 by jif@chromium.org, Oct 3 2017

No further fixes are needed.
Verified as fixed in iPhoneX 63.0.3232.0.

Screenshot: https://drive.google.com/file/d/0By4O1f2IQqQ_UFZha1VKeUV6RkE/view
Status: Verified (was: Fixed)

Sign in to add a comment