Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Issue 2589273002: Add sparse accessibility attribute interface to Blink (Closed)

Created:
4 years ago by dmazzoni
Modified:
3 years, 11 months ago
CC:
aboxhall, aboxhall+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, einbinder+watch-test-runner_chromium.org, haraken, jam, je_julie, jochen+watch_chromium.org, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/22632c56f2fe702261795bb3cd3f76a717addf4a

Patch Set 1 #

Patch Set 2 : Use classes instead of a union type #

Patch Set 3 : Rebase #

Patch Set 4 : Try to fix win component build compile #

Total comments: 9

Patch Set 5 : Rename as suggested, and remove new ARIA attributes from this change #

Patch Set 6 : Renamed #

Total comments: 8

Patch Set 7 : Address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+435 lines, -92 lines) Patch
M components/test_runner/web_ax_object_proxy.cc View 1 2 3 4 3 chunks +47 lines, -8 lines 0 comments Download
M content/renderer/accessibility/blink_ax_tree_source.cc View 1 2 3 4 5 6 4 chunks +62 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/dom/QualifiedName.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXNodeObject.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp View 1 2 3 4 5 6 3 chunks +143 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXObject.h View 1 2 3 4 5 6 3 chunks +24 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp View 1 2 3 4 5 6 2 chunks +48 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/web/AssertMatchingEnums.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebAXObject.cpp View 1 2 3 4 5 6 4 chunks +45 lines, -30 lines 0 comments Download
M third_party/WebKit/public/web/WebAXEnums.h View 1 2 3 4 1 chunk +38 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebAXObject.h View 1 2 3 4 3 chunks +18 lines, -3 lines 0 comments Download

Messages

Total messages: 65 (39 generated)
dmazzoni
4 years ago (2016-12-20 17:31:00 UTC) #3
nektarios
components/test_runner/web_ax_object_proxy.cc +#include "base/containers/hash_tables.h" I don’t think we are using any hash tables in this patch. ...
4 years ago (2016-12-22 18:33:26 UTC) #8
nektarios
components/test_runner/web_ax_object_proxy.cc +#include "base/containers/hash_tables.h" I don’t think we are using any hash tables in this patch. ...
4 years ago (2016-12-22 18:33:47 UTC) #9
nektarios
components/test_runner/web_ax_object_proxy.cc +#include "base/containers/hash_tables.h" I don’t think we are using any hash tables in this patch. ...
4 years ago (2016-12-22 18:33:47 UTC) #10
dmazzoni
On 2016/12/22 18:33:26, nektarios wrote: > +#include "base/containers/hash_tables.h" > > I don’t think we are ...
3 years, 11 months ago (2016-12-28 23:51:32 UTC) #11
dmazzoni
OK, take a look - I'm not sure if this is exactly what you had ...
3 years, 11 months ago (2016-12-29 06:43:15 UTC) #14
dcheng
On 2016/12/29 06:43:15, dmazzoni wrote: > OK, take a look - I'm not sure if ...
3 years, 11 months ago (2016-12-29 09:11:12 UTC) #21
dmazzoni
On 2016/12/29 09:11:12, dcheng wrote: > On 2016/12/29 06:43:15, dmazzoni wrote: > > OK, take ...
3 years, 11 months ago (2016-12-29 16:07:27 UTC) #22
dmazzoni
+aboxhall since Nektarios is still on vacation
3 years, 11 months ago (2017-01-09 22:22:34 UTC) #28
aboxhall
It took me a really long time to get my head around what was going ...
3 years, 11 months ago (2017-01-10 05:59:59 UTC) #29
dmazzoni
I renamed the classes and pulled the 5 new ARIA attributes out of this change, ...
3 years, 11 months ago (2017-01-12 03:36:24 UTC) #31
aboxhall
lgtm but please consider renaming the two "adapter" classes. https://codereview.chromium.org/2589273002/diff/60001/third_party/WebKit/Source/web/WebAXObject.cpp File third_party/WebKit/Source/web/WebAXObject.cpp (right): https://codereview.chromium.org/2589273002/diff/60001/third_party/WebKit/Source/web/WebAXObject.cpp#newcode65 third_party/WebKit/Source/web/WebAXObject.cpp:65: ...
3 years, 11 months ago (2017-01-12 04:26:52 UTC) #36
dmazzoni
On 2017/01/12 04:26:52, aboxhall wrote: > I meant because it's adapting WebAXSparseAttributeClient (and similarly with ...
3 years, 11 months ago (2017-01-12 07:08:51 UTC) #37
dmazzoni
On 2017/01/12 04:26:52, aboxhall wrote: > I meant because it's adapting WebAXSparseAttributeClient (and similarly with ...
3 years, 11 months ago (2017-01-12 07:08:51 UTC) #38
dmazzoni
+dglazkov for owners review
3 years, 11 months ago (2017-01-12 07:09:16 UTC) #40
dmazzoni
Renaming done.
3 years, 11 months ago (2017-01-13 20:24:24 UTC) #41
dmazzoni
Ping for OWNERS review of WebKit/public and adding mkwst and dcheng...
3 years, 11 months ago (2017-01-18 16:23:44 UTC) #47
nektarios
Sorry, I have some comments too. Over all I liked the idea of using maps ...
3 years, 11 months ago (2017-01-18 18:45:19 UTC) #48
nektarios
third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp +class SparseAttributeAXPropertyAdapter + : public GarbageCollected<SparseAttributeAXPropertyAdapter>, AXObject needs finalization. I think you should inherit ...
3 years, 11 months ago (2017-01-18 20:38:33 UTC) #49
haraken
On 2017/01/18 20:38:33, nektarios wrote: > third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp > > +class SparseAttributeAXPropertyAdapter > + : public ...
3 years, 11 months ago (2017-01-18 23:40:00 UTC) #51
Mike West
WebKit/public LGTM.
3 years, 11 months ago (2017-01-19 07:32:56 UTC) #52
dcheng
LGTM with some minor nits https://codereview.chromium.org/2589273002/diff/100001/content/renderer/accessibility/blink_ax_tree_source.cc File content/renderer/accessibility/blink_ax_tree_source.cc (right): https://codereview.chromium.org/2589273002/diff/100001/content/renderer/accessibility/blink_ax_tree_source.cc#newcode59 content/renderer/accessibility/blink_ax_tree_source.cc:59: WebVector<WebAXObject> objects, Nit: pass ...
3 years, 11 months ago (2017-01-19 23:02:45 UTC) #53
dmazzoni
On 2017/01/18 18:45:19, nektarios wrote: > components/test_runner/web_ax_object_proxy.cc > > + std::map<blink::WebAXBoolAttribute, bool> bool_attributes; > + ...
3 years, 11 months ago (2017-01-21 00:16:24 UTC) #54
dmazzoni
https://codereview.chromium.org/2589273002/diff/100001/content/renderer/accessibility/blink_ax_tree_source.cc File content/renderer/accessibility/blink_ax_tree_source.cc (right): https://codereview.chromium.org/2589273002/diff/100001/content/renderer/accessibility/blink_ax_tree_source.cc#newcode59 content/renderer/accessibility/blink_ax_tree_source.cc:59: WebVector<WebAXObject> objects, On 2017/01/19 23:02:44, dcheng wrote: > Nit: ...
3 years, 11 months ago (2017-01-21 00:16:36 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2589273002/120001
3 years, 11 months ago (2017-01-23 20:44:20 UTC) #62
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 22:58:18 UTC) #65
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/22632c56f2fe702261795bb3cd3f...

Powered by Google App Engine
This is Rietveld 408576698