[Webkit-unassigned] [Bug 33413] selection.modify extends too far with 'lineboundary'

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 10 13:06:02 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33413





--- Comment #7 from Ojan Vafai <ojan at chromium.org>  2010-03-10 13:06:01 PST ---
(In reply to comment #6)
> > I'm not really sure what sentenceboundary/paragraphboundary are used for, 
> > i.e. do they correspond to a user-action?
> 
> Without actually checking the code, I suspect that you get paragraphboundary
> when triple-clicking and dragging, and also when triple-clicking and then
> extending the selection from keyboard with Cmd+Shift+Right (but when I tested,
> the results from the latter seemed wrong).

I played with this a bit more. ctrl+shift+e extends the selection to the end of
the current paragraph and ctrl+shift+a will extend the selection to the
beginning of the current paragraph. I tested this in WebKit and TextEdit and
the behavior seems to be the same. So, I think this patch is fine as far as
paragraphboundary is concerned, which makes sense since upstream/downstream is
not really meaningful at a paragraph boundary.

As far as sentenceboundary, I think it probably does not need the same
treatment as lineboundary, but I really don't know what the expected behavior
of sentenceboundary is. I've sent and email to webkit-dev to try and understand
this better.

Also, I tested the modifyMovingForward case (cmd+left and cmd+right). They work
in the testcase. It does not need to be modified because
VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity does
nothing for CharacterGranularity. It's that function that causes this bug when
you have the granularity set to LineGranularity.

I've answered my own questions. :) The code seems fine to me, except for ap's
question about whether we really need to set the affinity back.

-- 
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