[Webkit-unassigned] [Bug 36256] shift+click to extend a wordgranularity selection backwards selects the space after
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 15 11:07:16 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=36256
--- Comment #9 from Van Lam <vanlam at google.com> 2011-09-15 11:07:16 PST ---
(In reply to comment #8)
> (From update of attachment 104955 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=104955&action=review
>
> >>> Source/WebCore/editing/VisibleSelection.cpp:300
>
> >>
> >> I'd split it into two lines since this is really long line. ap & mitz should probably look at this change.
> >
> > No, if c is at the end of a word, endOfWord(c, RightWordIfOnBoundary) returns the end of the following word.
>
> Why do we have to compare m_extent with originalEnd?
Given that I'm checking isEndOfWord(originalEnd) && start != originalEnd, without doing the additional m_extent != originalEnd check, word-granularity mouse selections don't work correctly. What happens is given:
foo bar baz
If you double click in 'bar' and drag the mouse to the right to the position after the r in 'bar, it should grow the selection to include the space after 'bar' (in general the next word); it doesn't grow the selection if I omit the check in question.
I do admit it's not very clear what this check is doing; I'll try to find a more clear way to do this check. I initially saw that the first check (if originalEnd is at the end of a word) would fix the problem and added the other two checks to keep other behavior the same.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list