Title: [257700] trunk/Source/WebKit
- Revision
- 257700
- Author
- [email protected]
- Date
- 2020-03-01 19:20:44 -0800 (Sun, 01 Mar 2020)
Log Message
[GTK] Fix the build when Wayland target is disabled
https://bugs.webkit.org/show_bug.cgi?id=208407
Patch by Ting-Wei Lan <[email protected]> on 2020-03-01
Reviewed by Darin Adler.
Values in the enum WebCore::PlatformDisplay::Type are only defined when
their corresponding platform targets are enabled, so we need #if checks
around uses of them.
* UIProcess/API/glib/WebKitProtocolHandler.cpp:
(WebKit::WebKitProtocolHandler::handleGPU):
* UIProcess/API/glib/WebKitUIClient.cpp:
(UIClient::windowConfigureEventCallback):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (257699 => 257700)
--- trunk/Source/WebKit/ChangeLog 2020-03-02 01:25:00 UTC (rev 257699)
+++ trunk/Source/WebKit/ChangeLog 2020-03-02 03:20:44 UTC (rev 257700)
@@ -1,3 +1,19 @@
+2020-03-01 Ting-Wei Lan <[email protected]>
+
+ [GTK] Fix the build when Wayland target is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=208407
+
+ Reviewed by Darin Adler.
+
+ Values in the enum WebCore::PlatformDisplay::Type are only defined when
+ their corresponding platform targets are enabled, so we need #if checks
+ around uses of them.
+
+ * UIProcess/API/glib/WebKitProtocolHandler.cpp:
+ (WebKit::WebKitProtocolHandler::handleGPU):
+ * UIProcess/API/glib/WebKitUIClient.cpp:
+ (UIClient::windowConfigureEventCallback):
+
2020-03-01 Wenson Hsieh <[email protected]>
Unreviewed, rolling out r257618.
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp (257699 => 257700)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp 2020-03-02 01:25:00 UTC (rev 257699)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp 2020-03-02 03:20:44 UTC (rev 257700)
@@ -286,8 +286,15 @@
" <td><div class=\"titlename\">Type</div></td>"
" <td>%s</td>"
" </tbody></tr>",
- PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland ? "Wayland" : "X11");
+#if PLATFORM(WAYLAND)
+ PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland ? "Wayland" :
#endif
+#if PLATFORM(X11)
+ PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11 ? "X11" :
+#endif
+ "Unknown"
+ );
+#endif
auto rect = IntRect(screenRect(nullptr));
g_string_append_printf(html,
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp (257699 => 257700)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp 2020-03-02 01:25:00 UTC (rev 257699)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp 2020-03-02 03:20:44 UTC (rev 257700)
@@ -144,7 +144,10 @@
{
GdkRectangle geometry = { 0, 0, 0, 0 };
// Position a toplevel window is not supported under wayland.
- if (WebCore::PlatformDisplay::sharedDisplay().type() != WebCore::PlatformDisplay::Type::Wayland) {
+#if PLATFORM(WAYLAND)
+ if (WebCore::PlatformDisplay::sharedDisplay().type() != WebCore::PlatformDisplay::Type::Wayland)
+#endif
+ {
gtk_window_get_position(window, &geometry.x, &geometry.y);
if (geometry.x != targetGeometry->x || geometry.y != targetGeometry->y)
return FALSE;
@@ -172,7 +175,10 @@
if (webkit_web_view_is_controlled_by_automation(m_webView) && WebCore::widgetIsOnscreenToplevelWindow(window) && gtk_widget_get_visible(window)) {
bool needsMove = false;
// Position a toplevel window is not supported under wayland.
- if (WebCore::PlatformDisplay::sharedDisplay().type() != WebCore::PlatformDisplay::Type::Wayland) {
+#if PLATFORM(WAYLAND)
+ if (WebCore::PlatformDisplay::sharedDisplay().type() != WebCore::PlatformDisplay::Type::Wayland)
+#endif
+ {
if (geometry.x >= 0 && geometry.y >= 0) {
int x, y;
gtk_window_get_position(GTK_WINDOW(window), &x, &y);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes