Repository: WebKit/WebKit
Pull request #41924: [WPE] WPEPlatform-based implementation of Interaction Media Features
Author: login: spenap
Labels: name: WPE WebKit
description: WebKit WPE component
Created: 2025-03-05T16:49:43Z | Merged: 2025-04-04T22:09:19Z

#### 2e472a4b1063f7eb10f34fe875cfab1aa7c83cd5
<pre>
[WPE] WPEPlatform-based implementation of Interaction Media Features
<a href="https://bugs.webkit.org/show_bug.cgi?id=289166">https://bugs.webkit.org/show_bug.cgi?id=289166</a>

Reviewed by Carlos Garcia Campos.

This updates the WebPageWPE behaviour so that it queries
interaction-related information (i.e. mouse or touch capabilities) from
the WebProcess singleton. The WebProcess retrieves this information
throug the WebProcessCreationParameters, which themselves are fetched by
means of WPEPlatform.

This initial changeset includes the Wayland implementation where seat
capabilities are queried, then stored as properties. When a change is
received by the seat, it is propagated to the WebProcesses.

The old implementation has been kept as a fallback: when not using
WPE_PLATFORM and using TOUCH_EVENTS, Touch is assumed. Otherwise we
fallback to Mouse.

* Source/WebCore/platform/PlatformScreen.h:
* Source/WebCore/platform/wpe/PlatformScreenWPE.cpp:
(WebCore::screenHasTouchDevice): Deleted.
(WebCore::screenIsTouchPrimaryInputDevice): Deleted.
* Source/WebKit/PlatformWPE.cmake:
* Source/WebKit/Scripts/webkit/messages.py:
(conditions_for_header):
* Source/WebKit/Shared/WebProcessCreationParameters.h:
* Source/WebKit/Shared/WebProcessCreationParameters.serialization.in:
* Source/WebKit/Shared/glib/AvailableInputDevices.h: Added.
* Source/WebKit/Shared/glib/AvailableInputDevices.serialization.in: Added.
* Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::toAvailableInputDevices):
(WebKit::WebProcessPool::availableInputDevices):
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
* Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp:
(wpeDisplaySetProperty):
(wpeDisplayGetProperty):
(wpe_display_class_init):
(wpe_display_get_available_input_devices):
(wpe_display_set_available_input_devices):
* Source/WebKit/WPEPlatform/wpe/WPEDisplay.h:
* Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp:
(wpeDisplayWaylandSetup):
* Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.cpp:
(WPE::WaylandSeat::availableInputDevices const):
* Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.h:
(WPE::WaylandSeat::setAvailableInputDevicesChangedCallback):
* Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp:
(WebKit::WebPage::hoverSupportedByPrimaryPointingDevice const):
(WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const):
(WebKit::WebPage::pointerCharacteristicsOfPrimaryPointingDevice const):
(WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const):
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/WebProcess.messages.in:
* Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::primaryPointingDevice const):
(WebKit::WebProcess::setAvailableInputDevices):

Canonical link: <a href="https://commits.webkit.org/293276@main">https://commits.webkit.org/293276@main</a>
</pre>
<!--EWS-Status-Bubble-Start-->
https://github.com/WebKit/WebKit/commit/add3ff824b54dca9c7fbc217a58ca5e0e187c5dd

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/98327 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/17958 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/8186 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/103447 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/48856 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/100372 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/18250 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/26409 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/74845 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/32011 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/101331 "Passed tests") | [✅ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/13823 "Passed tests") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/88804 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/55205 "Passed tests") | 
| [✅ 🧪 webkitpy](https://ews-build.webkit.org/#/builders/6/builds/97813 "Passed tests") | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/13606 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/6765 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/48298 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/83586 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/6839 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/105821 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/25414 "Built successfully") | [✅ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/18494 "Passed tests") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/83826 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/25787 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/85006 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/83296 "Passed tests") | 
| [✅ 🛠 🧪 merge](https://ews-build.webkit.org/#/builders/19/builds/21057 "Built successfully and passed tests") | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/27938 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/5610 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/19058 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/25372 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/30553 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/25192 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/28508 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/26767 "Built successfully") | | | 
<!--EWS-Status-Bubble-End-->


Diff:
diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h
index dfef4ecbfb44..5a22d576580d 100644
--- a/Source/WebCore/platform/PlatformScreen.h
+++ b/Source/WebCore/platform/PlatformScreen.h
@@ -160,7 +160,7 @@ WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
 #endif
 
 #if ENABLE(TOUCH_EVENTS)
-#if PLATFORM(GTK) || PLATFORM(WPE)
+#if PLATFORM(GTK)
 WEBCORE_EXPORT bool screenHasTouchDevice();
 WEBCORE_EXPORT bool screenIsTouchPrimaryInputDevice();
 #else
diff --git a/Source/WebCore/platform/wpe/PlatformScreenWPE.cpp b/Source/WebCore/platform/wpe/PlatformScreenWPE.cpp
index 77bdff686770..ad47ea860896 100644
--- a/Source/WebCore/platform/wpe/PlatformScreenWPE.cpp
+++ b/Source/WebCore/platform/wpe/PlatformScreenWPE.cpp
@@ -150,16 +150,4 @@ bool screenSupportsExtendedColor(Widget*)
     return false;
 }
 
-#if ENABLE(TOUCH_EVENTS)
-bool screenHasTouchDevice()
-{
-    return true;
-}
-
-bool screenIsTouchPrimaryInputDevice()
-{
-    return true;
-}
-#endif
-
 } // namespace WebCore
diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake
index 9cbe09a219b0..0f19f67a6589 100644
--- a/Source/WebKit/PlatformWPE.cmake
+++ b/Source/WebKit/PlatformWPE.cmake
@@ -114,6 +114,7 @@ if (USE_GBM)
 endif ()
 
 list(APPEND WebKit_SERIALIZATION_IN_FILES
+    Shared/glib/AvailableInputDevices.serialization.in
     Shared/glib/InputMethodState.serialization.in
     Shared/glib/RendererBufferTransportMode.serialization.in
     Shared/glib/SystemSettings.serialization.in
diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py
index bc1d31f14bdb..f28079a0eb2e 100644
--- a/Source/WebKit/Scripts/webkit/messages.py
+++ b/Source/WebKit/Scripts/webkit/messages.py
@@ -558,6 +558,7 @@ def types_that_cannot_be_forward_declared():
 
 def conditions_for_header(header):
     conditions = {
+        '"AvailableInputDevices.h"': ["PLATFORM(WPE)"],
         '"CoreIPCAuditToken.h"': ["HAVE(AUDIT_TOKEN)"],
         '"DMABufRendererBufferFormat.h"': ["PLATFORM(GTK)", "PLATFORM(WPE)"],
         '"GestureTypes.h"': ["PLATFORM(IOS_FAMILY)"],
diff --git a/Source/WebKit/Shared/WebProcessCreationParameters.h b/Source/WebKit/Shared/WebProcessCreationParameters.h
index 93fe2a282eb1..45c1e338b992 100644
--- a/Source/WebKit/Shared/WebProcessCreationParameters.h
+++ b/Source/WebKit/Shared/WebProcessCreationParameters.h
@@ -64,6 +64,10 @@
 #include <wtf/MemoryPressureHandler.h>
 #endif
 
+#if PLATFORM(WPE)
+#include "AvailableInputDevices.h"
+#endif
+
 namespace API {
 class Data;
 }
@@ -265,6 +269,10 @@ struct WebProcessCreationParameters {
 #endif
 #endif
 
+#if PLATFORM(WPE)
+    OptionSet<AvailableInputDevices> availableInputDevices;
+#endif
+
 #if USE(ATSPI)
     String accessibilityBusAddress;
     String accessibilityBusName;
diff --git a/Source/WebKit/Shared/WebProcessCreationParameters.serialization.in b/Source/WebKit/Shared/WebProcessCreationParameters.serialization.in
index 1c05d75730bd..4ba46f39bbc6 100644
--- a/Source/WebKit/Shared/WebProcessCreationParameters.serialization.in
+++ b/Source/WebKit/Shared/WebProcessCreationParameters.serialization.in
@@ -214,6 +214,10 @@
     CString inspectorServerAddress;
 #endif
 
+#if PLATFORM(WPE)
+    OptionSet<WebKit::AvailableInputDevices> availableInputDevices;
+#endif
+
 #if USE(ATSPI)
     String accessibilityBusAddress;
     String accessibilityBusName;
diff --git a/Source/WebKit/Shared/glib/AvailableInputDevices.h b/Source/WebKit/Shared/glib/AvailableInputDevices.h
new file mode 100644
index 000000000000..220a7cc4a906
--- /dev/null
+++ b/Source/WebKit/Shared/glib/AvailableInputDevices.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2025 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(WPE)
+
+namespace WebKit {
+
+enum class AvailableInputDevices : uint8_t {
+    Mouse       = (1 << 0),
+    Keyboard    = (1 << 1),
+    Touchscreen = (1 << 2),
+};
+
+} // namespace WebKit
+
+#endif // PLATFORM(WPE)
diff --git a/Source/WebKit/Shared/glib/AvailableInputDevices.serialization.in b/Source/WebKit/Shared/glib/AvailableInputDevices.serialization.in
new file mode 100644
index 000000000000..3207cc6f2931
--- /dev/null
+++ b/Source/WebKit/Shared/glib/AvailableInputDevices.serialization.in
@@ -0,0 +1,33 @@
+# Copyright (C) 2025 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#if PLATFORM(WPE)
+
+[OptionSet] enum class WebKit::AvailableInputDevices : uint8_t {
+    Mouse,
+    Keyboard,
+    Touchscreen,
+};
+
+#endif // PLATFORM(WPE)
diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
index 2113c50c6f9c..a630b21f35fe 100644
--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
@@ -77,6 +77,39 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
 
 namespace WebKit {
 
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+static OptionSet<AvailableInputDevices> toAvailableInputDevices(WPEAvailableInputDevices inputDevices)
+{
+    OptionSet<AvailableInputDevices> availableInputDevices;
+    if (inputDevices & WPE_AVAILABLE_INPUT_DEVICE_MOUSE)
+        availableInputDevices.add(AvailableInputDevices::Mouse);
+    if (inputDevices & WPE_AVAILABLE_INPUT_DEVICE_KEYBOARD)
+        availableInputDevices.add(AvailableInputDevices::Keyboard);
+    if (inputDevices & WPE_AVAILABLE_INPUT_DEVICE_TOUCHSCREEN)
+        availableInputDevices.add(AvailableInputDevices::Touchscreen);
+
+    return availableInputDevices;
+}
+#endif
+
+#if PLATFORM(WPE)
+static OptionSet<AvailableInputDevices> availableInputDevices()
+{
+#if ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        const auto inputDevices = wpe_display_get_available_input_devices(wpe_display_get_primary());
+        return toAvailableInputDevices(inputDevices);
+    }
+#endif
+#if ENABLE(TOUCH_EVENTS)
+    return AvailableInputDevices::Touchscreen;
+#else
+    return AvailableInputDevices::Mouse;
+#endif
+}
+#endif
+
 void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
 {
     m_alwaysUsesComplexTextCodePath = true;
@@ -102,6 +135,17 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
     if (!MemoryPressureMonitor::disabled())
         installMemoryPressureHandler();
 #endif
+
+#if ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        auto* display = wpe_display_get_primary();
+        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* display, GParamSpec*, WebProcessPool* pool) {
+            auto availableInputDevices = toAvailableInputDevices(wpe_display_get_available_input_devices(display));
+            pool->sendToAllProcesses(Messages::WebProcess::SetAvailableInputDevices(availableInputDevices));
+        }), this);
+    }
+#endif
 }
 
 void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process, WebProcessCreationParameters& parameters)
