Commit 2b3d2237 authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

Fix inline autocomplete highlight color.

Avoids caching the inline autocomplete color in UI Refresh, and uses
_displayedTintColor instead of self.tintColor (which can be transparent
when the textfield is hidden behind inline autocomplete or preedit).

Bug: 865497
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I358cd0b10694271d4d0514b3dfe9b7415c1c9106
Reviewed-on: https://chromium-review.googlesource.com/1152985Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579736}
parent ad4e884e
......@@ -985,18 +985,17 @@ NSString* const kOmniboxFadeAnimationKey = @"OmniboxFadeAnimation";
}
- (UIColor*)selectedTextBackgroundColor {
if (!_selectedTextBackgroundColor) {
if (IsUIRefreshPhase1Enabled()) {
_selectedTextBackgroundColor =
[self.tintColor colorWithAlphaComponent:0.2];
return [_displayedTintColor colorWithAlphaComponent:0.2];
} else {
if (!_selectedTextBackgroundColor) {
_selectedTextBackgroundColor = [UIColor colorWithRed:204.0 / 255
green:221.0 / 255
blue:237.0 / 255
alpha:1.0];
}
}
return _selectedTextBackgroundColor;
}
}
- (BOOL)isColorHidden:(UIColor*)color {
......
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