[webkit-dev] SmartDelete incorrect?

Ojan Vafai ojan at chromium.org
Tue Feb 23 14:41:06 PST 2010


On Tue, Feb 23, 2010 at 1:49 PM, Darin Adler <darin at apple.com> wrote:

> On Feb 22, 2010, at 6:47 PM, Ojan Vafai wrote:
> > So, specifically, if I have "foo bar baz" and I select the word "foo"
> using cmd+shift+right, hitting delete will delete the space in WebKit, but
> *not* in TextEdit. If, however, I select the word "foo" using cmd+right,
> hitting delete does not delete the space in either app. The TextEdit
> behavior seems more predictable (and sane).
>
> Command-shift-right selects a line, not a word. I think you mean
> option-shift-right.
>

Heh. Right.


> Option-shift-right does not give you smart deletion behavior in Mac OS X
> NSTextView. Selecting words with double click does. The
> smart-delete-001.html test is testing a particular case of smart deletion
> and we do need a test for that fix. But it incorrectly depends on smart
> deletion mode being set when extending a selection by word. We probably need
> to turn this into two tests:
>
>    1) Test that extending by word does *not* give you smart deletion.
>
>    2) Test that double clicking at the beginning of a line to do smart
> deletion correctly deletes both the word and a space.
>
> It might be tricky to write (2) because I don’t know of a way to make a
> selection that will result in smart deletion with DOM APIs. Maybe
> execCommand("SelectWord")?


For 1, the current test should suffice. For 2, using eventSender to
double-click should work, right?

Thanks, for getting back to me. Bug filed:
https://bugs.webkit.org/show_bug.cgi?id=35314

I'll try and get to this soon unless someone else feels moved to do it. :)

Ojan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100223/77317527/attachment.html>


More information about the webkit-dev mailing list