Bug 120121 - Fix startOfWord method to not include white space between words.
Summary: Fix startOfWord method to not include white space between words.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 119829
  Show dependency treegraph
 
Reported: 2013-08-21 10:35 PDT by Roger Fong
Modified: 2013-09-05 18:33 PDT (History)
6 users (show)

See Also:


Attachments
patch (1.69 KB, patch)
2013-08-22 13:57 PDT, Roger Fong
cfleizach: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Fong 2013-08-21 10:35:03 PDT
In VisibileUnits.cpp.
Consider startOfWord for the boundary argument LEFT_WORD_IF_ON_BOUNDARY.
If the current position of the caret is at the start of a word, that is considered on the boundary.
The method in this case returns the previous boundary hoping to get the start of the previous word.
However, instead it just returns the end of the previous word, as that is indeed the previous boundary.

Will fix this so that startOfWord does not treat the whitespace between words as boundaries.
I'm not sure yet whether it makes sense to ignore situations where there is more than one character being used as whitespace between words since that seems to be more deliberate.
Comment 1 Radar WebKit Bug Importer 2013-08-21 10:35:36 PDT
<rdar://problem/14797275>
Comment 2 Roger Fong 2013-08-22 13:57:12 PDT
Created attachment 209392 [details]
patch

This just ignores a single whitespace character between words...
I'm not yet sure I want to extend this to more than one.
Comment 3 Alexey Proskuryakov 2013-08-22 15:38:16 PDT
Comment on attachment 209392 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=209392&action=review

> Source/WebCore/ChangeLog:3
> +        <https://bugs.webkit.org/show_bug.cgi?id=120119> Fix startOfWord method to not include white space between words.

This is a major change very low at the editing stack. I'll be surprised if it doesn't change any behavior.
Comment 4 Roger Fong 2013-08-22 15:51:07 PDT
(In reply to comment #3)
> (From update of attachment 209392 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=209392&action=review
> 
> > Source/WebCore/ChangeLog:3
> > +        <https://bugs.webkit.org/show_bug.cgi?id=120119> Fix startOfWord method to not include white space between words.

I liked to the wrong bug in my changelog -_-

> 
> This is a major change very low at the editing stack. I'll be surprised if it doesn't change any behavior.

I'll try to find a good way to test this on both  mac and windows.
Comment 5 Alexey Proskuryakov 2013-08-22 16:00:38 PDT
Looks like this patch is failing a bunch of tests, EWS just couldn't make up its mind enough to tell us about that. You can see the failures if you click on a yellow bubble.
Comment 6 Roger Fong 2013-08-22 16:34:05 PDT
Actually I can't imagine this working in the more general case at all.
startOfWord calls isStartOfWord, which calls startOfWord....etc etc...my manual tests were clearly not extensive enough.

Will rework things or find a higher level place to fix this.
Comment 7 Roger Fong 2013-08-22 16:49:47 PDT
(In reply to comment #6)
> Actually I can't imagine this working in the more general case at all.
> startOfWord calls isStartOfWord, which calls startOfWord....etc etc...my manual tests were clearly not extensive enough.
> 
> Will rework things or find a higher level place to fix this.

So in webkit, the white space between words also counts as a word. So no change needs to be made to this file.
Comment 8 Roger Fong 2013-08-22 17:45:52 PDT
Holding on that thought, need to first investigate the impact of this on text navigation in screen readers that use iaccessible text like nvda
Comment 9 chris fleizach 2013-08-26 11:18:09 PDT
Comment on attachment 209392 [details]
patch

r- to help clear the r? queue
Comment 10 Roger Fong 2013-09-05 18:33:40 PDT
Not a bug, there are other ways of navigating through words while ignoring white space in place.