Commit 9f638b8e authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Fix the text color of the omnibox

This CL fixes the color of the clean toolbar's omnibox in incognito.

Bug: 791462, 791461
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I63644f78f348b2553a1bd5ac6b2ef33f3d3f12bb
Reviewed-on: https://chromium-review.googlesource.com/805694
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521315}
parent 213268ef
......@@ -139,6 +139,21 @@
tintColor:tintColor];
_locationBar = base::MakeUnique<LocationBarControllerImpl>(
self.locationBarView, self.browserState, self, self.dispatcher);
self.locationBarView.incognito = isIncognito;
self.locationBarView.textField.incognito = isIncognito;
if (isIncognito) {
[_locationBarView.textField
setSelectedTextBackgroundColor:[UIColor colorWithWhite:1 alpha:0.1]];
[_locationBarView.textField
setPlaceholderTextColor:[UIColor colorWithWhite:1 alpha:0.5]];
} else if (!IsIPadIdiom()) {
// Set placeholder text color to match fakebox placeholder text color when
// on iPhone.
UIColor* placeholderTextColor =
[UIColor colorWithWhite:kiPhoneOmniboxPlaceholderColorBrightness
alpha:1.0];
[_locationBarView.textField setPlaceholderTextColor:placeholderTextColor];
}
self.keyboardDelegate = [[ToolbarAssistiveKeyboardDelegateImpl alloc] init];
self.keyboardDelegate.dispatcher = self.dispatcher;
......
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