Title: [250388] trunk/Source/WebKit
- Revision
- 250388
- Author
- [email protected]
- Date
- 2019-09-26 11:04:31 -0700 (Thu, 26 Sep 2019)
Log Message
[GTK] Fix logic of dark theme detection
https://bugs.webkit.org/show_bug.cgi?id=202276
- If GTK_THEME is set it has a higher priority to GtkSettings.
- GTK_THEME may be a -dark theme or :dark variant, handle both.
Reviewed by Michael Catanzaro.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::effectiveAppearanceIsDark const):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (250387 => 250388)
--- trunk/Source/WebKit/ChangeLog 2019-09-26 17:59:49 UTC (rev 250387)
+++ trunk/Source/WebKit/ChangeLog 2019-09-26 18:04:31 UTC (rev 250388)
@@ -1,3 +1,16 @@
+2019-09-26 Patrick Griffis <[email protected]>
+
+ [GTK] Fix logic of dark theme detection
+ https://bugs.webkit.org/show_bug.cgi?id=202276
+
+ - If GTK_THEME is set it has a higher priority to GtkSettings.
+ - GTK_THEME may be a -dark theme or :dark variant, handle both.
+
+ Reviewed by Michael Catanzaro.
+
+ * UIProcess/API/gtk/PageClientImpl.cpp:
+ (WebKit::PageClientImpl::effectiveAppearanceIsDark const):
+
2019-09-25 Alex Christensen <[email protected]>
Add replacement SPI on _WKWebsiteDataStoreConfiguration for enabling speculative cache validation and IPC-free server trust evaluation
Modified: trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp (250387 => 250388)
--- trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp 2019-09-26 17:59:49 UTC (rev 250387)
+++ trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp 2019-09-26 18:04:31 UTC (rev 250388)
@@ -561,14 +561,14 @@
if (preferDarkTheme)
return true;
+ if (auto* themeNameEnv = g_getenv("GTK_THEME"))
+ return g_str_has_suffix(themeNameEnv, "-dark") || g_str_has_suffix(themeNameEnv, ":dark");
+
GUniqueOutPtr<char> themeName;
g_object_get(settings, "gtk-theme-name", &themeName.outPtr(), nullptr);
if (g_str_has_suffix(themeName.get(), "-dark"))
return true;
- if (auto* themeNameEnv = g_getenv("GTK_THEME"))
- return g_str_has_suffix(themeNameEnv, ":dark");
-
return false;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes