Commit 7dcc72b3 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Chromium LUCI CQ

Use the correct BrowserAccessibilityManager for a node

No change in behavior expected, but this is to fix an inconsistency in
the code where calls were made using a mismatched BrowserAccessibility
and BrowserAccessibilityManager.

Bug: None
Change-Id: I73cac6b0e901c2685272415fcb28c7542ed6fe34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615201Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841554}
parent 48b3bf81
...@@ -357,9 +357,11 @@ void BrowserAccessibilityManager::ParentConnectionChanged( ...@@ -357,9 +357,11 @@ void BrowserAccessibilityManager::ParentConnectionChanged(
return; return;
parent->OnDataChanged(); parent->OnDataChanged();
parent->UpdatePlatformAttributes(); parent->UpdatePlatformAttributes();
parent = BrowserAccessibilityManager* parent_manager = parent->manager();
RetargetForEvents(parent, RetargetEventType::RetargetEventTypeGenerated); parent = parent_manager->RetargetForEvents(
FireGeneratedEvent(ui::AXEventGenerator::Event::CHILDREN_CHANGED, parent); parent, RetargetEventType::RetargetEventTypeGenerated);
parent_manager->FireGeneratedEvent(
ui::AXEventGenerator::Event::CHILDREN_CHANGED, parent);
} }
BrowserAccessibility* BrowserAccessibilityManager::GetPopupRoot() const { BrowserAccessibility* BrowserAccessibilityManager::GetPopupRoot() const {
......
...@@ -196,6 +196,9 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeObserver, ...@@ -196,6 +196,9 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeObserver,
// If this tree has a parent tree, return the parent node in that tree. // If this tree has a parent tree, return the parent node in that tree.
BrowserAccessibility* GetParentNodeFromParentTree() const; BrowserAccessibility* GetParentNodeFromParentTree() const;
// Refreshes a parent node in a parent tree when it needs to be informed that
// this tree is ready or being destroyed. For example, an iframe object
// in a parent tree may need to link or unlink to this manager.
void ParentConnectionChanged(BrowserAccessibility* parent); void ParentConnectionChanged(BrowserAccessibility* parent);
// In general, there is only a single node with the role of kRootWebArea, // In general, there is only a single node with the role of kRootWebArea,
......
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