@@ -133,6 +177,8 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
         parameters.hostClientFileDescriptor = UnixFileDescriptor { wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt };
         parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name()));
     }
+
+    parameters.availableInputDevices = availableInputDevices();
 #endif
 
     parameters.memoryCacheDisabled = m_memoryCacheDisabled || LegacyGlobalSettings::singleton().cacheModel() == CacheModel::DocumentViewer;
@@ -185,6 +231,13 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
 
 void WebProcessPool::platformInvalidateContext()
 {
+#if ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        auto* display = wpe_display_get_primary();
+        g_signal_handlers_disconnect_by_data(display, this);
+    }
+#endif
 }
 
 void WebProcessPool::platformResolvePathsForSandboxExtensions()
diff --git a/Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp b/Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
index 3be4b4662163..852ba3478fa2 100644
--- a/Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
+++ b/Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
@@ -60,10 +60,21 @@ struct _WPEDisplayPrivate {
     GRefPtr<WPEBufferDMABufFormats> preferredDMABufFormats;
     GRefPtr<WPEKeymap> keymap;
     GRefPtr<WPESettings> settings;
+    WPEAvailableInputDevices availableInputDevices;
 };
 
 WEBKIT_DEFINE_ABSTRACT_TYPE(WPEDisplay, wpe_display, G_TYPE_OBJECT)
 
+enum {
+    PROP_0,
+
+    PROP_AVAILABLE_INPUT_DEVICES,
+
+    N_PROPERTIES
+};
+
+static std::array<GParamSpec*, N_PROPERTIES> sObjProperties;
+
 enum {
     SCREEN_ADDED,
     SCREEN_REMOVED,
@@ -104,11 +115,56 @@ static void wpeDisplayDispose(GObject* object)
     G_OBJECT_CLASS(wpe_display_parent_class)->dispose(object);
 }
 
+static void wpeDisplaySetProperty(GObject* object, guint propId, const GValue* value, GParamSpec* paramSpec)
+{
+    auto* display = WPE_DISPLAY(object);
+
+    switch (propId) {
+    case PROP_AVAILABLE_INPUT_DEVICES:
+        wpe_display_set_available_input_devices(display, static_cast<WPEAvailableInputDevices>(g_value_get_flags(value)));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
+    }
+}
+
+static void wpeDisplayGetProperty(GObject* object, guint propId, GValue* value, GParamSpec* paramSpec)
+{
+    auto* display = WPE_DISPLAY(object);
+
+    switch (propId) {
+    case PROP_AVAILABLE_INPUT_DEVICES:
+        g_value_set_flags(value, wpe_display_get_available_input_devices(display));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
+    }
+}
+
 static void wpe_display_class_init(WPEDisplayClass* displayClass)
 {
     GObjectClass* objectClass = G_OBJECT_CLASS(displayClass);
     objectClass->constructed = wpeDisplayConstructed;
     objectClass->dispose = wpeDisplayDispose;
+    objectClass->set_property = wpeDisplaySetProperty;
+    objectClass->get_property = wpeDisplayGetProperty;
+
+    /**
+     * WPEDisplay:available-input-devices:
+     *
+     * The input devices (e.g. mouse, keyboard or touchscreen) available to use for this display.
+     *
+     * This property can be used by creators to adjust their UI based on the available interactions.
+     */
+    sObjProperties[PROP_AVAILABLE_INPUT_DEVICES] =
+        g_param_spec_flags(
+            "available-input-devices",
+            nullptr, nullptr,
+            WPE_TYPE_AVAILABLE_INPUT_DEVICES,
+            WPE_AVAILABLE_INPUT_DEVICE_NONE,
+            static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
+
+    g_object_class_install_properties(objectClass, N_PROPERTIES, sObjProperties.data());
 
     /**
      * WPEDisplay::screen-added:
@@ -585,3 +641,38 @@ gboolean wpe_display_use_explicit_sync(WPEDisplay* display)
     auto* wpeDisplayClass = WPE_DISPLAY_GET_CLASS(display);
     return wpeDisplayClass->use_explicit_sync ? wpeDisplayClass->use_explicit_sync(display) : FALSE;
 }
+
+/**
+ * wpe_display_get_available_input_devices:
+ * @display: a #WPEDisplay
+ *
+ * Get the available input devices of @display that can be used by creators to adjust their UI based on the available interactions.
+ *
+ * Returns: a #WPEAvailableInputDevices
+ */
+WPEAvailableInputDevices wpe_display_get_available_input_devices(WPEDisplay* display)
+{
+    g_return_val_if_fail(WPE_IS_DISPLAY(display), WPE_AVAILABLE_INPUT_DEVICE_NONE);
+
+    return display->priv->availableInputDevices;
+}
+
+/**
+ * wpe_display_set_available_input_devices:
+ * @display: a #WPEDisplay
+ * @devices: a #WPEAvailableInputDevices
+ *
+ * Sets the available input devices for a @display.
+ *
+ * This function should only be called by platform implementations.
+ */
+void wpe_display_set_available_input_devices(WPEDisplay *display, WPEAvailableInputDevices devices)
+{
+    g_return_if_fail(WPE_IS_DISPLAY(display));
+
+    if (display->priv->availableInputDevices == devices)
+        return;
+
+    display->priv->availableInputDevices = devices;
+    g_object_notify_by_pspec(G_OBJECT(display), sObjProperties[PROP_AVAILABLE_INPUT_DEVICES]);
+}
diff --git a/Source/WebKit/WPEPlatform/wpe/WPEDisplay.h b/Source/WebKit/WPEPlatform/wpe/WPEDisplay.h
index 202fff32b09e..f0d62cb2a115 100644
--- a/Source/WebKit/WPEPlatform/wpe/WPEDisplay.h
+++ b/Source/WebKit/WPEPlatform/wpe/WPEDisplay.h
@@ -46,6 +46,13 @@ G_BEGIN_DECLS
 #define WPE_TYPE_DISPLAY (wpe_display_get_type())
 WPE_DECLARE_DERIVABLE_TYPE (WPEDisplay, wpe_display, WPE, DISPLAY, GObject)
 
+typedef enum {
+    WPE_AVAILABLE_INPUT_DEVICE_NONE        = 0,
+    WPE_AVAILABLE_INPUT_DEVICE_MOUSE       = (1 << 0),
+    WPE_AVAILABLE_INPUT_DEVICE_KEYBOARD    = (1 << 1),
+    WPE_AVAILABLE_INPUT_DEVICE_TOUCHSCREEN = (1 << 2)
+} WPEAvailableInputDevices;
+
 struct _WPEDisplayClass
 {
     GObjectClass parent_class;
@@ -85,29 +92,32 @@ typedef enum {
     WPE_DISPLAY_ERROR_CONNECTION_FAILED
 } WPEDisplayError;
 
-WPE_API GQuark                  wpe_display_error_quark                   (void);
-WPE_API WPEDisplay             *wpe_display_get_default                   (void);
-WPE_API WPEDisplay             *wpe_display_get_primary                   (void);
-WPE_API void                    wpe_display_set_primary                   (WPEDisplay *display);
-WPE_API gboolean                wpe_display_connect                       (WPEDisplay *display,
-                                                                           GError    **error);
-WPE_API gpointer                wpe_display_get_egl_display               (WPEDisplay *display,
-                                                                           GError    **error);
-WPE_API WPEKeymap              *wpe_display_get_keymap                    (WPEDisplay *display,
-                                                                           GError    **error);
-WPE_API WPEBufferDMABufFormats *wpe_display_get_preferred_dma_buf_formats (WPEDisplay *display);
-WPE_API guint                   wpe_display_get_n_screens                 (WPEDisplay *display);
-WPE_API WPEScreen              *wpe_display_get_screen                    (WPEDisplay *display,
-                                                                           guint       index);
-WPE_API void                    wpe_display_screen_added                  (WPEDisplay *display,
-                                                                           WPEScreen *screen);
-WPE_API void                    wpe_display_screen_removed                (WPEDisplay *display,
-                                                                           WPEScreen *screen);
-WPE_API const char             *wpe_display_get_drm_device                (WPEDisplay *display);
-WPE_API const char             *wpe_display_get_drm_render_node           (WPEDisplay *display);
-WPE_API gboolean                wpe_display_use_explicit_sync             (WPEDisplay *display);
-
-WPE_API WPESettings            *wpe_display_get_settings                  (WPEDisplay *display);
+WPE_API GQuark                   wpe_display_error_quark                   (void);
+WPE_API WPEDisplay              *wpe_display_get_default                   (void);
+WPE_API WPEDisplay              *wpe_display_get_primary                   (void);
+WPE_API void                     wpe_display_set_primary                   (WPEDisplay *display);
+WPE_API gboolean                 wpe_display_connect                       (WPEDisplay *display,
+                                                                            GError    **error);
+WPE_API gpointer                 wpe_display_get_egl_display               (WPEDisplay *display,
+                                                                            GError    **error);
+WPE_API WPEKeymap               *wpe_display_get_keymap                    (WPEDisplay *display,
+                                                                            GError    **error);
+WPE_API WPEBufferDMABufFormats  *wpe_display_get_preferred_dma_buf_formats (WPEDisplay *display);
+WPE_API guint                    wpe_display_get_n_screens                 (WPEDisplay *display);
+WPE_API WPEScreen               *wpe_display_get_screen                    (WPEDisplay *display,
+                                                                            guint       index);
+WPE_API void                     wpe_display_screen_added                  (WPEDisplay *display,
+                                                                            WPEScreen *screen);
+WPE_API void                     wpe_display_screen_removed                (WPEDisplay *display,
+                                                                            WPEScreen *screen);
+WPE_API const char              *wpe_display_get_drm_device                (WPEDisplay *display);
+WPE_API const char              *wpe_display_get_drm_render_node           (WPEDisplay *display);
+WPE_API gboolean                 wpe_display_use_explicit_sync             (WPEDisplay *display);
+
+WPE_API WPESettings             *wpe_display_get_settings                  (WPEDisplay *display);
+WPE_API WPEAvailableInputDevices wpe_display_get_available_input_devices   (WPEDisplay *display);
+WPE_API void                     wpe_display_set_available_input_devices   (WPEDisplay *display,
+                                                                            WPEAvailableInputDevices devices);
 
 G_END_DECLS
 
diff --git a/Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp b/Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
index ea2b908cccc2..b738067e5e14 100644
--- a/Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
+++ b/Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
@@ -375,6 +375,12 @@ static gboolean wpeDisplayWaylandSetup(WPEDisplayWayland* display, GError** erro
         xdg_wm_base_add_listener(priv->xdgWMBase, &xdgWMBaseListener, nullptr);
     if (priv->wlSeat) {
         priv->wlCursor = makeUnique<WPE::WaylandCursor>(display);
+        priv->wlSeat->setAvailableInputDevicesChangedCallback([weakDisplay = GWeakPtr { display }](WPEAvailableInputDevices devices) {
+            if (!weakDisplay)
+                return;
+
+            wpe_display_set_available_input_devices(WPE_DISPLAY(weakDisplay.get()), devices);
+        });
         priv->wlSeat->startListening();
     }
 
diff --git a/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.cpp b/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.cpp
index e40fbf294cc1..343e093f540d 100644
--- a/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.cpp
+++ b/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.cpp
@@ -523,6 +523,9 @@ const struct wl_seat_listener WaylandSeat::s_listener = {
             wl_touch_release(seat.m_touch.object);
             seat.m_touch = { };
         }
+
+        if (seat.m_capabilitiesChangedCallback)
+            seat.m_capabilitiesChangedCallback(seat.availableInputDevices());
     },
     // name
     [](void*, struct wl_seat*, const char*) { }
@@ -744,4 +747,16 @@ bool WaylandSeat::keyRepeat(Seconds& delay, Seconds& interval)
     return true;
 }
 
+WPEAvailableInputDevices WaylandSeat::availableInputDevices() const
+{
+    WPEAvailableInputDevices source = WPE_AVAILABLE_INPUT_DEVICE_NONE;
+    if (m_pointer.object)
+        source = WPE_AVAILABLE_INPUT_DEVICE_MOUSE;
+    if (m_keyboard.object)
+        source = static_cast<WPEAvailableInputDevices>(source | WPE_AVAILABLE_INPUT_DEVICE_KEYBOARD);
+    if (m_touch.object)
+        source = static_cast<WPEAvailableInputDevices>(source | WPE_AVAILABLE_INPUT_DEVICE_TOUCHSCREEN);
+    return source;
+}
+
 } // namespace WPE
diff --git a/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.h b/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.h
index 8988a1233da4..4415c1660b1f 100644
--- a/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.h
+++ b/Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.h
@@ -29,6 +29,7 @@
 #include "WPEKeymap.h"
 #include "WPEToplevelWayland.h"
 #include <wayland-client.h>
+#include <wtf/Function.h>
 #include <wtf/HashMap.h>
 #include <wtf/Seconds.h>
 #include <wtf/TZoneMalloc.h>
@@ -47,6 +48,7 @@ class WaylandSeat {
     WPEKeymap* keymap() const { return m_keymap.get(); }
     uint32_t pointerModifiers() const { return m_pointer.modifiers; }
     std::pair<double, double> pointerCoords() const { return std::pair<double, double>(m_pointer.x, m_pointer.y); }
+    WPEAvailableInputDevices availableInputDevices() const;
 
     void startListening();
 
@@ -55,6 +57,8 @@ class WaylandSeat {
     void emitPointerEnter(WPEView*) const;
     void emitPointerLeave(WPEView*) const;
 
+    void setAvailableInputDevicesChangedCallback(Function<void(WPEAvailableInputDevices)>&& callback) { m_capabilitiesChangedCallback = WTFMove(callback); }
+
 private:
     static const struct wl_seat_listener s_listener;
     static const struct wl_pointer_listener s_pointerListener;
@@ -119,6 +123,7 @@ class WaylandSeat {
         GWeakPtr<WPEToplevelWayland> toplevel;
         HashMap<int32_t, std::pair<double, double>, IntHash<int32_t>, WTF::SignedWithZeroKeyHashTraits<int32_t>> points;
     } m_touch;
+    Function<void(WPEAvailableInputDevices)> m_capabilitiesChangedCallback;
 };
 
 } // namespace WPE
diff --git a/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp b/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
index 112290250a07..6aef061f40ec 100644
--- a/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
+++ b/Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
@@ -48,38 +48,33 @@ bool WebPage::platformCanHandleRequest(const ResourceRequest&)
 
 bool WebPage::hoverSupportedByPrimaryPointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    return !screenIsTouchPrimaryInputDevice();
-#else
-    return true;
-#endif
+    return WebProcess::singleton().primaryPointingDevice() == AvailableInputDevices::Mouse;
 }
 
 bool WebPage::hoverSupportedByAnyAvailablePointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    return !screenHasTouchDevice();
