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

Issue 2191833003: Use text affinity to return correct accessible line boundaries. (Closed)

Created:
4 years, 4 months ago by dmazzoni
Modified:
4 years, 4 months ago
CC:
aboxhall, aboxhall+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, dmazzoni, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, extensions-reviews_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
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use text affinity to return correct accessible line boundaries. Our calculations of line boundaries for accessibility were wrong in certain cases where the character offset is ambiguous. It's possible for there to be a line break immediately between two characters, such that one character is on the previous line and one is on the next line. If the character index is between those two characters, previously we had no way of knowing if the cursor was on the first line or second line. Fix this by passing through the text affinity of the selection focus and anchor from Blink all the way into Chrome's accessibility tree. If the affinity is upstream, it means the cursor is on the previous line, and downstream means the next line. I added a LayoutTest for Blink and a unit test for Chrome. I also manually verified this fixes at least one broken case with VoiceOver, see the bug for a very specific repro. BUG=632450 Committed: https://crrev.com/25a949f677564d5e7ee1e7379528fd9c79a6ed6e Cr-Commit-Position: refs/heads/master@{#408989}

Patch Set 1 #

Patch Set 2 : Fix win compile #

Patch Set 3 : Fix bug in browser_accessibility_win.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+453 lines, -110 lines) Patch
M chrome/common/extensions/chrome_extension_messages.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/test_runner/web_ax_object_proxy.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/test_runner/web_ax_object_proxy.cc View 4 chunks +50 lines, -8 lines 0 comments Download
M content/browser/accessibility/browser_accessibility.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/accessibility/browser_accessibility.cc View 3 chunks +20 lines, -8 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_cocoa.mm View 19 chunks +81 lines, -40 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_unittest.cc View 1 chunk +47 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win.cc View 1 2 1 chunk +12 lines, -3 lines 0 comments Download
M content/common/accessibility_messages.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/accessibility/blink_ax_enum_conversion.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/accessibility/blink_ax_enum_conversion.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M content/renderer/accessibility/blink_ax_tree_source.cc View 2 chunks +5 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/accessibility/selection-affinity.html View 1 chunk +87 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp View 4 chunks +17 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXObject.h View 1 chunk +17 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/AssertMatchingEnums.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebAXObject.cpp View 2 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/public/web/WebAXEnums.h View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebAXObject.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/accessibility/ax_enums.idl View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/accessibility/ax_text_utils.h View 2 chunks +3 lines, -1 line 0 comments Download
M ui/accessibility/ax_text_utils.cc View 2 chunks +12 lines, -3 lines 0 comments Download
M ui/accessibility/ax_text_utils_unittest.cc View 3 chunks +41 lines, -20 lines 0 comments Download
M ui/accessibility/ax_tree_data.h View 1 chunk +5 lines, -1 line 0 comments Download
M ui/accessibility/ax_tree_data.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M ui/accessibility/platform/ax_platform_node_win.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 28 (17 generated)
dmazzoni
4 years, 4 months ago (2016-07-28 19:54:07 UTC) #4
nektarios
1. Could we do the affinity calculations in Blink and expose the corresponding anchor or ...
4 years, 4 months ago (2016-07-28 20:52:20 UTC) #7
dmazzoni
On Thu, Jul 28, 2016 at 1:52 PM <nektar@chromium.org> wrote: > 1. Could we do ...
4 years, 4 months ago (2016-07-28 21:09:00 UTC) #8
dmazzoni
On Thu, Jul 28, 2016 at 1:52 PM <nektar@chromium.org> wrote: > 1. Could we do ...
4 years, 4 months ago (2016-07-28 21:09:01 UTC) #9
nektarios
lgtm
4 years, 4 months ago (2016-07-28 22:03:09 UTC) #10
dmazzoni
+mkwst for public/web and Source/web +tsepez for ipc *messages* and *param_traits* files
4 years, 4 months ago (2016-07-28 22:10:34 UTC) #12
Tom Sepez
On 2016/07/28 22:10:34, dmazzoni wrote: > +mkwst for public/web and Source/web > +tsepez for ipc ...
4 years, 4 months ago (2016-07-28 22:15:22 UTC) #13
Mike West
LGTM.
4 years, 4 months ago (2016-08-01 11:45:11 UTC) #22
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/2191833003/40001
4 years, 4 months ago (2016-08-01 15:47:57 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-01 17:21:04 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 17:22:58 UTC) #28
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/25a949f677564d5e7ee1e7379528fd9c79a6ed6e
Cr-Commit-Position: refs/heads/master@{#408989}

Powered by Google App Engine
This is Rietveld 408576698