Commit a5ed1eda authored by Caroline Rising's avatar Caroline Rising Committed by Commit Bot

Fix button highlight flashing when entering fullscreen.

This change prevents unhighlighting if the anchor button has not changed. Highlighting was added to a button when a widget is anchored to that button. On entering fullscreen, a widget's anchor is reset regardless of whether it was changed. This would unhighlight then rehighlight the button but only be noticable on Mac.

Bug: 905992
Change-Id: I4989a45101c704105f5b4a572e028c851b6165b7
Reviewed-on: https://chromium-review.googlesource.com/c/1351106
Commit-Queue: Caroline Rising <corising@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611778}
parent 65453a44
...@@ -221,7 +221,7 @@ void BubbleDialogDelegateView::SetHighlightedButton( ...@@ -221,7 +221,7 @@ void BubbleDialogDelegateView::SetHighlightedButton(
bool visible = GetWidget() && GetWidget()->IsVisible(); bool visible = GetWidget() && GetWidget()->IsVisible();
// If the Widget is visible, ensure the old highlight (if any) is removed // If the Widget is visible, ensure the old highlight (if any) is removed
// when the highlighted view changes. // when the highlighted view changes.
if (visible) if (visible && highlighted_button != highlighted_button_tracker_.view())
UpdateHighlightedButton(false); UpdateHighlightedButton(false);
highlighted_button_tracker_.SetView(highlighted_button); highlighted_button_tracker_.SetView(highlighted_button);
if (visible) if (visible)
......
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