Commit 21dc754b authored by David Tseng's avatar David Tseng Committed by Commit Bot

Partial revert: Fixes performance of Google Calendar + ChromeVox/automation

This is a small partial revert of
https://chromium-review.googlesource.com/c/chromium/src/+/1947643

The check in desktop_automation_handler.js -> range_automation_handler.js onEventIfInRange helped prevent processing of repeated attribute changes that come from the subtree of ChromeVox's current range.

For example, Gmail's threadlist where focus is on a row. Any attribute changes within cells or on individual cells caused output.

TBR=dmazzoni@chromium.org

Change-Id: I696cd506a2c8d33bfa343d36df76f7551c79bb56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951085Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721587}
parent 19d2de0e
...@@ -83,6 +83,9 @@ RangeAutomationHandler.prototype = { ...@@ -83,6 +83,9 @@ RangeAutomationHandler.prototype = {
return; return;
} }
// TODO: we need more fine grained filters for attribute changes.
if (prev.contentEquals(cursors.Range.fromNode(evt.target)) ||
evt.target.state.focused) {
var prevTarget = this.lastAttributeTarget_; var prevTarget = this.lastAttributeTarget_;
// Re-target to active descendant if it exists. // Re-target to active descendant if it exists.
...@@ -112,6 +115,7 @@ RangeAutomationHandler.prototype = { ...@@ -112,6 +115,7 @@ RangeAutomationHandler.prototype = {
} }
this.lastAttributeOutput_.go(); this.lastAttributeOutput_.go();
}
}, },
/** /**
......
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