Commit f4a63b5b authored by Justin Donnelly's avatar Justin Donnelly Committed by Commit Bot

[omnibox] Re-apply styling on result view selection change.

Do this only in the pre-Refresh UI, where on Windows (and possibly
some other circumstances?), the text styling is dependent on the
selection state.

Bug: 869768
Change-Id: If4ec69bb2316b0596116210f6e3aa70d1866b182
Reviewed-on: https://chromium-review.googlesource.com/1176196Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583353}
parent 01ab8973
......@@ -176,10 +176,10 @@ void OmniboxResultView::Invalidate() {
suggestion_view_->description()->SetText(match_.description,
match_.description_class);
// Normally, OmniboxTextView caches its appearance, but in high contrast
// selected-ness changes the text colors, so the styling of the text part of
// the results needs to be recomputed.
if (high_contrast) {
// Normally, OmniboxTextView caches its appearance, but in high contrast and
// on Windows in the pre-Refresh UI, selected-ness changes the text colors,
// so the styling of the text part of the results needs to be recomputed.
if (high_contrast || !ui::MaterialDesignController::IsRefreshUi()) {
suggestion_view_->content()->ReapplyStyling();
suggestion_view_->description()->ReapplyStyling();
}
......
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