Bug 120538 - [WK2][Mac] Drag and drop tests interfere with user's UI
Summary: [WK2][Mac] Drag and drop tests interfere with user's UI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks: 68552
  Show dependency treegraph
 
Reported: 2013-08-30 10:35 PDT by Alexey Proskuryakov
Modified: 2013-09-01 23:36 PDT (History)
2 users (show)

See Also:


Attachments
proposed fix (25.46 KB, patch)
2013-08-30 11:00 PDT, Alexey Proskuryakov
mitz: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-08-30 10:35:03 PDT
Drag and drop happens on screen, taking away focus and sometimes even dropping text snippets into running applications. Crazy.
Comment 1 Alexey Proskuryakov 2013-08-30 11:00:15 PDT
Created attachment 210136 [details]
proposed fix
Comment 2 Build Bot 2013-08-30 17:47:08 PDT
Comment on attachment 210136 [details]
proposed fix

Attachment 210136 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/1661151
Comment 3 mitz 2013-09-01 11:05:59 PDT
Comment on attachment 210136 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=210136&action=review

> Source/WebKit2/ChangeLog:8
> +        * UIProcess/API/mac/WKView.mm: (-[WKView _setDragImage:at:linkDrag:]): Make it possible

Missing newline after “mm:”.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2761
> +    [self dragImage:image
>                    at:clientPoint

Now the colons are not aligned!

> Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:438
>  				E1C642C417CBCD4C00D66A3C /* WebKitTestRunnerPasteboard.mm */,
> +				E132AA3817CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm */,
> +				E132AA3917CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.h */,
> +				E132AA3B17CE776F00611DF0 /* WebKitTestRunnerEvent.mm */,
> +				E132AA3C17CE776F00611DF0 /* WebKitTestRunnerEvent.h */,

Not in alphabetical order.

> Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h:27
> +#ifndef WebKitTestRunnerDraggingInfo_h
> +#define WebKitTestRunnerDraggingInfo_h

Such guards aren’t needed in Objective-C headers, because implementation files should #import them.

> Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h:29
> +#import <Cocoa/Cocoa.h>

Is this needed?

> Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h:36
> +    NSSize offset;
> +    NSImage *draggedImage;
> +    NSPasteboard *draggingPasteboard;
> +    id draggingSource;

Normally ivar names have a _ prefix.

> Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:37
> +- (id)initWithImage:(NSImage *)anImage offset:(NSSize)o pasteboard:(NSPasteboard *)pboard source:(id)source

If you rename the ivars to start with an underscore, you could use “image”, “offset”, and “pasteboard” as the parameter names.

> Tools/WebKitTestRunner/mac/WebKitTestRunnerEvent.h:27
> +#ifndef WebKitTestRunnerEvent_h
> +#define WebKitTestRunnerEvent_h

No need for this.
Comment 4 Alexey Proskuryakov 2013-09-01 23:36:01 PDT
Committed <http://trac.webkit.org/r154949>.