Commit a628d4ff authored by DongJun Kim's avatar DongJun Kim Committed by Commit Bot

Adding missing braces to AXMenuListPopup::DidHide()

Chromium build with GCC, it had -Wmisleading-indentation
warning in ax_menu_list_popup.cc after commit [1].

It looks unintended and we adds missing braces from
previous patch-set.

Also this patch includes clean-up as removing
redundant function calls.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/769674

Bug: 849614
Change-Id: I45051847e116bc055dd8ba954bd9a0730d7188df
Reviewed-on: https://chromium-review.googlesource.com/1090698
Commit-Queue: DongJun Kim <djmix.kim@samsung.com>
Reviewed-by: default avatarKatie Dektar <katie@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566755}
parent d6c233e7
...@@ -148,11 +148,13 @@ void AXMenuListPopup::DidUpdateActiveOption(int option_index, ...@@ -148,11 +148,13 @@ void AXMenuListPopup::DidUpdateActiveOption(int option_index,
void AXMenuListPopup::DidHide() { void AXMenuListPopup::DidHide() {
AXObjectCacheImpl& cache = AXObjectCache(); AXObjectCacheImpl& cache = AXObjectCache();
AXObject* descendant = ActiveDescendant();
cache.PostNotification(this, AXObjectCacheImpl::kAXHide); cache.PostNotification(this, AXObjectCacheImpl::kAXHide);
if (ActiveDescendant()) if (descendant) {
cache.PostNotification(this, AXObjectCacheImpl::kAXChildrenChanged); cache.PostNotification(this, AXObjectCacheImpl::kAXChildrenChanged);
cache.PostNotification(ActiveDescendant(), cache.PostNotification(descendant,
AXObjectCacheImpl::kAXMenuListItemUnselected); AXObjectCacheImpl::kAXMenuListItemUnselected);
}
} }
void AXMenuListPopup::DidShow() { void AXMenuListPopup::DidShow() {
......
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