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

Issue 2153213002: Better work around for Blink selection issues. (Closed)

Created:
4 years, 5 months ago by David Tseng
Modified:
4 years, 5 months ago
Reviewers:
nektarios, dmazzoni
CC:
aboxhall+watch_chromium.org, arv+watch_chromium.org, chromium-reviews, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, je_julie, nektar+watch_chromium.org, oshima+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

Better work around for Blink selection issues. In the interest of getting something that works, conform to the way selections work in the Blink accessibility tree. For reference, the way it behaves is as follows: - on non-static text nodes, the index is a child index (0-based). - if the node is a static text node, the client must compute an offset as follows. Walk up to the parent of the static text, compute the length of all of the text descendants up to that static text, and finally add any remaining offsets into the static text in question. For example, the paragraph containing: child 1: static text name=this is a child 2: link child rstatic text name=test child 3: static text name=of selection exhibits this behavior. Furthermore, the link itself which contains a static text, starts with a 0-offset (following the same rules above). - after making a selection, the offsets behave sort of more like DOM indexes. For example, the above snippet when selecting offsets 13/14, gives back 'o' as expected but the anchor node is set to the static text for the link's static text at offset 4. The focus object is set to 1 for the last static text. This is surprising and probably has a lot of weird corner cases I haven't uncovered yet. BUG=626385 TEST=chromevox_tests CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/d14eace0f228ce66113791ad781640e311d0e549 Cr-Commit-Position: refs/heads/master@{#406413}

Patch Set 1 #

Patch Set 2 : Handle line breaks. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -22 lines) Patch
M chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js View 1 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js View 1 2 chunks +25 lines, -22 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs View 1 2 chunks +34 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (18 generated)
David Tseng
4 years, 5 months ago (2016-07-15 19:00:12 UTC) #5
chromium-reviews
+ var texts = parent.findAll({role: RoleType.staticText}); What about line break roles? > + // Only ...
4 years, 5 months ago (2016-07-15 19:51:06 UTC) #10
nektarios
lgtm
4 years, 5 months ago (2016-07-15 19:51:28 UTC) #11
David Tseng
On Fri, Jul 15, 2016 at 12:51 PM, Nektarios Paisios <nektar@google.com> wrote: > + var ...
4 years, 5 months ago (2016-07-19 21:43:03 UTC) #18
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/2153213002/20001
4 years, 5 months ago (2016-07-19 21:57:16 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-19 23:36:43 UTC) #23
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 23:36:46 UTC) #24
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 23:38:24 UTC) #26
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d14eace0f228ce66113791ad781640e311d0e549
Cr-Commit-Position: refs/heads/master@{#406413}

Powered by Google App Engine
This is Rietveld 408576698