Add sparse accessibility attribute interface to Blink
It's inefficient to have separate interfaces in blink::WebAXObject to
query for each possible attribute, especially when those attributes are
rare and obscure ARIA attributes. Calling getAttribute many times in a row
is wasteful since many Elements have a lot of attributes we don't care
about, and many ARIA attributes are quite rare.
This change introduces a new WebAXObject interface for returning sparse
attributes. Call it once and pass a callback function. The implementation
iterates over all of the attributes of the element and calls the callback
with each accessibility attribute found.
This change re-implements the following 3 ARIA attributes as sparse
attributes; they're covered by existing tests:
aria-activedescendant
aria-controls
aria-flowto
BUG=675994,644766
Review-Url: https://codereview.chromium.org/2589273002
Cr-Commit-Position: refs/heads/master@{#445527}
13 files changed