WebKit Bugzilla
Attachment 362113 Details for
Bug 194702
: Add a method to dispatch a PointerEvent based on a PlatformTouchEvent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194702-20190215154140.patch (text/plain), 3.05 KB, created by
Antoine Quint
on 2019-02-15 06:41:42 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-02-15 06:41:42 PST
Size:
3.05 KB
patch
obsolete
>Subversion Revision: 241500 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d0130cd4537fc4e23d4bbf4803c171492908d917..1ec031e3043f43b1de8b81e2f29dffa6728dec12 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-15 Antoine Quint <graouts@apple.com> >+ >+ Add a method to dispatch a PointerEvent based on a PlatformTouchEvent >+ https://bugs.webkit.org/show_bug.cgi?id=194702 >+ <rdar://problem/48109355> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * page/EventHandler.cpp: >+ (WebCore::EventHandler::dispatchPointerEventForTouchAtIndex): >+ * page/EventHandler.h: >+ > 2019-02-13 Ryosuke Niwa <rniwa@webkit.org> > > Crash in DOMTimer::fired >diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp >index 59fd3e01af9dd757dd031321852c6197c296c2a3..2024a76f4a15784e52595d7e14c0a14443531f2a 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -114,6 +114,11 @@ > #include "TouchList.h" > #endif > >+#if ENABLE(TOUCH_EVENTS) && ENABLE(POINTER_EVENTS) >+#include "PointerCaptureController.h" >+#include "PointerEvent.h" >+#endif >+ > #if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS) > #include "PlatformTouchEvent.h" > #endif >@@ -4266,6 +4271,18 @@ bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent > } > #endif // ENABLE(TOUCH_EVENTS) > >+#if ENABLE(TOUCH_EVENTS) && ENABLE(POINTER_EVENTS) >+Ref<PointerEvent> EventHandler::dispatchPointerEventForTouchAtIndex(EventTarget& target, const PlatformTouchEvent& platformTouchEvent, unsigned index, bool isPrimary) >+{ >+ auto& pointerCaptureController = m_frame.page()->pointerCaptureController(); >+ auto pointerEvent = PointerEvent::create(platformTouchEvent, index, isPrimary, m_frame.windowProxy()); >+ pointerCaptureController.pointerEventWillBeDispatched(pointerEvent, &target); >+ target.dispatchEvent(pointerEvent); >+ pointerCaptureController.pointerEventWasDispatched(pointerEvent); >+ return pointerEvent; >+} >+#endif // ENABLE(TOUCH_EVENTS) && ENABLE(POINTER_EVENTS) >+ > void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event) > { > m_mousePositionIsUnknown = false; >diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h >index 9ea9e0c9620a9674d0fa74fe56528a7b1475dd8a..43720db6391298b113aed62a18e2965966c5170a 100644 >--- a/Source/WebCore/page/EventHandler.h >+++ b/Source/WebCore/page/EventHandler.h >@@ -81,6 +81,7 @@ class PlatformGestureEvent; > class PlatformKeyboardEvent; > class PlatformTouchEvent; > class PlatformWheelEvent; >+class PointerEvent; > class RenderBox; > class RenderElement; > class RenderLayer; >@@ -319,6 +320,10 @@ public: > WEBCORE_EXPORT bool handleTouchEvent(const PlatformTouchEvent&); > #endif > >+#if ENABLE(TOUCH_EVENTS) && ENABLE(POINTER_EVENTS) >+ Ref<PointerEvent> dispatchPointerEventForTouchAtIndex(EventTarget&, const PlatformTouchEvent&, unsigned, bool isPrimary); >+#endif >+ > bool useHandCursor(Node*, bool isOverLink, bool shiftKey); > void updateCursor(); >
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
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194702
: 362113