Commit d4774195 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

Apply safe area to omnibox popup width.

Although the omnibox popup itself honors safe are in the table view, the width
of the omnibox pop text can be too wide.

Bug: 787164
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: If10523863a4ffd404a8c255bbad6b5219aa534e1
Reviewed-on: https://chromium-review.googlesource.com/807784Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521688}
parent aea81eaa
......@@ -231,8 +231,10 @@ UIColor* BackgroundColorIncognito() {
[detailTextLabel setTextAlignment:_alignment];
// The width must be positive for CGContextRef to be valid.
CGFloat labelWidth =
MAX(40, floorf(row.frame.size.width) - kTextCellLeadingPadding);
UIEdgeInsets safeAreaInsets = SafeAreaInsetsForView(row);
CGFloat labelWidth = MAX(
40, floorf(UIEdgeInsetsInsetRect(row.bounds, safeAreaInsets).size.width) -
kTextCellLeadingPadding);
CGFloat labelHeight =
match.hasAnswer ? kAnswerLabelHeight : kTextDetailLabelHeight;
CGFloat answerImagePadding = kAnswerImageWidth + kAnswerImageRightPadding;
......
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