Commit ecff804c authored by Robert Liao's avatar Robert Liao Committed by Commit Bot

Remove Combobox::SetSelectedIndex Equality Early Return

No optimization comes for free. There are too many places where
selected_index_ can change without going through proper property change
codepaths.

At this stage of the release cycle, the safest change is to revert the
optimziation introduced in r656230.

Bug: 1132465
Change-Id: I332435d94a63ea6b86835df34bae6d4300e154d7
Fixed: 1132244
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432810
Commit-Queue: Robert Liao <robliao@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Auto-Submit: Robert Liao <robliao@chromium.org>
Reviewed-by: default avatarWei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810897}
parent 2bb6fe93
......@@ -276,9 +276,7 @@ const gfx::FontList& Combobox::GetFontList() const {
}
void Combobox::SetSelectedIndex(int index) {
if (selected_index_ == index)
return;
// TODO(http://crbug.com/1132465): No-op when selected_index_ == index.
selected_index_ = index;
if (size_to_largest_label_) {
OnPropertyChanged(&selected_index_, kPropertyEffectsPaint);
......
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