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

Issue 1467423002: Implement nameFromLabelElement to see if a control is associated with a label. (Closed)

Created:
5 years, 1 month ago by dmazzoni
Modified:
5 years ago
Reviewers:
aboxhall
CC:
chromium-reviews, plundblad+watch_chromium.org, aboxhall, aboxhall+watch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org, nektarios, je_julie, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, blink-reviews, dmazzoni
Base URL:
https://chromium.googlesource.com/chromium/src.git@axlayoutobj_null
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement nameFromLabelElement to see if a control is associated with a label. In a few places in the code, we have an HTML control and a label element, and we want to know if that label is providing the name for that control. It seems clean to call axObject.name() and check the returned nameFrom, but computing the whole name has side effects (creating AXObjects of descendants) so it caused a crash. Instead, nameFromLabelElement is simpler and computes just what's needed. This unfortunately duplicates a small amount of logic. I added comments to hopefully avoid introducing more errors in the future. BUG=558689 Committed: https://crrev.com/183bda8ea817bee6edd0589d02c611fc09fb9cee Cr-Commit-Position: refs/heads/master@{#361395}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -35 lines) Patch
M third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp View 2 chunks +11 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXNodeObject.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp View 3 chunks +51 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXObject.h View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXObject.cpp View 3 chunks +3 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (4 generated)
dmazzoni
5 years, 1 month ago (2015-11-23 22:16:43 UTC) #2
aboxhall
lgtm Yeah, this seems like the only sensible way to do this.
5 years, 1 month ago (2015-11-23 22:45:39 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1467423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1467423002/1
5 years, 1 month ago (2015-11-23 23:17:08 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/133182)
5 years, 1 month ago (2015-11-24 00:42:31 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1467423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1467423002/1
5 years ago (2015-11-24 18:05:59 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years ago (2015-11-24 18:37:24 UTC) #10
commit-bot: I haz the power
5 years ago (2015-11-24 18:39:11 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/183bda8ea817bee6edd0589d02c611fc09fb9cee
Cr-Commit-Position: refs/heads/master@{#361395}

Powered by Google App Engine
This is Rietveld 408576698