-#else
-    return true;
-#endif
+    return WebProcess::singleton().availableInputDevices().contains(AvailableInputDevices::Mouse);
 }
 
 std::optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    if (screenIsTouchPrimaryInputDevice())
+    const auto& primaryPointingDevice = WebProcess::singleton().primaryPointingDevice();
+    if (primaryPointingDevice == AvailableInputDevices::Mouse)
+        return PointerCharacteristics::Fine;
+    if (primaryPointingDevice == AvailableInputDevices::Touchscreen)
         return PointerCharacteristics::Coarse;
-#endif
-    return PointerCharacteristics::Fine;
+    return std::nullopt;
 }
 
 OptionSet<PointerCharacteristics> WebPage::pointerCharacteristicsOfAllAvailablePointingDevices() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    if (screenHasTouchDevice())
-        return PointerCharacteristics::Coarse;
-#endif
-    return PointerCharacteristics::Fine;
+    OptionSet<PointerCharacteristics> pointerCharacteristics;
+    const auto& availableInputs = WebProcess::singleton().availableInputDevices();
+    if (availableInputs.contains(AvailableInputDevices::Mouse))
+        pointerCharacteristics.add(PointerCharacteristics::Fine);
+    if (availableInputs.contains(AvailableInputDevices::Touchscreen))
+        pointerCharacteristics.add(PointerCharacteristics::Coarse);
+    return pointerCharacteristics;
 }
 
 #if USE(GBM) && ENABLE(WPE_PLATFORM)
diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h
index 511c35889155..50f7736f5c6f 100644
--- a/Source/WebKit/WebProcess/WebProcess.h
+++ b/Source/WebKit/WebProcess/WebProcess.h
@@ -77,6 +77,10 @@ OBJC_CLASS NSMutableDictionary;
 #include "RendererBufferTransportMode.h"
 #endif
 
+#if PLATFORM(WPE)
+#include "AvailableInputDevices.h"
+#endif
+
 #if PLATFORM(IOS_FAMILY)
 #include "ViewUpdateDispatcher.h"
 #endif
@@ -478,6 +482,14 @@ class WebProcess final : public AuxiliaryProcess {
     void initializePlatformDisplayIfNeeded() const;
 #endif
 
+#if PLATFORM(WPE)
+    const OptionSet<AvailableInputDevices>& availableInputDevices() const { return m_availableInputDevices; }
+    std::optional<AvailableInputDevices> primaryPointingDevice() const;
+#if ENABLE(WPE_PLATFORM)
+    void setAvailableInputDevices(OptionSet<AvailableInputDevices>);
+#endif // ENABLE(WPE_PLATFORM)
+#endif // PLATFORM(WPE)
+
     String mediaKeysStorageDirectory() const { return m_mediaKeysStorageDirectory; }
     FileSystem::Salt mediaKeysStorageSalt() const { return m_mediaKeysStorageSalt; }
 
@@ -838,6 +850,10 @@ class WebProcess final : public AuxiliaryProcess {
     OptionSet<RendererBufferTransportMode> m_rendererBufferTransportMode;
 #endif
 
+#if PLATFORM(WPE)
+    OptionSet<AvailableInputDevices> m_availableInputDevices;
+#endif
+
     bool m_hasSuspendedPageProxy { false };
     bool m_allowExitOnMemoryPressure { true };
     std::optional<bool> m_isLockdownModeEnabled;
diff --git a/Source/WebKit/WebProcess/WebProcess.messages.in b/Source/WebKit/WebProcess/WebProcess.messages.in
index fd0c3cd5fc9c..5161a41ad2eb 100644
--- a/Source/WebKit/WebProcess/WebProcess.messages.in
+++ b/Source/WebKit/WebProcess/WebProcess.messages.in
@@ -126,6 +126,9 @@ messages -> WebProcess : AuxiliaryProcess WantsAsyncDispatchMessage {
 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
     SetScreenProperties(struct WebCore::ScreenProperties screenProperties)
 #endif
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+    SetAvailableInputDevices(OptionSet<WebKit::AvailableInputDevices> availableInputDevices)
+#endif
 #if PLATFORM(MAC)
     ScrollerStylePreferenceChanged(bool useOvelayScrollbars)
 #endif
diff --git a/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp b/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
index 37b857f2df9e..ca8daa4d544e 100644
--- a/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
+++ b/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
@@ -196,6 +196,8 @@ void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& para
         } else
             initializePlatformDisplayIfNeeded();
     }
+
+    m_availableInputDevices = parameters.availableInputDevices;
 #endif
 
 #if USE(GSTREAMER)
@@ -297,6 +299,24 @@ void WebProcess::setScreenProperties(const WebCore::ScreenProperties& properties
 }
 #endif
 
+#if PLATFORM(WPE)
+std::optional<AvailableInputDevices> WebProcess::primaryPointingDevice() const
+{
+    if (m_availableInputDevices.contains(AvailableInputDevices::Mouse))
+        return AvailableInputDevices::Mouse;
+    if (m_availableInputDevices.contains(AvailableInputDevices::Touchscreen))
+        return AvailableInputDevices::Touchscreen;
+    return std::nullopt;
+}
+
+#if ENABLE(WPE_PLATFORM)
+void WebProcess::setAvailableInputDevices(OptionSet<AvailableInputDevices> availableInputDevices)
+{
+    m_availableInputDevices = availableInputDevices;
+}
+#endif // ENABLE(WPE_PLATFORM)
+#endif // PLATFORM(WPE)
+
 } // namespace WebKit
 
 #undef RELEASE_LOG_SESSION_ID


