Chromium Code Reviews
DescriptionImplement caching asynchronous accessibility hit testing.
Native accessibility APIs all have some sort of "hit test"
function. Unfortunately on Mac, Windows, and Linux, they're all
synchronous APIs. This is problematic for Chrome because only
the render process can do an accurate hit test.
Previously we relied on an approximate hit test based on
accessible bounding boxes in the browser process. This was
okay for debugging, but not for users with low-vision who want
the accessible cursor to follow the mouse accurately.
To fix it, every time we get a hit test request we send an
asynchronous message to do an accurate hit test. While waiting,
we return an approximate hit test result instead. The next time
the mouse moves, if it's within the bounds of the object found
by the asynchronous hit test, we return that.
In practice it works well - as you mouse over an object, the
first pixel you cross will occasionally return the wrong object,
but one or two pixels later the correct object has been returned
by Blink and then it's correct.
Includes a test that confirms this behavior, that calling the
hit test first returns an approximate result and then later
returns the correct result if you call it repeatedly.
BUG=652996
Committed: https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e
Cr-Commit-Position: refs/heads/master@{#424521}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Remove log #Patch Set 3 : Fix unit tests #Patch Set 4 : Made test more robust #Messages
Total messages: 18 (8 generated)
|