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.
<rdar://problem/14797275>
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 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.
(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.
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.
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.
(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.
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 on attachment 209392 [details] patch r- to help clear the r? queue
Not a bug, there are other ways of navigating through words while ignoring white space in place.