Reviews:
user: login: carlosgcampos
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-25T09:55:15Z
user: login: spenap
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-26T17:03:11Z
user: login: carlosgcampos
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-28T10:30:47Z
user: login: carlosgcampos
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T12:21:45Z
user: login: spenap
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T12:35:46Z
user: login: carlosgcampos
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T12:49:16Z
user: login: carlosgcampos
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-04T12:58:56Z

Review comments:
diff_hunk: @@ -120,6 +120,8 @@ list(APPEND WebKit_SERIALIZATION_IN_FILES
     Shared/glib/UserMessage.serialization.in
 
     Shared/soup/WebCoreArgumentCodersSoup.serialization.in
+
+    Shared/wpe/AvailableInputTypes.serialization.in
path: Source/WebKit/PlatformWPE.cmake
user: login: carlosgcampos
body: This patch is for now wpe specific, but we could use the same approach for gtk, so I would add this in a glib dir instead of wpe. Also `InputTypes` can be confusing name, since we use the same for the form inputs, see `InputType.h`. I would use AvailableInputDevices instead, or something similar.
created_at: 2025-03-25T09:32:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2025 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
path: Source/WebKit/Shared/wpe/AvailableInputTypes.h
user: login: carlosgcampos
body: This should be guarded with `#if PLATFORM(WPE)`
created_at: 2025-03-25T09:33:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2025 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebKit {
+
+enum class AvailableInputTypes : uint8_t {
+    Mouse       = (1 << 0),
+    Keyboard    = (1 << 1),
+    Touch       = (1 << 2),
path: Source/WebKit/Shared/wpe/AvailableInputTypes.h
user: login: carlosgcampos
body: TouchScreen? to make it clear this is not about touchpads?
created_at: 2025-03-25T09:34:32Z
author_association: CONTRIBUTOR
diff_hunk: @@ -133,6 +133,8 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
         parameters.hostClientFileDescriptor = UnixFileDescriptor { wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt };
         parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name()));
     }
+
+    parameters.availableInputTypes = availableInputTypes();
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: In addition to the initial parameter we need an IPC message to be sent to all web processes when the capabilities change.
created_at: 2025-03-25T09:35:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -302,6 +304,31 @@ const String& WebProcessPool::generateNextAccessibilityBusName()
     return accessibilityBusName();
 }
 
+#if PLATFORM(WPE)
+OptionSet<AvailableInputTypes> WebProcessPool::availableInputTypes()
+{
+#if ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (!usingWPEPlatformAPI)
+        return AvailableInputTypes::Mouse;
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: This is not correct, when building with wpe platform enabled, but using the old api, we should do the same was when not building with wpe-platform enabled. Old API should always do the same. I would move the new api handling inside `if (usingWPEPlatformAPI)` and returning in thar case. Then instead of `#elif`  use `#endif ` and then return Touch if touch events enabled or Mouse otherwise.
created_at: 2025-03-25T09:40:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -104,11 +115,59 @@ static void wpeDisplayDispose(GObject* object)
     G_OBJECT_CLASS(wpe_display_parent_class)->dispose(object);
 }
 
+static void wpeDisplaySetProperty(GObject* object, guint propId, const GValue* value, GParamSpec* paramSpec)
+{
+    auto* display = WPE_DISPLAY(object);
+
+    switch (propId) {
+    case PROP_AVAILABLE_INPUT_TYPES:
+        if (display->priv->availableInputTypes != g_value_get_flags(value))  {
+            display->priv->availableInputTypes =  static_cast<WPEAvailableInputTypes>(g_value_get_flags(value));
+            g_object_notify_by_pspec(object, paramSpec);
+        }
path: Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
user: login: carlosgcampos
body: We should add a public setter and call it from here. Just document in the API docs of the setter that it should only be called by platform implementations
created_at: 2025-03-25T09:41:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -227,8 +227,14 @@ const struct wl_registry_listener registryListener = {
         else if (interfaceName == "xdg_wm_base"_s)
             priv->xdgWMBase = static_cast<struct xdg_wm_base*>(wl_registry_bind(registry, name, &xdg_wm_base_interface, 1));
         // FIXME: support zxdg_shell_v6?
-        else if (interfaceName == "wl_seat"_s)
-            priv->wlSeat = makeUnique<WPE::WaylandSeat>(static_cast<struct wl_seat*>(wl_registry_bind(registry, name, &wl_seat_interface, std::min<uint32_t>(version, 8))));
+        else if (interfaceName == "wl_seat"_s) {
+            priv->wlSeat = makeUnique<WPE::WaylandSeat>(static_cast<struct wl_seat*>(wl_registry_bind(registry, name, &wl_seat_interface, std::min<uint32_t>(version, 8))), [weakDisplay = GWeakPtr { display }]() {
+                if (GRefPtr<WPEDisplayWayland> protectedDisplay { weakDisplay.get() }) {
+                    auto* priv = protectedDisplay->priv;
+                    g_object_set(protectedDisplay.get(), "available-input-types", priv->wlSeat->availableInputTypes(), nullptr);
path: Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
user: login: carlosgcampos
body: And use the setter here
created_at: 2025-03-25T09:47:03Z
author_association: CONTRIBUTOR
diff_hunk: @@ -39,9 +39,10 @@ namespace WPE {
 
 WTF_MAKE_TZONE_ALLOCATED_IMPL(WaylandSeat);
 
-WaylandSeat::WaylandSeat(struct wl_seat* seat)
+WaylandSeat::WaylandSeat(struct wl_seat* seat, Function<void()>&& callback)
     : m_seat(seat)
     , m_keymap(adoptGRef(wpe_keymap_xkb_new()))
+    , m_capabilitiesChangedCallback(WTFMove(callback))
path: Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.cpp
user: login: carlosgcampos
body: I would add a explicit setter for the callback, in the constructor it's not obvious what the callback is for
created_at: 2025-03-25T09:48:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -48,38 +48,34 @@ bool WebPage::platformCanHandleRequest(const ResourceRequest&)
 
 bool WebPage::hoverSupportedByPrimaryPointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    return !screenIsTouchPrimaryInputDevice();
-#else
-    return true;
-#endif
+    // For now, there's no concept of primary vs any
+    return WebProcess::singleton().availableInputTypes().contains(AvailableInputTypes::Mouse);
path: Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
user: login: carlosgcampos
body: I think we could use a simple approach for now like, if there's a mouse that's the primary.
created_at: 2025-03-25T09:53:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -133,6 +133,8 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
         parameters.hostClientFileDescriptor = UnixFileDescriptor { wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt };
         parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name()));
     }
+
+    parameters.availableInputTypes = availableInputTypes();
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: spenap
body: I've created an `UpdateAvailableInputDevices` message, let me know what you think
created_at: 2025-03-26T17:03:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2025 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(WPE)
+
+namespace WebKit {
+
+enum class AvailableInputDevices : uint8_t {
+    Mouse       = (1 << 0),
+    Keyboard    = (1 << 1),
+    TouchScreen = (1 << 2),
path: Source/WebKit/Shared/glib/AvailableInputDevices.h
user: login: carlosgcampos
body: ```suggestion
    Touchscreen = (1 << 2),
```
created_at: 2025-03-28T09:47:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2025 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+
+#include "AvailableInputDevices.h"
+
+#include <wpe/wpe-platform.h>
path: Source/WebKit/Shared/glib/AvailableInputDevicesPrivate.h
user: login: carlosgcampos
body: This doesn't belong here, this is a file in Shared, but the wpe platform api is a UI process only api.
created_at: 2025-03-28T09:49:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -751,6 +754,10 @@ class WebProcessPool final
     void platformCompileResourceMonitorRuleList(const String& rulesText, CompletionHandler<void(RefPtr<WebCompiledContentRuleList>)>&&);
 #endif
 
+#if PLATFORM(WPE)
+    OptionSet<AvailableInputDevices> availableInputDevices();
path: Source/WebKit/UIProcess/WebProcessPool.h
user: login: carlosgcampos
body: ```suggestion
    OptionSet<AvailableInputDevices> availableInputDevices() const;
```
created_at: 2025-03-28T09:49:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -66,6 +66,7 @@
 #endif
 
 #if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+#include "AvailableInputDevicesPrivate.h"
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: We normally use Private when there's a public header, but that's no the case here.
created_at: 2025-03-28T09:50:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -58,6 +73,11 @@ ScreenManager::ScreenManager()
         manager->updatePrimaryDisplayID();
         manager->propertiesDidChange();
     }), this);
+    g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* d, GParamSpec*, ScreenManager*) {
+        auto availableInputDevices = toAvailableInputDevices(wpe_display_get_available_input_devices(d));
+        for (auto& pool : WebProcessPool::allProcessPools())
+            pool->sendToAllProcesses(Messages::WebProcess::UpdateAvailableInputDevices(availableInputDevices));
+    }), this);
path: Source/WebKit/UIProcess/wpe/ScreenManagerWPE.cpp
user: login: carlosgcampos
body: I don't think this belongs here either. We could monitor the devices from the process pool and then notify all its processes. It's not common to have many process pools, so it's ok to monitor the same property from all of them. That way we don't need a common place for the conversion helper, it can be a static function in WebProcessPoolGLib.cpp. We can connect to the signal in WebProcessPool::platformInitialize
created_at: 2025-03-28T10:00:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -58,6 +73,11 @@ ScreenManager::ScreenManager()
         manager->updatePrimaryDisplayID();
         manager->propertiesDidChange();
     }), this);
+    g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* d, GParamSpec*, ScreenManager*) {
+        auto availableInputDevices = toAvailableInputDevices(wpe_display_get_available_input_devices(d));
+        for (auto& pool : WebProcessPool::allProcessPools())
+            pool->sendToAllProcesses(Messages::WebProcess::UpdateAvailableInputDevices(availableInputDevices));
+    }), this);
path: Source/WebKit/UIProcess/wpe/ScreenManagerWPE.cpp
user: login: carlosgcampos
body: And we should probably disconnect the signal too, in WebProcessPool::platformInvalidateContext probably
created_at: 2025-03-28T10:02:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -585,3 +641,38 @@ gboolean wpe_display_use_explicit_sync(WPEDisplay* display)
     auto* wpeDisplayClass = WPE_DISPLAY_GET_CLASS(display);
     return wpeDisplayClass->use_explicit_sync ? wpeDisplayClass->use_explicit_sync(display) : FALSE;
 }
