Title: [254789] trunk/Source/WebCore
Revision
254789
Author
[email protected]
Date
2020-01-17 21:42:29 -0800 (Fri, 17 Jan 2020)

Log Message

iOS: Prepare deploying Ref/RefPtr in touch event code
https://bugs.webkit.org/show_bug.cgi?id=206466

Reviewed by Wenson Hsieh.

Introduce a new variant of dispatchTouchEvent, which takes EventTargetTouchArrayMap that uses
Ref<EventTarget> as keys instead of raw pointers to EventTarget as is the case in EventTargetTouchMap.

* page/EventHandler.h:
(WebCore::EventHandler::EventTargetTouchArrayMap): Added.
(WebCore::EventHandler::dispatchTouchEvent): Added the declaration for new variant.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (254788 => 254789)


--- trunk/Source/WebCore/ChangeLog	2020-01-18 03:24:31 UTC (rev 254788)
+++ trunk/Source/WebCore/ChangeLog	2020-01-18 05:42:29 UTC (rev 254789)
@@ -1,3 +1,17 @@
+2020-01-17  Ryosuke Niwa  <[email protected]>
+
+        iOS: Prepare deploying Ref/RefPtr in touch event code
+        https://bugs.webkit.org/show_bug.cgi?id=206466
+
+        Reviewed by Wenson Hsieh.
+
+        Introduce a new variant of dispatchTouchEvent, which takes EventTargetTouchArrayMap that uses
+        Ref<EventTarget> as keys instead of raw pointers to EventTarget as is the case in EventTargetTouchMap.
+
+        * page/EventHandler.h:
+        (WebCore::EventHandler::EventTargetTouchArrayMap): Added.
+        (WebCore::EventHandler::dispatchTouchEvent): Added the declaration for new variant.
+
 2020-01-17  Megan Gardner  <[email protected]>
 
         Use Visible Position to calculate Positions for highlights

Modified: trunk/Source/WebCore/page/EventHandler.h (254788 => 254789)


--- trunk/Source/WebCore/page/EventHandler.h	2020-01-18 03:24:31 UTC (rev 254788)
+++ trunk/Source/WebCore/page/EventHandler.h	2020-01-18 05:42:29 UTC (rev 254789)
@@ -220,6 +220,7 @@
 #if ENABLE(IOS_TOUCH_EVENTS) || ENABLE(IOS_GESTURE_EVENTS)
     using TouchArray = Vector<RefPtr<Touch>>;
     using EventTargetTouchMap = HashMap<EventTarget*, TouchArray*>;
+    using EventTargetTouchArrayMap = HashMap<Ref<EventTarget>, std::unique_ptr<TouchArray>>;
 #endif
 
 #if ENABLE(IOS_TOUCH_EVENTS) || ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS)
@@ -228,6 +229,7 @@
 
 #if ENABLE(IOS_TOUCH_EVENTS)
     bool dispatchTouchEvent(const PlatformTouchEvent&, const AtomString&, const EventTargetTouchMap&, float, float);
+    bool dispatchTouchEvent(const PlatformTouchEvent&, const AtomString&, const EventTargetTouchArrayMap&, float, float);
     bool dispatchSimulatedTouchEvent(IntPoint location);
     Frame* touchEventTargetSubframe() const { return m_touchEventTargetSubframe.get(); }
     const TouchArray& touches() const { return m_touches; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to