Bug 36141 - Fix webkit win test failures for smart delete
Summary: Fix webkit win test failures for smart delete
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-15 14:42 PDT by Ojan Vafai
Modified: 2010-03-16 15:30 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.90 KB, patch)
2010-03-15 14:42 PDT, Ojan Vafai
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2010-03-15 14:42:10 PDT
fix webkit win test failures for smart delete
Comment 1 Ojan Vafai 2010-03-15 14:42:50 PDT
Created attachment 50743 [details]
Patch
Comment 2 Alexey Proskuryakov 2010-03-15 15:52:47 PDT
Comment on attachment 50743 [details]
Patch

Is doubleClickAtSelectionStart() used in any other tests? Does it misbehave in those? Would it be a good idea to change it instead, adding 1 pixel to coordinates?

I was going to say r=me, but then realized that I don't understand why Mac test results changed.
Comment 3 Ojan Vafai 2010-03-15 16:51:45 PDT
(In reply to comment #2)
> (From update of attachment 50743 [details])
> Is doubleClickAtSelectionStart() used in any other tests?

Yes.

> Does it misbehave in those?

Doesn't seem to. I haven't dug enough to really understand what the underlying issue is, so it's hard to say whether all cases of doubleClickAtSelectionStart could have this problem.

> Would it be a good idea to change it instead, adding 1 pixel to
> coordinates?

I can certainly do that. I considered it, but it seemed a bit strange given that a collapsed selection is zero-width. In either case, I was going for the minimal change that would green the tree.

> I was going to say r=me, but then realized that I don't understand why Mac test
> results changed.

Yeah, it took me a minute to make sense of that as well. I'm pretty sure what's happening is that the initial click of the double click is now moving the selection and the second click is selecting the word. Before, the initial click was in the same place as the caret, so there was no selection change.
Comment 4 Alexey Proskuryakov 2010-03-15 17:09:25 PDT
Comment on attachment 50743 [details]
Patch

Oh, that's an unfortunate limitation of eventSender.

> I can certainly do that. I considered it, but it seemed a bit strange given
> that a collapsed selection is zero-width.

Yes - but that can only applied to non-collapsed selections.
Comment 5 Ojan Vafai 2010-03-16 15:30:10 PDT
Committed r56089: <http://trac.webkit.org/changeset/56089>