Title: [212605] trunk/Source/WebKit2
Revision
212605
Author
mcatanz...@igalia.com
Date
2017-02-18 02:01:13 -0800 (Sat, 18 Feb 2017)

Log Message

[GTK] Cannot paste primary selection into web view in Wayland
https://bugs.webkit.org/show_bug.cgi?id=166949

Reviewed by Carlos Garcia Campos.

Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
the time, I changed this function to report that primary selection was unsupported. But
nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
to do to make it work in WebKit is change this return value.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::supportsGlobalSelection):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (212604 => 212605)


--- trunk/Source/WebKit2/ChangeLog	2017-02-18 09:44:38 UTC (rev 212604)
+++ trunk/Source/WebKit2/ChangeLog	2017-02-18 10:01:13 UTC (rev 212605)
@@ -1,3 +1,18 @@
+2017-02-18  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [GTK] Cannot paste primary selection into web view in Wayland
+        https://bugs.webkit.org/show_bug.cgi?id=166949
+
+        Reviewed by Carlos Garcia Campos.
+
+        Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
+        the time, I changed this function to report that primary selection was unsupported. But
+        nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
+        to do to make it work in WebKit is change this return value.
+
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit::WebEditorClient::supportsGlobalSelection):
+
 2017-02-17  Brian Burg  <bb...@apple.com>
 
         Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp (212604 => 212605)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp	2017-02-18 09:44:38 UTC (rev 212604)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp	2017-02-18 10:01:13 UTC (rev 212605)
@@ -55,7 +55,7 @@
 #include <wtf/NeverDestroyed.h>
 #include <wtf/text/StringView.h>
 
-#if PLATFORM(X11)
+#if PLATFORM(GTK)
 #include <WebCore/PlatformDisplay.h>
 #endif
 
@@ -550,12 +550,17 @@
 
 bool WebEditorClient::supportsGlobalSelection()
 {
-#if PLATFORM(GTK) && PLATFORM(X11)
-    return PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11;
-#else
-    // FIXME: Return true on other X11 platforms when they support global selection.
+#if PLATFORM(GTK)
+#if PLATFORM(X11)
+    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11)
+        return true;
+#endif
+#if PLATFORM(WAYLAND)
+    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
+        return true;
+#endif
+#endif
     return false;
-#endif
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to