Info bars such as translate overlap with the camera and sensor shelf while in landscape mode on iPhoneX |
||||||
Issue descriptionApp 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
,
Sep 15 2017
,
Sep 18 2017
Also, the close button is partially hidden
,
Sep 19 2017
,
Sep 20 2017
M-63 because this is for landscape orientation.
,
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
,
Oct 3 2017
Is the fix in comment 6 enough or do you need further fixes?
,
Oct 3 2017
,
Oct 3 2017
No further fixes are needed.
,
Oct 3 2017
Verified as fixed in iPhoneX 63.0.3232.0. Screenshot: https://drive.google.com/file/d/0By4O1f2IQqQ_UFZha1VKeUV6RkE/view
,
Oct 3 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by linds...@chromium.org
, Sep 14 2017