Title: [260058] trunk/Source/WebCore
Revision
260058
Author
[email protected]
Date
2020-04-13 22:12:59 -0700 (Mon, 13 Apr 2020)

Log Message

[GTK4] Use ThemeAdwaita instead of ThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=210334

Reviewed by Carlos Garcia Campos.

No new tests needed.

* platform/adwaita/ThemeAdwaita.cpp: Build the Theme::singleton() factory also with USE(GTK4).
* platform/gtk/ThemeGtk.cpp: Conditionally build if !USE(GTK4).
(WebCore::ThemeGtk::ensurePlatformColors const): Add deprecation ignore guards.
* platform/gtk/ThemeGtk.h: Conditionally build if !USE(GTK4).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (260057 => 260058)


--- trunk/Source/WebCore/ChangeLog	2020-04-14 03:05:21 UTC (rev 260057)
+++ trunk/Source/WebCore/ChangeLog	2020-04-14 05:12:59 UTC (rev 260058)
@@ -1,3 +1,17 @@
+2020-04-13  Adrian Perez de Castro  <[email protected]>
+
+        [GTK4] Use ThemeAdwaita instead of ThemeGtk
+        https://bugs.webkit.org/show_bug.cgi?id=210334
+
+        Reviewed by Carlos Garcia Campos.
+
+        No new tests needed.
+
+        * platform/adwaita/ThemeAdwaita.cpp: Build the Theme::singleton() factory also with USE(GTK4).
+        * platform/gtk/ThemeGtk.cpp: Conditionally build if !USE(GTK4).
+        (WebCore::ThemeGtk::ensurePlatformColors const): Add deprecation ignore guards.
+        * platform/gtk/ThemeGtk.h: Conditionally build if !USE(GTK4).
+
 2020-04-13  Simon Fraser  <[email protected]>
 
         [Async overflow] Get scroll-snap working with async overflow scrolling on macOS

Modified: trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp (260057 => 260058)


--- trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp	2020-04-14 03:05:21 UTC (rev 260057)
+++ trunk/Source/WebCore/platform/adwaita/ThemeAdwaita.cpp	2020-04-14 05:12:59 UTC (rev 260058)
@@ -59,7 +59,7 @@
 static const Color spinButtonBackgroundHoveredColor = makeRGBA(46, 52, 54, 50);
 static const Color spinButtonBackgroundPressedColor = makeRGBA(46, 52, 54, 70);
 
-#if !PLATFORM(GTK)
+#if !PLATFORM(GTK) || USE(GTK4)
 Theme& Theme::singleton()
 {
     static NeverDestroyed<ThemeAdwaita> theme;

Modified: trunk/Source/WebCore/platform/gtk/ThemeGtk.cpp (260057 => 260058)


--- trunk/Source/WebCore/platform/gtk/ThemeGtk.cpp	2020-04-14 03:05:21 UTC (rev 260057)
+++ trunk/Source/WebCore/platform/gtk/ThemeGtk.cpp	2020-04-14 05:12:59 UTC (rev 260058)
@@ -24,6 +24,9 @@
  */
 
 #include "config.h"
+
+#if !USE(GTK4)
+
 #include "ThemeGtk.h"
 
 #include "GRefPtrGtk.h"
@@ -44,6 +47,8 @@
     if (m_activeSelectionBackgroundColor.isValid())
         return;
 
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
     GRefPtr<GtkWidgetPath> entryPath = adoptGRef(gtk_widget_path_new());
     gtk_widget_path_append_type(entryPath.get(), G_TYPE_NONE);
     gtk_widget_path_iter_set_object_name(entryPath.get(), -1, "entry");
@@ -73,6 +78,8 @@
 
     gtk_style_context_get_color(selectionContext.get(), gtk_style_context_get_state(selectionContext.get()), &color);
     m_inactiveSelectionForegroundColor = color;
+
+    G_GNUC_END_IGNORE_DEPRECATIONS;
 }
 
 void ThemeGtk::platformColorsDidChange()
@@ -105,3 +112,5 @@
 }
 
 } // namespace WebCore
+
+#endif // !USE(GTK4)

Modified: trunk/Source/WebCore/platform/gtk/ThemeGtk.h (260057 => 260058)


--- trunk/Source/WebCore/platform/gtk/ThemeGtk.h	2020-04-14 03:05:21 UTC (rev 260057)
+++ trunk/Source/WebCore/platform/gtk/ThemeGtk.h	2020-04-14 05:12:59 UTC (rev 260058)
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#if !USE(GTK4)
+
 #include "Color.h"
 #include "ThemeAdwaita.h"
 
@@ -47,3 +49,5 @@
 };
 
 } // namespace WebCore
+
+#endif // !USE(GTK4)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to