WebKit Bugzilla
Attachment 368637 Details for
Bug 197449
: Fix the WebKitTestRunner build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197449-20190430175349.patch (text/plain), 5.92 KB, created by
Tim Horton
on 2019-04-30 17:53:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-04-30 17:53:50 PDT
Size:
5.92 KB
patch
obsolete
>Subversion Revision: 244808 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 723374846b746b3a3b0e7c7cb4b2bb551e2b608b..37debdf7d3bc3c665987262bbf47131117ad93d7 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2019-04-30 Tim Horton <timothy_horton@apple.com> >+ >+ Fix the WebKitTestRunner build >+ https://bugs.webkit.org/show_bug.cgi?id=197449 >+ <rdar://problem/50334169> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitTestRunner/mac/EventSenderProxy.mm: >+ (-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]): >+ (WTR::EventSenderProxy::mouseForceChanged): >+ Use some SPI instead of IPI. >+ > 2019-04-30 Chris Dumez <cdumez@apple.com> > > Regression(PSON) URL scheme handlers can no longer respond asynchronously >diff --git a/Tools/TestRunnerShared/spi/CoreGraphicsTestSPI.h b/Tools/TestRunnerShared/spi/CoreGraphicsTestSPI.h >index e75be0748994ef2d8558e056669877f5158dfb0d..029a9d81a50fd572dd882fd0bcf3e448cc7012f0 100644 >--- a/Tools/TestRunnerShared/spi/CoreGraphicsTestSPI.h >+++ b/Tools/TestRunnerShared/spi/CoreGraphicsTestSPI.h >@@ -84,6 +84,21 @@ enum { > }; > typedef uint32_t CGSHIDEventType; > >+typedef CF_ENUM(uint8_t, CGSGesturePhase) >+{ >+ kCGSGesturePhaseNone = 0, >+ kCGSGesturePhaseBegan = 1, >+ kCGSGesturePhaseChanged = 2, >+ kCGSGesturePhaseEnded = 4, >+ kCGSGesturePhaseCancelled = 8, >+ kCGSGesturePhaseMayBegin = 128 >+}; >+ >+typedef CF_ENUM(uint8_t, CGSGestureBehavior) >+{ >+ kCGSGestureBehaviorDeepPress = 5, >+}; >+ > CGPoint CGEventGetWindowLocation(CGEventRef); > void CGEventSetWindowLocation(CGEventRef, CGPoint); > >diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm >index 3985e1493a0ad230691f14514da968d72c2853ed..75537f1d88466a4c3f1cc942399d7c6111310cc4 100644 >--- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm >+++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm >@@ -27,6 +27,7 @@ > #import "config.h" > #import "EventSenderProxy.h" > >+#import "CoreGraphicsTestSPI.h" > #import "PlatformWebView.h" > #import "StringFunctions.h" > #import "TestController.h" >@@ -45,6 +46,7 @@ @end > > @interface NSEvent (ForTestRunner) > - (void)_postDelayed; >+- (instancetype)_initWithCGEvent:(CGEventRef)event eventRef:(void *)eventRef; > @end > > @interface EventSenderSyntheticEvent : NSEvent { >@@ -69,9 +71,41 @@ @end > > @implementation EventSenderSyntheticEvent > >-- (id)initPressureEventAtLocation:(NSPoint)location globalLocation:(NSPoint)globalLocation stage:(NSInteger)stage pressure:(float)pressure stageTransition:(float)stageTransition phase:(NSEventPhase)phase time:(NSTimeInterval)time eventNumber:(NSInteger)eventNumber window:(NSWindow *)window >-{ >- self = [super init]; >+- (instancetype)initPressureEventAtLocation:(NSPoint)location globalLocation:(NSPoint)globalLocation stage:(NSInteger)stage pressure:(float)pressure stageTransition:(float)stageTransition phase:(NSEventPhase)phase time:(NSTimeInterval)time eventNumber:(NSInteger)eventNumber window:(NSWindow *)window >+{ >+ CGSGesturePhase gesturePhase; >+ switch (phase) { >+ case NSEventPhaseMayBegin: >+ gesturePhase = kCGSGesturePhaseMayBegin; >+ break; >+ case NSEventPhaseBegan: >+ gesturePhase = kCGSGesturePhaseBegan; >+ break; >+ case NSEventPhaseChanged: >+ gesturePhase = kCGSGesturePhaseChanged; >+ break; >+ case NSEventPhaseCancelled: >+ gesturePhase = kCGSGesturePhaseCancelled; >+ break; >+ case NSEventPhaseEnded: >+ gesturePhase = kCGSGesturePhaseEnded; >+ break; >+ case NSEventPhaseNone: >+ default: >+ gesturePhase = kCGSGesturePhaseNone; >+ break; >+ } >+ >+ CGEventRef cgEvent = CGEventCreate(nullptr); >+ CGEventSetType(cgEvent, (CGEventType)kCGSEventGesture); >+ CGEventSetIntegerValueField(cgEvent, kCGEventGestureHIDType, 32); >+ CGEventSetIntegerValueField(cgEvent, kCGEventGesturePhase, gesturePhase); >+ CGEventSetDoubleValueField(cgEvent, kCGEventStagePressure, pressure); >+ CGEventSetDoubleValueField(cgEvent, kCGEventTransitionProgress, pressure); >+ CGEventSetIntegerValueField(cgEvent, kCGEventGestureStage, stageTransition); >+ CGEventSetIntegerValueField(cgEvent, kCGEventGestureBehavior, kCGSGestureBehaviorDeepPress); >+ >+ self = [super _initWithCGEvent:cgEvent eventRef:nullptr]; > > if (!self) > return nil; >@@ -85,10 +119,7 @@ - (id)initPressureEventAtLocation:(NSPoint)location globalLocation:(NSPoint)glob > _eventSender_timestamp = time; > _eventSender_eventNumber = eventNumber; > _eventSender_window = window; >-#if defined(__LP64__) >- self->_type = NSEventTypePressure; > _eventSender_type = NSEventTypePressure; >-#endif > > return self; > } >@@ -325,7 +356,6 @@ void EventSenderProxy::mouseUp(unsigned buttonNumber, WKEventModifiers modifiers > m_clickPosition = m_position; > } > >-#if defined(__LP64__) > void EventSenderProxy::sendMouseDownToStartPressureEvents() > { > updateClickCountForButton(0); >@@ -525,49 +555,6 @@ void EventSenderProxy::mouseForceChanged(float force) > [targetView pressureChangeWithEvent:nil]; > IGNORE_NULL_CHECK_WARNINGS_END > } >-#else >- >-#if PLATFORM(COCOA) >-RetainPtr<NSEvent> EventSenderProxy::beginPressureEvent(int) >-{ >- return nil; >-} >- >-RetainPtr<NSEvent> EventSenderProxy::pressureChangeEvent(int, PressureChangeDirection) >-{ >- return nil; >-} >- >-RetainPtr<NSEvent> EventSenderProxy::pressureChangeEvent(int, float, PressureChangeDirection) >-{ >- return nil; >-} >-#endif // PLATFORM(COCOA) >- >-void EventSenderProxy::sendMouseDownToStartPressureEvents() >-{ >-} >- >-void EventSenderProxy::mouseForceDown() >-{ >-} >- >-void EventSenderProxy::mouseForceUp() >-{ >-} >- >-void EventSenderProxy::mouseForceChanged(float) >-{ >-} >- >-void EventSenderProxy::mouseForceClick() >-{ >-} >- >-void EventSenderProxy::startAndCancelMouseForceClick() >-{ >-} >-#endif // defined(__LP64__) > > void EventSenderProxy::mouseMoveTo(double x, double y) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197449
:
368636
| 368637