Changeset 154949 in webkit
- Timestamp:
- Sep 1, 2013 11:36:21 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r154934 r154949 1 2013-09-01 Alexey Proskuryakov <ap@apple.com> 2 3 [WK2][Mac] Drag and drop tests interfere with user's UI 4 https://bugs.webkit.org/show_bug.cgi?id=120538 5 6 Reviewed by Dan Bernstein. 7 8 * UIProcess/API/mac/WKView.mm: (-[WKView _setDragImage:at:linkDrag:]): Make it possible 9 to override drag initiation in subclasses. It is a bit unfortunate that this exposes 10 a deprecated API that we call, but probably not unfortunate enough to invent a new 11 scary looking name for the same function, and conditionally call that if implemented 12 by subclass. 13 1 14 2013-08-31 Santosh Mahto <santosh.ma@samsung.com> 2 15 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r153753 r154949 2755 2755 [image setSize:size]; 2756 2756 2757 // The call to supercould release this WKView.2757 // The call below could release this WKView. 2758 2758 RetainPtr<WKView> protector(self); 2759 2759 2760 [s uperdragImage:image2761 2762 2763 2764 2765 2766 2760 [self dragImage:image 2761 at:clientPoint 2762 offset:NSZeroSize 2763 event:(linkDrag) ? [NSApp currentEvent] :_data->_mouseDownEvent 2764 pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] 2765 source:self 2766 slideBack:YES]; 2767 2767 } 2768 2768 -
trunk/Tools/ChangeLog
r154923 r154949 1 2013-09-01 Alexey Proskuryakov <ap@apple.com> 2 3 [WK2][Mac] Drag and drop tests interfere with user's UI 4 https://bugs.webkit.org/show_bug.cgi?id=120538 5 6 Reviewed by Dan Bernstein. 7 8 This makes running WebKit2 regression tests locally more viable. The patch doesn't 9 fix drag and drop tests to work as expected, I posted some thought about that in 10 <https://bugs.webkit.org/show_bug.cgi?id=68552>. 11 12 * WebKitTestRunner/EventSenderProxy.h: 13 (WTR::EventSenderProxy::position): 14 * WebKitTestRunner/TestController.h: 15 (WTR::TestController::eventSenderProxy): 16 Expose a way to get current mouse position from anywhere in WKTR code. 17 18 * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Added new files. 19 20 * WebKitTestRunner/mac/EventSenderProxy.mm: (WTR::EventSenderProxy::mouseUp): 21 Copied a FIXME comment from DumpRenderTree. 22 23 * WebKitTestRunner/mac/PlatformWebViewMac.mm: 24 (-[TestRunnerWKView dragImage:at:offset:event:pasteboard:source:slideBack:]): 25 Override drag initiation, using a custom NSDraggingInfo implementation. 26 27 * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitialize): 28 Replace NSEvent with a custom class. 29 30 * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h: Added. 31 * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: Added. 32 * WebKitTestRunner/mac/WebKitTestRunnerEvent.h: Added. 33 * WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Added. 34 Largely a copy of DumpRenderTree classes, modified to not use global variables. 35 We should consider making these variables static in EventSenderProxy though, as 36 it's strange that mouse state in WKTR is reset between tests without WebKit ever 37 being told about that. 38 1 39 2013-08-30 Brent Fulgham <bfulgham@apple.com> 2 40 -
trunk/Tools/WebKitTestRunner/EventSenderProxy.h
r152530 r154949 28 28 #define EventSenderProxy_h 29 29 30 #include <wtf/Deque.h> 31 30 32 #if PLATFORM(QT) 31 33 #include <QEvent> … … 33 35 #elif PLATFORM(GTK) 34 36 #include <gdk/gdk.h> 35 #include <wtf/Deque.h>36 37 #elif PLATFORM(EFL) 37 38 #include <WebKit2/EWebKit2.h> 38 #include <wtf/Deque.h>39 39 #endif 40 40 … … 53 53 explicit EventSenderProxy(TestController*); 54 54 ~EventSenderProxy(); 55 56 WKPoint position() const { return m_position; } 55 57 56 58 void mouseDown(unsigned button, WKEventModifiers); -
trunk/Tools/WebKitTestRunner/TestController.h
r154720 r154949 64 64 WKContextRef context() { return m_context.get(); } 65 65 66 EventSenderProxy* eventSenderProxy() { return m_eventSenderProxy.get(); } 67 66 68 void ensureViewSupportsOptions(WKDictionaryRef options); 67 69 -
trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
r154652 r154949 86 86 BCDA2B9A1191051F00C3BC47 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */; }; 87 87 C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0CE720A1247C93300BC0EC4 /* TestRunnerMac.mm */; }; 88 E132AA3A17CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = E132AA3817CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm */; }; 89 E132AA3D17CE776F00611DF0 /* WebKitTestRunnerEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = E132AA3B17CE776F00611DF0 /* WebKitTestRunnerEvent.mm */; }; 88 90 E1BA671E1742DA6A00C20251 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1BA671D1742DA5A00C20251 /* Carbon.framework */; }; 89 91 E1C642C317CBCC7300D66A3C /* PoseAsClass.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1C642C117CBCC7300D66A3C /* PoseAsClass.mm */; }; … … 222 224 BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 223 225 C0CE720A1247C93300BC0EC4 /* TestRunnerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestRunnerMac.mm; path = mac/TestRunnerMac.mm; sourceTree = "<group>"; }; 226 E132AA3817CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitTestRunnerDraggingInfo.mm; sourceTree = "<group>"; }; 227 E132AA3917CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitTestRunnerDraggingInfo.h; sourceTree = "<group>"; }; 228 E132AA3B17CE776F00611DF0 /* WebKitTestRunnerEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitTestRunnerEvent.mm; sourceTree = "<group>"; }; 229 E132AA3C17CE776F00611DF0 /* WebKitTestRunnerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitTestRunnerEvent.h; sourceTree = "<group>"; }; 224 230 E1BA671D1742DA5A00C20251 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; 225 231 E1C642C117CBCC7300D66A3C /* PoseAsClass.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PoseAsClass.mm; sourceTree = "<group>"; }; … … 423 429 BC7933FF118F7C84005EA8E2 /* main.mm */, 424 430 BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */, 431 E1C642C217CBCC7300D66A3C /* PoseAsClass.h */, 425 432 E1C642C117CBCC7300D66A3C /* PoseAsClass.mm */, 426 E1C642C217CBCC7300D66A3C /* PoseAsClass.h */,427 433 BC8C795B11D2785D004535A1 /* TestControllerMac.mm */, 434 E132AA3917CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.h */, 435 E132AA3817CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm */, 436 E132AA3C17CE776F00611DF0 /* WebKitTestRunnerEvent.h */, 437 E132AA3B17CE776F00611DF0 /* WebKitTestRunnerEvent.mm */, 438 E1C642C517CBCD4C00D66A3C /* WebKitTestRunnerPasteboard.h */, 428 439 E1C642C417CBCD4C00D66A3C /* WebKitTestRunnerPasteboard.mm */, 429 E1C642C517CBCD4C00D66A3C /* WebKitTestRunnerPasteboard.h */,430 440 ); 431 441 path = mac; … … 546 556 08FB7793FE84155DC02AAC07 /* Project object */ = { 547 557 isa = PBXProject; 548 attributes = {549 };550 558 buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "WebKitTestRunner" */; 551 559 compatibilityVersion = "Xcode 3.1"; … … 614 622 5322FB4313FDA0CD0041ABCC /* CyclicRedundancyCheck.cpp in Sources */, 615 623 E1C642C317CBCC7300D66A3C /* PoseAsClass.mm in Sources */, 624 E132AA3D17CE776F00611DF0 /* WebKitTestRunnerEvent.mm in Sources */, 616 625 5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */, 617 626 26D758E7160BECDD00268472 /* GeolocationProviderMock.cpp in Sources */, … … 624 633 BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */, 625 634 BC9192051333E4F8003011DC /* TestInvocationCG.cpp in Sources */, 635 E132AA3A17CD5F1000611DF0 /* WebKitTestRunnerDraggingInfo.mm in Sources */, 626 636 3164C8F015D1ADA100EF1FE0 /* WebNotificationProvider.cpp in Sources */, 627 637 4429FC5F1627089600F66D8B /* WorkQueueManager.cpp in Sources */, -
trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
r151757 r154949 31 31 #import "StringFunctions.h" 32 32 #import "TestController.h" 33 #import <wtf/RetainPtr.h>34 33 #import <Carbon/Carbon.h> 35 34 #import <WebKit2/WKString.h> 35 #import <wtf/RetainPtr.h> 36 36 37 37 namespace WTR { … … 180 180 181 181 NSView *targetView = [m_testController->mainWebView()->platformView() hitTest:[event locationInWindow]]; 182 // FIXME: Silly hack to teach WKTR to respect capturing mouse events outside the WKView. 183 // The right solution is just to use NSApplication's built-in event sending methods, 184 // instead of rolling our own algorithm for selecting an event target. 182 185 targetView = targetView ? targetView : m_testController->mainWebView()->platformView(); 183 assert(targetView);186 ASSERT(targetView); 184 187 [targetView mouseUp:event]; 185 188 if (buttonNumber == LeftMouseButton) -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r149716 r154949 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #include "config.h" 27 #include "PlatformWebView.h" 28 #include "TestController.h" 29 26 #import "config.h" 27 #import "PlatformWebView.h" 28 29 #import "TestController.h" 30 #import "WebKitTestRunnerDraggingInfo.h" 30 31 #import <WebKit2/WKImageCG.h> 31 32 #import <WebKit2/WKViewPrivate.h> 32 33 #import <wtf/RetainPtr.h> 33 34 35 using namespace WTR; 36 34 37 @interface WebKitTestRunnerWindow : NSWindow { 35 WTR::PlatformWebView* _platformWebView;38 PlatformWebView* _platformWebView; 36 39 NSPoint _fakeOrigin; 37 40 } 38 @property (nonatomic, assign) WTR::PlatformWebView* platformWebView;41 @property (nonatomic, assign) PlatformWebView* platformWebView; 39 42 @end 40 43 … … 61 64 { 62 65 return _useTiledDrawing; 66 } 67 68 - (void)dragImage:(NSImage *)anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag 69 { 70 RetainPtr<WebKitTestRunnerDraggingInfo> draggingInfo = adoptNS([[WebKitTestRunnerDraggingInfo alloc] initWithImage:anImage offset:initialOffset pasteboard:pboard source:sourceObj]); 71 [self draggingUpdated:draggingInfo.get()]; 63 72 } 64 73 -
trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm
r154652 r154949 42 42 { 43 43 poseAsClass("WebKitTestRunnerPasteboard", "NSPasteboard"); 44 poseAsClass("WebKitTestRunnerEvent", "NSEvent"); 44 45 } 45 46
Note: See TracChangeset
for help on using the changeset viewer.