Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp

Issue 2957733002: Only call TextChanged on existing AXObjects. This avoids triggering the code which calls UpdateDist… (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp b/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp
index 424319f162a34593f5e0b6fd5d010fa3024e6edb..193badcf95637cb913a5f84f0a9757f0ff5c2414 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp
@@ -117,6 +117,8 @@ bool AXMenuList::CanSetFocusAttribute() const {
}
void AXMenuList::DidUpdateActiveOption(int option_index) {
+ bool suppress_notifications =
+ (GetNode() && !GetNode()->IsFinishedParsingChildren());
const auto& child_objects = Children();
if (!child_objects.IsEmpty()) {
DCHECK(child_objects.size() == 1);
@@ -124,7 +126,7 @@ void AXMenuList::DidUpdateActiveOption(int option_index) {
if (child_objects[0]->IsMenuListPopup()) {
if (AXMenuListPopup* popup = ToAXMenuListPopup(child_objects[0].Get()))
- popup->DidUpdateActiveOption(option_index);
+ popup->DidUpdateActiveOption(option_index, !suppress_notifications);
}
}

Powered by Google App Engine
This is Rietveld 408576698