Title: [289103] trunk/Source/WebKit
Revision 289103
Author megan_gard...@apple.com
Date 2022-02-03 22:35:43 -0800 (Thu, 03 Feb 2022)
Log Message
Plumb pointer type though native to web events.
https://bugs.webkit.org/show_bug.cgi?id=236118
Reviewed by Tim Horton.
* Shared/NativeWebMouseEvent.h:
* Shared/ios/NativeWebMouseEventIOS.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* UIProcess/ios/WKMouseGestureRecognizer.mm:
(-[WKMouseGestureRecognizer createMouseEventWithType:wasCancelled:]):
Modified Paths
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/NativeWebMouseEvent.h
trunk/Source/WebKit/Shared/ios/NativeWebMouseEventIOS.mm
trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm
Diff
Modified: trunk/Source/WebKit/ChangeLog (289102 => 289103)
--- trunk/Source/WebKit/ChangeLog 2022-02-04 03:13:53 UTC (rev 289102)
+++ trunk/Source/WebKit/ChangeLog 2022-02-04 06:35:43 UTC (rev 289103)
@@ -1,3 +1,16 @@
+2022-02-03 Megan Gardner
+
+Plumb pointer type though native to web events.
+https://bugs.webkit.org/show_bug.cgi?id=236118
+
+Reviewed by Tim Horton.
+
+* Shared/NativeWebMouseEvent.h:
+* Shared/ios/NativeWebMouseEventIOS.mm:
+(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
+* UIProcess/ios/WKMouseGestureRecognizer.mm:
+(-[WKMouseGestureRecognizer createMouseEventWithType:wasCancelled:]):
+
2022-02-03 Wenson Hsieh
Teach VideoFullscreenInterface to keep track of its corresponding MediaPlayer's MediaPlayerIdentifier
Modified: trunk/Source/WebKit/Shared/NativeWebMouseEvent.h (289102 => 289103)
--- trunk/Source/WebKit/Shared/NativeWebMouseEvent.h 2022-02-04 03:13:53 UTC (rev 289102)
+++ trunk/Source/WebKit/Shared/NativeWebMouseEvent.h 2022-02-04 06:35:43 UTC (rev 289103)
@@ -70,7 +70,7 @@
explicit NativeWebMouseEvent(const WebCore::IntPoint&);
#elif PLATFORM(IOS_FAMILY)
NativeWebMouseEvent(::WebEvent *);
-NativeWebMouseEvent(Type, Button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet, WallTime timestamp, double force, GestureWasCancelled);
+NativeWebMouseEvent(Type, Button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet, WallTime timestamp, double force, GestureWasCancelled, const String& pointerType);
#elif USE(LIBWPE)
NativeWebMouseEvent(struct wpe_input_pointer_event*, float deviceScaleFactor);
#elif PLATFORM(WIN)
Modified: trunk/Source/WebKit/Shared/ios/NativeWebMouseEventIOS.mm (289102 => 289103)
--- trunk/Source/WebKit/Shared/ios/NativeWebMouseEventIOS.mm 2022-02-04 03:13:53 UTC (rev 289102)
+++ trunk/Source/WebKit/Shared/ios/NativeWebMouseEventIOS.mm 2022-02-04 06:35:43 UTC (rev 289103)
@@ -38,8 +38,8 @@
{
}
-NativeWebMouseEvent::NativeWebMouseEvent(Type type, Button button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet modifiers, WallTime timestamp, double force, GestureWasCancelled gestureWasCancelled)
-: WebMouseEvent(type, button, buttons, position, globalPosition, deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, NoTap, WebCore::mousePointerID, WebCore::mousePointerEventType(), gestureWasCancelled)
+NativeWebMouseEvent::NativeWebMouseEvent(Type type, Button button, unsigned short buttons, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, OptionSet modifiers, WallTime timestamp, double force, GestureWasCancelled gestureWasCancelled, const String& pointerType)
+: WebMouseEvent(type, button, buttons, position, globalPosition, deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, NoTap, WebCore::mousePointerID, pointerType, gestureWasCancelled)
{
}
Modified: trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm (289102 => 289103)
--- trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm 2022-02-04 03:13:53 UTC (rev 289102)
+++ trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm 2022-02-04 06:35:43 UTC (rev 289103)
@@ -130,7 +130,10 @@
auto delta = point - WebCore::IntPoint { [_currentTouch previousLocationInView:self.view] };
// UITouch's timestamp uses mach_absolute_time as its timebase, same as MonotonicTime.
auto timestamp = MonotonicTime::fromRawSeconds([_currentTouch timestamp]).approximateWallTime();
-return WTF::makeUnique(type, button, buttons, point, point, delta.width(), delta.height(), 0, [_currentTouch tapCount], modifiers, timestamp, 0, cancelled ? WebKit::GestureWasCancelled::Yes : WebKit::GestureWasCancelled::No);
+
+String pointerType = WebCore::mousePointerEventType();
+
+return