Commit 7fc059fc authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Fix positioning of the TabStrip LayoutGuide

The positioning of the LayoutGuide named kTabStripTabSwitcherGuide in
the TabStrip was wrong because the frame wasn't converted to the layout
guide owning view.
It leads to an incorrect positioning, as the width of the button and the
height of the status bar weren't taken into account.

Bug: 876642, 875760
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I537976c049508e3f0ac4a2e52ef654333a9ce1b3
Reviewed-on: https://chromium-review.googlesource.com/1184706Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584981}
parent d5fabc0d
......@@ -743,13 +743,9 @@ UIColor* BackgroundColor() {
- (void)updateTabSwitcherGuide {
NamedGuide* tabSwitcherGuide =
[NamedGuide guideWithName:kTabStripTabSwitcherGuide view:self.view];
tabSwitcherGuide.constrainedFrame = _tabSwitcherButton.frame;
if (UseRTLLayout()) {
CGRect frame = tabSwitcherGuide.constrainedFrame;
frame.origin.x =
self.view.frame.size.width - _tabSwitcherButton.frame.origin.x;
tabSwitcherGuide.constrainedFrame = frame;
}
tabSwitcherGuide.constrainedFrame =
[_tabSwitcherButton.superview convertRect:_tabSwitcherButton.frame
toView:tabSwitcherGuide.owningView];
}
#pragma mark -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment