Commit a9b864f4 authored by manuk's avatar manuk Committed by Commit Bot

Schedule repaint of location bar when its background is modified.

This issue was most noticeable when quickly alt-tabbing away and back to chrome, or blurring and re-focusing the omnibox. The omnibox schedules a repaint for the location bar when it blurs, but not when it focuses. This caused the region of the location bar that is not overlapped by the omnibox to be stale when the omnibox gains focus quickly after losing focus; the omnibox would be painted with its focus-color (white) while the location bar would retain its blur-color (light gray). This was not an issue prior to material refresh because the omnibox and location bar did not change color on focus and blur.

Bug: 853370
Change-Id: I7c6035a09e76cf9fff019234e769ffc312b0a9bd
Reviewed-on: https://chromium-review.googlesource.com/1112494
Commit-Queue: manuk hovanesian <manukh@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570119}
parent 37cb4d23
...@@ -811,6 +811,8 @@ void LocationBarView::RefreshBackground() { ...@@ -811,6 +811,8 @@ void LocationBarView::RefreshBackground() {
// correctly enable subpixel AA. // correctly enable subpixel AA.
omnibox_view_->SetBackgroundColor(background_color); omnibox_view_->SetBackgroundColor(background_color);
omnibox_view_->EmphasizeURLComponents(); omnibox_view_->EmphasizeURLComponents();
SchedulePaint();
} }
void LocationBarView::RefreshLocationIcon() { void LocationBarView::RefreshLocationIcon() {
...@@ -1265,7 +1267,6 @@ void LocationBarView::OnOmniboxBlurred() { ...@@ -1265,7 +1267,6 @@ void LocationBarView::OnOmniboxBlurred() {
void LocationBarView::OnOmniboxHoverChanged() { void LocationBarView::OnOmniboxHoverChanged() {
RefreshBackground(); RefreshBackground();
SchedulePaint();
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
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