Commit b63fffc7 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Do not fire events on trimmed descendants of leaf nodes

NOTRY:true

Bug: 887512
Change-Id: Ie4aab44d8eb186b9aff35036aa5317c6f79fc643
Reviewed-on: https://chromium-review.googlesource.com/1236714
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593562}
parent 095b5229
......@@ -373,7 +373,7 @@ void BrowserAccessibilityManager::OnAccessibilityEvents(
// Fire any events related to changes to the tree.
for (auto targeted_event : *this) {
BrowserAccessibility* event_target = GetFromAXNode(targeted_event.node);
if (!event_target)
if (!event_target || event_target->PlatformIsChildOfLeaf())
continue;
FireGeneratedEvent(targeted_event.event_params.event, event_target);
......@@ -386,7 +386,7 @@ void BrowserAccessibilityManager::OnAccessibilityEvents(
// Fire the native event.
BrowserAccessibility* event_target = GetFromID(event.id);
if (!event_target)
if (!event_target || event_target->PlatformIsChildOfLeaf())
return;
if (event.event_type == ax::mojom::Event::kHover)
......
......@@ -197,6 +197,9 @@ void BrowserAccessibilityManagerWin::FireGeneratedEvent(
void BrowserAccessibilityManagerWin::FireWinAccessibilityEvent(
LONG win_event_type,
BrowserAccessibility* node) {
if (node->PlatformIsChildOfLeaf())
return;
// If there's no root delegate, this may be a new frame that hasn't
// yet been swapped in or added to the frame tree. Suppress firing events
// until then.
......
......@@ -6,4 +6,3 @@ EVENT_OBJECT_SHOW role=ROLE_SYSTEM_CARET window_class=Chrome_WidgetWin_0
EVENT_OBJECT_VALUECHANGE on <input#in1> role=ROLE_SYSTEM_TEXT value="end" FOCUSABLE IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE
IA2_EVENT_TEXT_CARET_MOVED on <input#in1> role=ROLE_SYSTEM_TEXT value="abcde" FOCUSED,FOCUSABLE IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE
IA2_EVENT_TEXT_CARET_MOVED on <input#in1> role=ROLE_SYSTEM_TEXT value="abcde" FOCUSED,FOCUSABLE IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE
IA2_EVENT_TEXT_CARET_MOVED on role=ROLE_SYSTEM_STATICTEXT name="abcde" IA2_STATE_EDITABLE
\ No newline at end of file
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