Bug 33783

Summary: [DRT][Mac] Add modifiers parameter to mouseDown() and mouseUp()
Product: WebKit Reporter: Kent Tamura <tkent>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric, sky
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 24161    
Attachments:
Description Flags
Patch
none
Proposed patch (rev.2) none

Kent Tamura
Reported 2010-01-17 22:55:23 PST
Add support for mouse events with key modifiers like: eventSender.mouseDown(0, ["addSelectionKey"]) eventSender.mouseUp(0, ["shiftKey", "ctrlKey"])
Attachments
Patch (7.87 KB, patch)
2010-01-17 23:15 PST, Kent Tamura
no flags
Proposed patch (rev.2) (8.01 KB, patch)
2010-01-18 18:37 PST, Kent Tamura
no flags
Kent Tamura
Comment 1 2010-01-17 23:15:31 PST
Darin Adler
Comment 2 2010-01-18 10:49:08 PST
Comment on attachment 46790 [details] Patch > - [self performSelector:@selector(mouseDown:) withObject:nil afterDelay:0]; > - [self performSelector:@selector(mouseUp:) withObject:nil afterDelay:0]; > + [self performSelector:@selector(mouseDown:withModifiers:) withObject:nil afterDelay:0]; > + [self performSelector:@selector(mouseUp:withModifiers:) withObject:nil afterDelay:0]; This isn't reliable. The argument to "withModifiers" will be random data on the stack. The object "nil" is passed as the first argument, but no second argument is passed. The simplest way I can think of to make this work is to keep a method with the old name and have it call the new method. There may be other alternatives. review- because of this
Kent Tamura
Comment 3 2010-01-18 18:37:23 PST
Created attachment 46876 [details] Proposed patch (rev.2)
Kent Tamura
Comment 4 2010-01-18 18:38:34 PST
(In reply to comment #2) > This isn't reliable. The argument to "withModifiers" will be random data on the > stack. The object "nil" is passed as the first argument, but no second argument > is passed. The simplest way I can think of to make this work is to keep a > method with the old name and have it call the new method. There may be other > alternatives. Thank you for the advice. I did so in the updated patch.
Darin Adler
Comment 5 2010-01-19 08:26:35 PST
Comment on attachment 46876 [details] Proposed patch (rev.2) Looks fine. r=me Not directly related to this patch: I realize now that the use of performSelector:withObject: is already wrong for mouseDown: and mouseUp: since they have an argument that is not an object. Someone should clean this up in the future. I think we can just replace mouseDown: and mouseUp: with mouseDownButton0 and mouseUpButton0 methods that don't take arguments at all.
WebKit Commit Bot
Comment 6 2010-01-19 14:50:57 PST
Comment on attachment 46876 [details] Proposed patch (rev.2) Clearing flags on attachment: 46876 Committed r53498: <http://trac.webkit.org/changeset/53498>
WebKit Commit Bot
Comment 7 2010-01-19 14:51:04 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.