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

Issue 2437473003: Fixed line start offsets. (Closed)

Created:
4 years, 2 months ago by nektarios
Modified:
4 years, 2 months ago
Reviewers:
dmazzoni, David Tseng
CC:
aboxhall+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, extensions-reviews_chromium.org, je_julie, nektar+watch_chromium.org, yuzo+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed line start offsets. Now they indeed refer to the offset at the start of each line. This means that if e.g. the first text node starts a new line, the first offset returned should be 0. Further, the offset equivalent to the text's length should never be returned. I chose to stick with line start offsets instead of line breaks because what exactly is a line break? The beginning of the line, the end of the previous line or the line break character in between two lines when it exists? And what happens if there is no line break character, i.e. a soft line break? Line start offsets are less ambiguous. BUG=652059 R=dmazzoni@chromium.org, dtseng@chromium.org TESTED=automation browsertests, manually with ChromeVox on ChromeOS Committed: https://crrev.com/6be580cbb1b4947179978c1c0f2dd9c680a99863 Cr-Commit-Position: refs/heads/master@{#426636}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Removed first line start offset. #

Patch Set 3 : Fixed potential issue that would occur if multiple objects with empty accessible labels where used. #

Total comments: 2

Patch Set 4 : Fixed tests and nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -13 lines) Patch
M chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/accessibility/accessibility_tree_formatter_blink.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/accessibility/ax_node.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/accessibility/ax_node.cc View 1 2 3 1 chunk +15 lines, -8 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
nektarios
4 years, 2 months ago (2016-10-19 16:54:53 UTC) #3
dmazzoni
I'm totally fine with the definition of line start offsets, but the previous line breaks ...
4 years, 2 months ago (2016-10-19 17:34:28 UTC) #4
David Tseng
Sorry, this is still wrong. https://codereview.chromium.org/2437473003/diff/1/ui/accessibility/ax_node.cc File ui/accessibility/ax_node.cc (right): https://codereview.chromium.org/2437473003/diff/1/ui/accessibility/ax_node.cc#newcode80 ui/accessibility/ax_node.cc:80: if (!child->data().HasIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID)) This is ...
4 years, 2 months ago (2016-10-19 17:39:42 UTC) #5
chromium-reviews
On 10/19/2016 1:34 PM, dmazzoni@chromium.org wrote: > I'm totally fine with the definition of line ...
4 years, 2 months ago (2016-10-19 18:24:23 UTC) #6
dmazzoni
Is there any case where we use the line start offsets for anything other than ...
4 years, 2 months ago (2016-10-19 18:31:35 UTC) #7
chromium-reviews
(!child->data().HasIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID)) > This is still wrong... > > - this would include 0; there's *never* ...
4 years, 2 months ago (2016-10-19 18:35:31 UTC) #8
David Tseng
On Wed, Oct 19, 2016 at 11:35 AM, 'Nektarios Paisios' via Chromium-reviews < chromium-reviews@chromium.org> wrote: ...
4 years, 2 months ago (2016-10-19 18:56:38 UTC) #9
dmazzoni
On Wed, Oct 19, 2016 at 11:56 AM David Tseng <dtseng@chromium.org> wrote: > However, I ...
4 years, 2 months ago (2016-10-19 19:16:16 UTC) #10
David Tseng
Sure, but what does it mean to include the image's alt text in the offset ...
4 years, 2 months ago (2016-10-19 19:28:17 UTC) #11
chromium-reviews
As for the <p>this is <br></p> snippet above, it's a counter example to making the ...
4 years, 2 months ago (2016-10-19 19:43:13 UTC) #12
chromium-reviews
> It's fine to include 0; you'll just have to fix automation where we > ...
4 years, 2 months ago (2016-10-19 19:56:43 UTC) #15
dmazzoni
lgtm
4 years, 2 months ago (2016-10-19 20:01:19 UTC) #16
David Tseng
lgtm Final line break case is still broken, but let's fix content editables in general ...
4 years, 2 months ago (2016-10-20 16:03:14 UTC) #19
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/2437473003/60001
4 years, 2 months ago (2016-10-20 21:45:41 UTC) #22
chromium-reviews
https://codereview.chromium.org/2437473003/diff/40001/ui/accessibility/ax_node.cc > File ui/accessibility/ax_node.cc (right): > > https://codereview.chromium.org/2437473003/diff/40001/ui/accessibility/ax_node.cc#newcode80 > ui/accessibility/ax_node.cc:80: // Don't report if the ...
4 years, 2 months ago (2016-10-20 22:13:22 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-20 23:08:22 UTC) #25
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:24:09 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6be580cbb1b4947179978c1c0f2dd9c680a99863
Cr-Commit-Position: refs/heads/master@{#426636}

Powered by Google App Engine
This is Rietveld 408576698