+
+/**
+ * wpe_display_get_available_input_devices:
+ * @display: a #WPEDisplay
+ *
+ * Get availableInputDevices of @display that can be used by creators to adjust their UI based on the available interactions.
path: Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
user: login: carlosgcampos
body: ```suggestion
 * Get the available input devices of @display that can be used by creators to adjust their UI based on the available interactions.
```
created_at: 2025-03-28T10:05:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -585,3 +641,38 @@ gboolean wpe_display_use_explicit_sync(WPEDisplay* display)
     auto* wpeDisplayClass = WPE_DISPLAY_GET_CLASS(display);
     return wpeDisplayClass->use_explicit_sync ? wpeDisplayClass->use_explicit_sync(display) : FALSE;
 }
+
+/**
+ * wpe_display_get_available_input_devices:
+ * @display: a #WPEDisplay
+ *
+ * Get availableInputDevices of @display that can be used by creators to adjust their UI based on the available interactions.
+ *
+ * Returns: a #WPEAvailableInputDevices
+ */
+WPEAvailableInputDevices wpe_display_get_available_input_devices(WPEDisplay* display)
+{
+    g_return_val_if_fail(WPE_IS_DISPLAY(display), WPE_AVAILABLE_INPUT_DEVICE_NONE);
+
+    return display->priv->availableInputDevices;
+}
+
+/**
+ * wpe_display_set_available_input_devices:
+ * @display: a #WPEDisplay
+ * @availableInputDevices: a #WPEAvailableInputDevices
+ *
+ * Sets availableInputDevices for a @display.
path: Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
user: login: carlosgcampos
body: ```suggestion
 * Set the available input devices for @display.
```
created_at: 2025-03-28T10:07:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -585,3 +641,38 @@ gboolean wpe_display_use_explicit_sync(WPEDisplay* display)
     auto* wpeDisplayClass = WPE_DISPLAY_GET_CLASS(display);
     return wpeDisplayClass->use_explicit_sync ? wpeDisplayClass->use_explicit_sync(display) : FALSE;
 }
+
+/**
+ * wpe_display_get_available_input_devices:
+ * @display: a #WPEDisplay
+ *
+ * Get availableInputDevices of @display that can be used by creators to adjust their UI based on the available interactions.
+ *
+ * Returns: a #WPEAvailableInputDevices
+ */
+WPEAvailableInputDevices wpe_display_get_available_input_devices(WPEDisplay* display)
+{
+    g_return_val_if_fail(WPE_IS_DISPLAY(display), WPE_AVAILABLE_INPUT_DEVICE_NONE);
+
+    return display->priv->availableInputDevices;
+}
+
+/**
+ * wpe_display_set_available_input_devices:
+ * @display: a #WPEDisplay
+ * @availableInputDevices: a #WPEAvailableInputDevices
path: Source/WebKit/WPEPlatform/wpe/WPEDisplay.cpp
user: login: carlosgcampos
body: ```suggestion
 * @devices: a #WPEAvailableInputDevices
```
created_at: 2025-03-28T10:09:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -85,29 +92,32 @@ typedef enum {
     WPE_DISPLAY_ERROR_CONNECTION_FAILED
 } WPEDisplayError;
 
-WPE_API GQuark                  wpe_display_error_quark                   (void);
-WPE_API WPEDisplay             *wpe_display_get_default                   (void);
-WPE_API WPEDisplay             *wpe_display_get_primary                   (void);
-WPE_API void                    wpe_display_set_primary                   (WPEDisplay *display);
-WPE_API gboolean                wpe_display_connect                       (WPEDisplay *display,
-                                                                           GError    **error);
-WPE_API gpointer                wpe_display_get_egl_display               (WPEDisplay *display,
-                                                                           GError    **error);
-WPE_API WPEKeymap              *wpe_display_get_keymap                    (WPEDisplay *display,
-                                                                           GError    **error);
-WPE_API WPEBufferDMABufFormats *wpe_display_get_preferred_dma_buf_formats (WPEDisplay *display);
-WPE_API guint                   wpe_display_get_n_screens                 (WPEDisplay *display);
-WPE_API WPEScreen              *wpe_display_get_screen                    (WPEDisplay *display,
-                                                                           guint       index);
-WPE_API void                    wpe_display_screen_added                  (WPEDisplay *display,
-                                                                           WPEScreen *screen);
-WPE_API void                    wpe_display_screen_removed                (WPEDisplay *display,
-                                                                           WPEScreen *screen);
-WPE_API const char             *wpe_display_get_drm_device                (WPEDisplay *display);
-WPE_API const char             *wpe_display_get_drm_render_node           (WPEDisplay *display);
-WPE_API gboolean                wpe_display_use_explicit_sync             (WPEDisplay *display);
-
-WPE_API WPESettings            *wpe_display_get_settings                  (WPEDisplay *display);
+WPE_API GQuark                   wpe_display_error_quark                   (void);
+WPE_API WPEDisplay              *wpe_display_get_default                   (void);
+WPE_API WPEDisplay              *wpe_display_get_primary                   (void);
+WPE_API void                     wpe_display_set_primary                   (WPEDisplay *display);
+WPE_API gboolean                 wpe_display_connect                       (WPEDisplay *display,
+                                                                            GError    **error);
+WPE_API gpointer                 wpe_display_get_egl_display               (WPEDisplay *display,
+                                                                            GError    **error);
+WPE_API WPEKeymap               *wpe_display_get_keymap                    (WPEDisplay *display,
+                                                                            GError    **error);
+WPE_API WPEBufferDMABufFormats  *wpe_display_get_preferred_dma_buf_formats (WPEDisplay *display);
+WPE_API guint                    wpe_display_get_n_screens                 (WPEDisplay *display);
+WPE_API WPEScreen               *wpe_display_get_screen                    (WPEDisplay *display,
+                                                                            guint       index);
+WPE_API void                     wpe_display_screen_added                  (WPEDisplay *display,
+                                                                            WPEScreen *screen);
+WPE_API void                     wpe_display_screen_removed                (WPEDisplay *display,
+                                                                            WPEScreen *screen);
+WPE_API const char              *wpe_display_get_drm_device                (WPEDisplay *display);
+WPE_API const char              *wpe_display_get_drm_render_node           (WPEDisplay *display);
+WPE_API gboolean                 wpe_display_use_explicit_sync             (WPEDisplay *display);
+
+WPE_API WPESettings             *wpe_display_get_settings                  (WPEDisplay *display);
+WPE_API WPEAvailableInputDevices wpe_display_get_available_input_devices   (WPEDisplay *display);
+WPE_API void                     wpe_display_set_available_input_devices   (WPEDisplay *display,
+                                                                            WPEAvailableInputDevices availableInputDevices);
path: Source/WebKit/WPEPlatform/wpe/WPEDisplay.h
user: login: carlosgcampos
body: ```suggestion
                                                                            WPEAvailableInputDevices devices);
```
created_at: 2025-03-28T10:09:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -227,8 +227,15 @@ const struct wl_registry_listener registryListener = {
         else if (interfaceName == "xdg_wm_base"_s)
             priv->xdgWMBase = static_cast<struct xdg_wm_base*>(wl_registry_bind(registry, name, &xdg_wm_base_interface, 1));
         // FIXME: support zxdg_shell_v6?
-        else if (interfaceName == "wl_seat"_s)
+        else if (interfaceName == "wl_seat"_s) {
             priv->wlSeat = makeUnique<WPE::WaylandSeat>(static_cast<struct wl_seat*>(wl_registry_bind(registry, name, &wl_seat_interface, std::min<uint32_t>(version, 8))));
+            priv->wlSeat->setAvailableInputDevicesChangedCallback([weakDisplay = GWeakPtr { display }]() {
path: Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
user: login: carlosgcampos
body: Let's do this in wpeDisplayWaylandSetup()
created_at: 2025-03-28T10:11:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -227,8 +227,15 @@ const struct wl_registry_listener registryListener = {
         else if (interfaceName == "xdg_wm_base"_s)
             priv->xdgWMBase = static_cast<struct xdg_wm_base*>(wl_registry_bind(registry, name, &xdg_wm_base_interface, 1));
         // FIXME: support zxdg_shell_v6?
-        else if (interfaceName == "wl_seat"_s)
+        else if (interfaceName == "wl_seat"_s) {
             priv->wlSeat = makeUnique<WPE::WaylandSeat>(static_cast<struct wl_seat*>(wl_registry_bind(registry, name, &wl_seat_interface, std::min<uint32_t>(version, 8))));
+            priv->wlSeat->setAvailableInputDevicesChangedCallback([weakDisplay = GWeakPtr { display }]() {
+                if (GRefPtr<WPEDisplayWayland> protectedDisplay { weakDisplay.get() }) {
path: Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
user: login: carlosgcampos
body: GWeakPtr is not thread safe and wpe-platform api either, so here we don't need to protect the display, we can just check the weak and get the pointer. So I would early return and then just use weakDisplay.get() directly.
created_at: 2025-03-28T10:17:36Z
author_association: CONTRIBUTOR
diff_hunk: @@ -227,8 +227,15 @@ const struct wl_registry_listener registryListener = {
         else if (interfaceName == "xdg_wm_base"_s)
             priv->xdgWMBase = static_cast<struct xdg_wm_base*>(wl_registry_bind(registry, name, &xdg_wm_base_interface, 1));
         // FIXME: support zxdg_shell_v6?
-        else if (interfaceName == "wl_seat"_s)
+        else if (interfaceName == "wl_seat"_s) {
             priv->wlSeat = makeUnique<WPE::WaylandSeat>(static_cast<struct wl_seat*>(wl_registry_bind(registry, name, &wl_seat_interface, std::min<uint32_t>(version, 8))));
+            priv->wlSeat->setAvailableInputDevicesChangedCallback([weakDisplay = GWeakPtr { display }]() {
+                if (GRefPtr<WPEDisplayWayland> protectedDisplay { weakDisplay.get() }) {
+                    auto* priv = protectedDisplay->priv;
+                    wpe_display_set_available_input_devices(WPE_DISPLAY(protectedDisplay.get()), priv->wlSeat->availableInputDevices());
path: Source/WebKit/WPEPlatform/wpe/wayland/WPEDisplayWayland.cpp
user: login: carlosgcampos
body: Since we are keeping the callback approahc in the end, we could just pass the new value and here we don't need to ask the seat.
created_at: 2025-03-28T10:18:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -119,6 +123,7 @@ class WaylandSeat {
         GWeakPtr<WPEToplevelWayland> toplevel;
         HashMap<int32_t, std::pair<double, double>, IntHash<int32_t>, WTF::SignedWithZeroKeyHashTraits<int32_t>> points;
     } m_touch;
+    Function<void ()> m_capabilitiesChangedCallback;
path: Source/WebKit/WPEPlatform/wpe/wayland/WPEWaylandSeat.h
user: login: carlosgcampos
body: ```suggestion
    Function<void()> m_capabilitiesChangedCallback;
```
created_at: 2025-03-28T10:19:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -48,38 +48,34 @@ bool WebPage::platformCanHandleRequest(const ResourceRequest&)
 
 bool WebPage::hoverSupportedByPrimaryPointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    return !screenIsTouchPrimaryInputDevice();
-#else
-    return true;
-#endif
+    // For now, there's no concept of primary vs any
+    return WebProcess::singleton().availableInputDevices().contains(AvailableInputDevices::Mouse);
path: Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
user: login: carlosgcampos
body: We can add WebProcess::primaryPointingDevice() and for now just return mouse if present, otherwise touchscreen if available or none
created_at: 2025-03-28T10:21:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -48,38 +48,34 @@ bool WebPage::platformCanHandleRequest(const ResourceRequest&)
 
 bool WebPage::hoverSupportedByPrimaryPointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    return !screenIsTouchPrimaryInputDevice();
-#else
-    return true;
-#endif
+    // For now, there's no concept of primary vs any
+    return WebProcess::singleton().availableInputDevices().contains(AvailableInputDevices::Mouse);
 }
 
 bool WebPage::hoverSupportedByAnyAvailablePointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    return !screenHasTouchDevice();
-#else
-    return true;
-#endif
+    return WebProcess::singleton().availableInputDevices().contains(AvailableInputDevices::Mouse);
 }
 
 std::optional<PointerCharacteristics> WebPage::pointerCharacteristicsOfPrimaryPointingDevice() const
 {
-#if ENABLE(TOUCH_EVENTS)
-    if (screenIsTouchPrimaryInputDevice())
+    const auto& availableInputs = WebProcess::singleton().availableInputDevices();
+    if (availableInputs.contains(AvailableInputDevices::Mouse))
+        return PointerCharacteristics::Fine;
+    if (availableInputs.contains(AvailableInputDevices::TouchScreen))
path: Source/WebKit/WebProcess/WebPage/wpe/WebPageWPE.cpp
user: login: carlosgcampos
body: Which is wat you are doing here, but this could check WebProcess::primaryPointingDevice() instead and the logic to device the primary is in one place.
created_at: 2025-03-28T10:24:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -126,6 +126,9 @@ messages -> WebProcess : AuxiliaryProcess WantsAsyncDispatchMessage {
 #if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
     SetScreenProperties(struct WebCore::ScreenProperties screenProperties)
 #endif
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+    UpdateAvailableInputDevices(OptionSet<WebKit::AvailableInputDevices> availableInputDevices)
path: Source/WebKit/WebProcess/WebProcess.messages.in
user: login: carlosgcampos
body: ```suggestion
    SetAvailableInputDevices(OptionSet<WebKit::AvailableInputDevices> availableInputDevices)
```
created_at: 2025-03-28T10:28:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +117,18 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
     if (!MemoryPressureMonitor::disabled())
         installMemoryPressureHandler();
 #endif
+
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        auto* display = wpe_display_get_primary();
+        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* d, GParamSpec*, WebProcessPool*) {
+            auto availableInputDevices = toAvailableInputDevices(wpe_display_get_available_input_devices(d));
+            for (auto& pool : allProcessPools())
+                pool->sendToAllProcesses(Messages::WebProcess::SetAvailableInputDevices(availableInputDevices));
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: This is done from every pool, only send the message to the processes of this pool.
created_at: 2025-04-04T12:09:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +117,18 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
     if (!MemoryPressureMonitor::disabled())
         installMemoryPressureHandler();
 #endif
+
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: ```suggestion
#if ENABLE(WPE_PLATFORM)
```
created_at: 2025-04-04T12:10:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +117,18 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
     if (!MemoryPressureMonitor::disabled())
         installMemoryPressureHandler();
 #endif
+
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        auto* display = wpe_display_get_primary();
+        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* d, GParamSpec*, WebProcessPool*) {
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: ```suggestion
        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* display, GParamSpec*, WebProcessPool*) {
```
created_at: 2025-04-04T12:12:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -185,6 +214,13 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
 
 void WebProcessPool::platformInvalidateContext()
 {
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: ```suggestion
#if ENABLE(WPE_PLATFORM)
```
created_at: 2025-04-04T12:12:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -302,6 +338,24 @@ const String& WebProcessPool::generateNextAccessibilityBusName()
     return accessibilityBusName();
 }
 
+#if PLATFORM(WPE)
+OptionSet<AvailableInputDevices> WebProcessPool::availableInputDevices() const
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: This could be a static function and then we don't need to add platform specific code to WebProcessPool.h
created_at: 2025-04-04T12:15:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -297,6 +299,25 @@ void WebProcess::setScreenProperties(const WebCore::ScreenProperties& properties
 }
 #endif
 
+#if PLATFORM(WPE)
+std::optional<AvailableInputDevices> WebProcess::primaryPointingDevice() const
+{
+    const auto& availableInputs = availableInputDevices();
path: Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
user: login: carlosgcampos
body: Why not just use m_availableInputDevices?
created_at: 2025-04-04T12:21:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +117,18 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
     if (!MemoryPressureMonitor::disabled())
         installMemoryPressureHandler();
 #endif
+
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        auto* display = wpe_display_get_primary();
+        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* d, GParamSpec*, WebProcessPool*) {
+            auto availableInputDevices = toAvailableInputDevices(wpe_display_get_available_input_devices(d));
+            for (auto& pool : allProcessPools())
+                pool->sendToAllProcesses(Messages::WebProcess::SetAvailableInputDevices(availableInputDevices));
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: spenap
body: oops! I borrowed this bit from some other patch, and didn't realise what I was doing, thanks for spotting it!
created_at: 2025-04-04T12:35:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +77,39 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
 
 namespace WebKit {
 
+#if PLATFORM(WPE) && ENABLE(WPE_PLATFORM)
+static OptionSet<AvailableInputDevices> toAvailableInputDevices(WPEAvailableInputDevices inputDevices)
+{
+    OptionSet<AvailableInputDevices> availableInputDevices;
+    if (inputDevices & WPE_AVAILABLE_INPUT_DEVICE_MOUSE)
+        availableInputDevices.add(AvailableInputDevices::Mouse);
+    if (inputDevices & WPE_AVAILABLE_INPUT_DEVICE_KEYBOARD)
+        availableInputDevices.add(AvailableInputDevices::Keyboard);
+    if (inputDevices & WPE_AVAILABLE_INPUT_DEVICE_TOUCHSCREEN)
+        availableInputDevices.add(AvailableInputDevices::Touchscreen);
+
+    return availableInputDevices;
+}
+#endif
+
+#if PLATFORM(WPE)
+static OptionSet<AvailableInputDevices> WebProcessPool::availableInputDevices()
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: ```suggestion
static OptionSet<AvailableInputDevices> availableInputDevices()
```
created_at: 2025-04-04T12:48:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +135,17 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
     if (!MemoryPressureMonitor::disabled())
         installMemoryPressureHandler();
 #endif
+
+#if ENABLE(WPE_PLATFORM)
+    bool usingWPEPlatformAPI = !!g_type_class_peek(WPE_TYPE_DISPLAY);
+    if (usingWPEPlatformAPI) {
+        auto* display = wpe_display_get_primary();
+        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* display, GParamSpec*, WebProcessPool*) {
path: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
user: login: carlosgcampos
body: ```suggestion
        g_signal_connect(display, "notify::available-input-devices", G_CALLBACK(+[](WPEDisplay* display, GParamSpec*, WebProcessPool* pool) {
```
created_at: 2025-04-04T12:48:47Z
author_association: CONTRIBUTOR

PR comments:
user: login: webkit-early-warning-system
created_at: 2025-03-05T16:49:53Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/98881c87b975d71cd3deed0ebc20deff86318c02)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/93521 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/13090 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/2825 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/98523 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/44047 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/95571 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/13378 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/21537 "Built successfully") | [❌ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/71451 "Found 7 new test failures: fast/events/touch/emulate-touch-events.html fast/events/touch/touch-handler-count.html fast/events/touch/touch-stale-node-crash.html imported/w3c/web-platform-tests/dom/nodes/Document-createEvent-touchevent.window.html imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https.html imported/w3c/web-platform-tests/mixed-content/gen/top.http-rp/opt-in/video-tag.https.html imported/w3c/web-platform-tests/touch-events/touch-globaleventhandler-interface.html (failure)") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/28827 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/96523 "Passed tests") | [❌ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/10009 "Found 1 new test failure: fast/forms/ios/focus-input-via-button-no-scaling.html (failure)") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/84575 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/51785 "Passed tests") | 
| | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/9691 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/2200 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/43361 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/80002 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/2250 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/100556 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/20573 "Built successfully") | [✅ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/15043 "Passed tests") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/80463 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/20825 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/80506 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/79793 "Passed tests") | 
| | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/24334 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/1675 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/13721 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/20557 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/25735 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/20244 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/23704 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/21985 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-03-14T15:56:54Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/7e145c5042625fdfde8c548203dc9a880fd61902)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [❌ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/95180 "1 style error") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/14780 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/4638 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/100219 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/45681 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/97228 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/15068 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/23207 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/72595 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/29879 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/98183 "Passed tests") | [✅ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/11258 "Passed tests") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/85936 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/52926 "Passed tests") | 
| | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/10967 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/3669 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/45019 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/81155 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/3765 "Passed tests") | [❌ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/102261 "Hash 7e145c50 for PR 41924 does not build (failure)") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/22228 "Built successfully") | [✅ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/16215 "Passed tests") | [❌ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/2/builds/102261 "Hash 7e145c50 for PR 41924 does not build (failure)") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/22476 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/81952 "Passed tests") | [❌ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/2/builds/102261 "Hash 7e145c50 for PR 41924 does not build (failure)") | 
| | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/25556 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/2957 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/15481 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/22198 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/27324 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/21857 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/25334 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/23596 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-03-17T10:20:52Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/8cb17f1b16b4121878834928468d6cf4bdb0f8c6)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [❌ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/95427 "1 style error") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/15030 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/4897 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/100477 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/45933 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/97474 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/15317 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/23463 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/72790 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/30052 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/98430 "Passed tests") | [✅ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/11464 "Passed tests") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/86149 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/53121 "Passed tests") | 
| | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/11176 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/3879 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/45269 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/81358 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/3974 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/102514 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/22477 "Built successfully") | [❌ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/16414 "Found 1 new test failure: imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.html (failure)") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/81809 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/22726 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/82158 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/81181 "Passed tests") | 
| | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/25753 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/3177 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/15791 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/22446 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/27585 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/22105 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/25580 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/23845 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-03-17T14:02:23Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/239ad8a1c1f7637ef101ca953195d49bac3b7c74)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/95440 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/15043 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/4914 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/100490 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/45946 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/97487 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/15330 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/23476 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/72801 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/30068 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/98443 "Passed tests") | [❌ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/11479 "Found 1 new test failure: fast/forms/ios/focus-input-via-button.html (failure)") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/86170 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/53132 "Passed tests") | 
| | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/11190 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/3899 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/45282 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/81372 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/3994 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/102527 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/22490 "Built successfully") | [✅ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/16427 "Passed tests") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/81816 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/22739 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/82178 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/81188 "Passed tests") | 
| | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/25767 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/3197 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/15812 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/22459 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/27598 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/22118 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/25593 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/23858 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-03-26T17:01:56Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/67dd02cb56288ef89cc6bfddf9433d6114810698)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/96871 "Passed style check") | [❌ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/16485 "Hash 67dd02cb for PR 41924 does not build (failure)") | [❌ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/6674 "Hash 67dd02cb for PR 41924 does not build (failure)") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/101945 "Built successfully") | [❌ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/47392 "Hash 67dd02cb for PR 41924 does not build (failure)") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/98916 "Passed tests") | [❌ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/16781 "Failed to compile WebKit") | [❌ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/24931 "Hash 67dd02cb for PR 41924 does not build (failure)") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/73816 "Passed tests") | [❌ 🧪 win-tests](https://ews-build.webkit.org/#/builders/59/builds/47392 "Hash 67dd02cb for PR 41924 does not build (failure)") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/99874 "Passed tests") | [❌ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/130/builds/16781 "Failed to compile WebKit") | [❌ 🧪 api-mac](https://ews-build.webkit.org/#/builders/138/builds/6674 "Hash 67dd02cb for PR 41924 does not build (failure)") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/54150 "Passed tests") | 
| | [❌ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/130/builds/16781 "Failed to compile WebKit") | [❌ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/138/builds/6674 "Hash 67dd02cb for PR 41924 does not build (failure)") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/46719 "Built successfully") | 
| | [❌ 🧪 api-ios](https://ews-build.webkit.org/#/builders/130/builds/16781 "Failed to compile WebKit") | [❌ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/138/builds/6674 "Hash 67dd02cb for PR 41924 does not build (failure)") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/103968 "Built successfully") | 
| | [![loading-orange](https://github-production-user-asset-6210df.s3.amazonaws.com/3098702/291015173-08c448be-ac0a-4fd6-92a3-8165057445b7.png) 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/23939 "Build is in progress. Recent messages:OS: Sequoia (15.2), Xcode: 16.2; Skipping applying patch since patch_id isn't provided; Checked out pull request; Failed to compile WebKit; Compiled WebKit (warnings); Hash 67dd02cb for PR 41924 does not build (failure)") | [❌ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/123/builds/24931 "Hash 67dd02cb for PR 41924 does not build (failure)") | [❌ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/82863 "Found 1 new test failure: imported/w3c/web-platform-tests/css/css-view-transitions/content-with-child-with-transparent-background.html (failure)") | 
| | [❌ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/24192 "Hash 67dd02cb for PR 41924 does not build (failure)") | [❌ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/138/builds/6674 "Hash 67dd02cb for PR 41924 does not build (failure)") | [  ~~🧪 api-gtk~~](https://ews-build.webkit.org/#/builders/21/builds/82255 "Build was cancelled. Recent messages:Printed configuration; Skipping applying patch since patch_id isn't provided; Checked out pull request; 3 api tests failed or timed out; 3 api tests failed or timed out; Compiled WebKit (cancelled)") | 
| | [⏳ 🧪 vision-wk2 ](https://ews-build.webkit.org/#/builders/visionOS-2-Simulator-WK2-Tests-EWS "Waiting in queue, processing has not started yet") | [❌ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/138/builds/6674 "Hash 67dd02cb for PR 41924 does not build (failure)") | [❌ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/17439 "Hash 67dd02cb for PR 41924 does not build (failure)") | 
| | [❌ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/23901 "Hash 67dd02cb for PR 41924 does not build (failure)") | [❌ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/29056 "Failed to build and analyze WebKit") | | 
| | [❌ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/23560 "Hash 67dd02cb for PR 41924 does not build (failure)") | | | 
| | [❌ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/27040 "Hash 67dd02cb for PR 41924 does not build (failure)") | | | 
| | [❌ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/25301 "Hash 67dd02cb for PR 41924 does not build (failure)") | | | </details>
author_association: COLLABORATOR
user: login: spenap
created_at: 2025-03-26T17:07:24Z
body: @carlosgcampos , I've tried to address all your comments ~~, but haven't retested yet after all changes (will do tomorrow)~~

- You'll see I've kept the callback for now -- with me, it's the opposite: the more I think about it, the more I like it.
- ~~I also have duplicated code converting from the native WPEAvailableDisplayDevices enum into OptionSet<WebKit::AvailableDisplayDevices> (one in `WebProcessPoolGlib.cpp`, another in `ScreenManagerWPE.cpp`). I guess I could create a new helper namespace to put this conversion with the right ifdefs, but I wonder if I am doing something that has a better solution that you could point me to. I've noticed there's a `fromRaw` method in OptionSet, but I am not sure I understand how it's supposed to work~~
author_association: CONTRIBUTOR
user: login: webkit-early-warning-system
created_at: 2025-03-27T13:38:47Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/e4c991aa09e69212bb8b8c02174ac1b6ec36f2f4)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/97047 "Passed style check") | [❌ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/16670 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/6877 "Hash e4c991aa for PR 41924 does not build (failure)") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/102128 "Built successfully") | [❌ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/47572 "Hash e4c991aa for PR 41924 does not build (failure)") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/99092 "Passed tests") | [❌ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/16962 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/25120 "Hash e4c991aa for PR 41924 does not build (failure)") | [  ~~🧪 wpe-wk2~~](https://ews-build.webkit.org/#/builders/34/builds/73932 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [❌ 🧪 win-tests](https://ews-build.webkit.org/#/builders/59/builds/47572 "Hash e4c991aa for PR 41924 does not build (failure)") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/100050 "Passed tests") | [❌ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/130/builds/16962 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🧪 api-mac](https://ews-build.webkit.org/#/builders/138/builds/6877 "Hash e4c991aa for PR 41924 does not build (failure)") | [  ~~🧪 api-wpe~~](https://ews-build.webkit.org/#/builders/41/builds/54268 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | 
| | [❌ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/130/builds/16962 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/138/builds/6877 "Hash e4c991aa for PR 41924 does not build (failure)") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/46902 "Built successfully") | 
| | [❌ 🧪 api-ios](https://ews-build.webkit.org/#/builders/130/builds/16962 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/138/builds/6877 "Hash e4c991aa for PR 41924 does not build (failure)") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/104149 "Built successfully") | 
| | [❌ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/24121 "Failed to compile WebKit") | [❌ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/123/builds/25120 "Hash e4c991aa for PR 41924 does not build (failure)") | [  ~~🧪 gtk-wk2~~](https://ews-build.webkit.org/#/builders/1/builds/82979 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | 
| | [❌ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/24372 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/138/builds/6877 "Hash e4c991aa for PR 41924 does not build (failure)") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/82375 "Passed tests") | 
| | [⏳ 🧪 vision-wk2 ](https://ews-build.webkit.org/#/builders/visionOS-2-Simulator-WK2-Tests-EWS "Waiting in queue, processing has not started yet") | [❌ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/138/builds/6877 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/17626 "Hash e4c991aa for PR 41924 does not build (failure)") | 
| | [❌ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/24086 "Hash e4c991aa for PR 41924 does not build (failure)") | [❌ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/29234 "Failed to build and analyze WebKit") | | 
| | [❌ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/23909 "Hash e4c991aa for PR 41924 does not build (failure)") | | | 
| | [❌ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/27221 "Hash e4c991aa for PR 41924 does not build (failure)") | | | 
| | [❌ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/25482 "Hash e4c991aa for PR 41924 does not build (failure)") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-03-27T14:28:34Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b4211fa60291e2d76a3b63c79385e3173e25fec7)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/97050 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/16673 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/6880 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/102131 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/47575 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/99095 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/16965 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/25123 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/73933 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/31145 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/100053 "Passed tests") | [❌ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/12798 "Found 1 new test failure: fast/forms/ios/focus-input-via-button.html (failure)") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/87777 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/54269 "Passed tests") | 
| [✅ 🧪 webkitpy](https://ews-build.webkit.org/#/builders/6/builds/96538 "Passed tests") | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/12549 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/5631 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/46905 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/82622 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/5710 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/104152 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/24124 "Built successfully") | [⏳ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/macOS-Sequoia-Debug-WK2-Tests-EWS "Waiting to run tests") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/82982 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/24375 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/83883 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/82378 "Passed tests") | 
| | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/27064 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/4612 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/17629 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/24089 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/29238 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/23912 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/27224 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/25485 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-03-27T16:27:01Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/68825736c3e600e3c6fb1137fa839b00e64b89b7)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/97063 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/16686 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/6894 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/102144 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/47588 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/99108 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/16978 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/25136 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/73945 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/31155 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/100066 "Passed tests") | [✅ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/12811 "Passed tests") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/87789 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/54281 "Passed tests") | 
| [✅ 🧪 webkitpy](https://ews-build.webkit.org/#/builders/6/builds/96551 "Passed tests") | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/12562 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/5644 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/46918 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/82633 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/5723 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/104165 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/24137 "Built successfully") | [❌ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/17607 "Found 2 new test failures: imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.htm imported/w3c/web-platform-tests/workers/abrupt-completion.html (failure)") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/82991 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/24388 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/83896 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/82387 "Passed tests") | 
| | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/27076 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/4625 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/17642 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/24102 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/29252 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/23925 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/27237 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/25498 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: spenap
created_at: 2025-03-27T16:29:04Z
body: I've verified that this picks up changes when plugging and unplugging -- if a test is setup to automatically reload the page, the values update. 

I've also updated the guards to cover the 1.1 API. This is ready for a final review now, @carlosgcampos , @aperezdc 
author_association: CONTRIBUTOR
user: login: webkit-early-warning-system
created_at: 2025-04-04T12:04:18Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/1baa24e7140236fe1d03e15c82b15f4f67714ca5)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/98323 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/17954 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/8182 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/103442 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/48852 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/100368 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/18246 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/26405 "Built successfully") | [  ~~🧪 wpe-wk2~~](https://ews-build.webkit.org/#/builders/34/builds/74841 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 win-tests~~](https://ews-build.webkit.org/#/builders/60/builds/32004 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/101327 "Passed tests") | [✅ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/13817 "Passed tests") | [  ~~🧪 api-mac~~](https://ews-build.webkit.org/#/builders/18/builds/88799 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 api-wpe~~](https://ews-build.webkit.org/#/builders/41/builds/55201 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | 
| [✅ 🧪 webkitpy](https://ews-build.webkit.org/#/builders/6/builds/97809 "Passed tests") | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/13601 "Passed tests") | [  ~~🧪 mac-wk1~~](https://ews-build.webkit.org/#/builders/135/builds/6759 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/48294 "Built successfully") | 
| | [⏳ 🧪 api-ios](https://ews-build.webkit.org/#/builders/API-Tests-iOS-Simulator-EWS "Waiting to run tests") | [  ~~🧪 mac-wk2~~](https://ews-build.webkit.org/#/builders/136/builds/6833 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/105817 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/25410 "Built successfully") | [⏳ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/macOS-Sequoia-Debug-WK2-Tests-EWS "Waiting to run tests") | [⏳ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/GTK-WK2-Tests-EWS "Waiting to run tests") | 
| | [❌ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/25783 "") | [❌ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/85001 "Exiting early after 10 failures. 10 tests run. 1 failures") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/83292 "Passed tests") | 
| | [⏳ 🧪 vision-wk2 ](https://ews-build.webkit.org/#/builders/visionOS-2-Simulator-WK2-Tests-EWS "Waiting in queue, processing has not started yet") | [  ~~🧪 mac-intel-wk2~~](https://ews-build.webkit.org/#/builders/137/builds/5605 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/19053 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/25368 "Built successfully") | [  ~~🛠 mac-safer-cpp~~](https://ews-build.webkit.org/#/builders/120/builds/30542 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/25188 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/28504 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/26763 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-04-04T12:39:49Z
body: EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/27565fbf994ac90c2b097c674523839c3878b7c4)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/98325 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/17956 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/8184 "Built successfully") | [  ~~🛠 wpe~~](https://ews-build.webkit.org/#/builders/5/builds/103445 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/48854 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/100370 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/18248 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/26407 "Built successfully") | [  ~~🧪 wpe-wk2~~](https://ews-build.webkit.org/#/builders/5/builds/103445 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 win-tests~~](https://ews-build.webkit.org/#/builders/60/builds/32007 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/101329 "Passed tests") | [  ~~🧪 ios-wk2~~](https://ews-build.webkit.org/#/builders/132/builds/13818 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 api-mac~~](https://ews-build.webkit.org/#/builders/18/builds/88801 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 api-wpe~~](https://ews-build.webkit.org/#/builders/5/builds/103445 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | 
| [✅ 🧪 webkitpy](https://ews-build.webkit.org/#/builders/6/builds/97811 "Passed tests") | [  ~~🧪 ios-wk2-wpt~~](https://ews-build.webkit.org/#/builders/133/builds/13602 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 mac-wk1~~](https://ews-build.webkit.org/#/builders/135/builds/6761 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🛠 wpe-cairo~~](https://ews-build.webkit.org/#/builders/65/builds/48296 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | 
| | [⏳ 🧪 api-ios](https://ews-build.webkit.org/#/builders/API-Tests-iOS-Simulator-EWS "Waiting to run tests") | [  ~~🧪 mac-wk2~~](https://ews-build.webkit.org/#/builders/136/builds/6835 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/105819 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/25412 "Built successfully") | [⏳ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/macOS-Sequoia-Debug-WK2-Tests-EWS "Waiting to run tests") | [⏳ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/GTK-WK2-Tests-EWS "Waiting to run tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/25785 "Built successfully") | [  ~~🧪 mac-wk2-stress~~](https://ews-build.webkit.org/#/builders/8/builds/85003 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 api-gtk~~](https://ews-build.webkit.org/#/builders/21/builds/83295 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | 
| | [  ~~🧪 vision-wk2~~](https://ews-build.webkit.org/#/builders/126/builds/27934 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [  ~~🧪 mac-intel-wk2~~](https://ews-build.webkit.org/#/builders/137/builds/5607 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/19056 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/25370 "Built successfully") | [  ~~🛠 mac-safer-cpp~~](https://ews-build.webkit.org/#/builders/120/builds/30544 "The change is no longer eligible for processing. Commit was outdated when EWS attempted to process it.") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/25190 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/28506 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/26765 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-early-warning-system
created_at: 2025-04-04T12:56:16Z
body: EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/add3ff824b54dca9c7fbc217a58ca5e0e187c5dd)<details>

| Misc | iOS, visionOS, tvOS & watchOS  | macOS  | Linux |  Windows |
| ----- | ---------------------- | ------- |  ----- |  --------- |
| [✅ 🧪 style](https://ews-build.webkit.org/#/builders/38/builds/98327 "Passed style check") | [✅ 🛠 ios](https://ews-build.webkit.org/#/builders/131/builds/17958 "Built successfully") | [✅ 🛠 mac](https://ews-build.webkit.org/#/builders/138/builds/8186 "Built successfully") | [✅ 🛠 wpe](https://ews-build.webkit.org/#/builders/5/builds/103447 "Built successfully") | [✅ 🛠 win](https://ews-build.webkit.org/#/builders/59/builds/48856 "Built successfully") 
| [✅ 🧪 bindings](https://ews-build.webkit.org/#/builders/9/builds/100372 "Passed tests") | [✅ 🛠 ios-sim](https://ews-build.webkit.org/#/builders/130/builds/18250 "Built successfully") | [✅ 🛠 mac-AS-debug](https://ews-build.webkit.org/#/builders/123/builds/26409 "Built successfully") | [✅ 🧪 wpe-wk2](https://ews-build.webkit.org/#/builders/34/builds/74845 "Passed tests") | [✅ 🧪 win-tests](https://ews-build.webkit.org/#/builders/60/builds/32011 "Passed tests") 
| [✅ 🧪 webkitperl](https://ews-build.webkit.org/#/builders/11/builds/101331 "Passed tests") | [✅ 🧪 ios-wk2](https://ews-build.webkit.org/#/builders/132/builds/13823 "Passed tests") | [✅ 🧪 api-mac](https://ews-build.webkit.org/#/builders/18/builds/88804 "Passed tests") | [✅ 🧪 api-wpe](https://ews-build.webkit.org/#/builders/41/builds/55205 "Passed tests") | 
| [✅ 🧪 webkitpy](https://ews-build.webkit.org/#/builders/6/builds/97813 "Passed tests") | [✅ 🧪 ios-wk2-wpt](https://ews-build.webkit.org/#/builders/133/builds/13606 "Passed tests") | [✅ 🧪 mac-wk1](https://ews-build.webkit.org/#/builders/135/builds/6765 "Passed tests") | [✅ 🛠 wpe-cairo](https://ews-build.webkit.org/#/builders/65/builds/48298 "Built successfully") | 
| | [✅ 🧪 api-ios](https://ews-build.webkit.org/#/builders/13/builds/83586 "Passed tests") | [✅ 🧪 mac-wk2](https://ews-build.webkit.org/#/builders/136/builds/6839 "Passed tests") | [✅ 🛠 gtk](https://ews-build.webkit.org/#/builders/2/builds/105821 "Built successfully") | 
| | [✅ 🛠 vision](https://ews-build.webkit.org/#/builders/128/builds/25414 "Built successfully") | [✅ 🧪 mac-AS-debug-wk2](https://ews-build.webkit.org/#/builders/122/builds/18494 "Passed tests") | [✅ 🧪 gtk-wk2](https://ews-build.webkit.org/#/builders/1/builds/83826 "Passed tests") | 
| | [✅ 🛠 vision-sim](https://ews-build.webkit.org/#/builders/121/builds/25787 "Built successfully") | [✅ 🧪 mac-wk2-stress](https://ews-build.webkit.org/#/builders/8/builds/85006 "Passed tests") | [✅ 🧪 api-gtk](https://ews-build.webkit.org/#/builders/21/builds/83296 "Passed tests") | 
| [✅ 🛠 🧪 merge](https://ews-build.webkit.org/#/builders/19/builds/21057 "Built successfully and passed tests") | [✅ 🧪 vision-wk2](https://ews-build.webkit.org/#/builders/126/builds/27938 "Passed tests") | [✅ 🧪 mac-intel-wk2](https://ews-build.webkit.org/#/builders/137/builds/5610 "Passed tests") | [✅ 🛠 playstation](https://ews-build.webkit.org/#/builders/134/builds/19058 "Built successfully") | 
| | [✅ 🛠 tv](https://ews-build.webkit.org/#/builders/127/builds/25372 "Built successfully") | [✅ 🛠 mac-safer-cpp](https://ews-build.webkit.org/#/builders/120/builds/30553 "Built successfully") | | 
| | [✅ 🛠 tv-sim](https://ews-build.webkit.org/#/builders/125/builds/25192 "Built successfully") | | | 
| | [✅ 🛠 watch](https://ews-build.webkit.org/#/builders/129/builds/28508 "Built successfully") | | | 
| | [✅ 🛠 watch-sim](https://ews-build.webkit.org/#/builders/124/builds/26767 "Built successfully") | | | </details>
author_association: COLLABORATOR
user: login: webkit-ews-buildbot
created_at: 2025-04-04T21:52:27Z
body: 

Safe-Merge-Queue: Build [#53498](https://ews-build.webkit.org/#/builders/40/builds/53498).
author_association: COLLABORATOR
user: login: webkit-commit-queue
created_at: 2025-04-04T22:09:19Z
body: Committed 293276@main (2e472a4b1063): <https://commits.webkit.org/293276@main>

Reviewed commits have been landed. Closing PR #41924 and removing active labels.
author_association: COLLABORATOR