[Qt][WK2] Convert touch-point area
[WebKit-https.git] / Tools / WebKitTestRunner / TestController.cpp
index e324f57df33a6efeb8dc63945f262b909d43ab77..b3b9396f813834e89ff1a1837db530a4bb617148 100644 (file)
@@ -707,6 +707,17 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
             return 0;
         }
 
+        if (WKStringIsEqualToUTF8CString(subMessageName, "SetTouchPointRadius")) {
+            WKRetainPtr<WKStringRef> xKey = adoptWK(WKStringCreateWithUTF8CString("RadiusX"));
+            int x = static_cast<int>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, xKey.get()))));
+
+            WKRetainPtr<WKStringRef> yKey = adoptWK(WKStringCreateWithUTF8CString("RadiusY"));
+            int y = static_cast<int>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, yKey.get()))));
+
+            m_eventSenderProxy->setTouchPointRadius(x, y);
+            return 0;
+        }
+
         if (WKStringIsEqualToUTF8CString(subMessageName, "TouchStart")) {
             WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
             m_eventSenderProxy->touchStart();