Title: [246732] trunk/Source/WebKit
- Revision
- 246732
- Author
- [email protected]
- Date
- 2019-06-24 07:34:47 -0700 (Mon, 24 Jun 2019)
Log Message
[GTK] Navigation gesture should use dark fallback bg color on dark themes
https://bugs.webkit.org/show_bug.cgi?id=199104
Patch by Alexander Mikhaylenko <[email protected]> on 2019-06-24
Reviewed by Michael Catanzaro.
Use theme_base_color instead of white background for swipe gesture fallback if no snapshot is found and
the page did not specify a color. This allows it to use dark colors for dark themes. If the color was
not found, still fall back to white.
* UIProcess/gtk/ViewGestureControllerGtk.cpp:
(WebKit::ViewGestureController::beginSwipeGesture):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (246731 => 246732)
--- trunk/Source/WebKit/ChangeLog 2019-06-24 11:33:30 UTC (rev 246731)
+++ trunk/Source/WebKit/ChangeLog 2019-06-24 14:34:47 UTC (rev 246732)
@@ -1,3 +1,17 @@
+2019-06-24 Alexander Mikhaylenko <[email protected]>
+
+ [GTK] Navigation gesture should use dark fallback bg color on dark themes
+ https://bugs.webkit.org/show_bug.cgi?id=199104
+
+ Reviewed by Michael Catanzaro.
+
+ Use theme_base_color instead of white background for swipe gesture fallback if no snapshot is found and
+ the page did not specify a color. This allows it to use dark colors for dark themes. If the color was
+ not found, still fall back to white.
+
+ * UIProcess/gtk/ViewGestureControllerGtk.cpp:
+ (WebKit::ViewGestureController::beginSwipeGesture):
+
2019-06-23 Dan Bernstein <[email protected]>
Platform font class gets needlessly initialized in the Networking process
Modified: trunk/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp (246731 => 246732)
--- trunk/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp 2019-06-24 11:33:30 UTC (rev 246731)
+++ trunk/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp 2019-06-24 14:34:47 UTC (rev 246732)
@@ -312,6 +312,13 @@
}
}
+ if (!m_currentSwipeSnapshotPattern) {
+ GdkRGBA color;
+ auto* context = gtk_widget_get_style_context(m_webPageProxy.viewWidget());
+ if (gtk_style_context_lookup_color(context, "theme_base_color", &color))
+ m_currentSwipeSnapshotPattern = adoptRef(cairo_pattern_create_rgba(color.red, color.green, color.blue, color.alpha));
+ }
+
if (!m_currentSwipeSnapshotPattern)
m_currentSwipeSnapshotPattern = adoptRef(cairo_pattern_create_rgb(1, 1, 1));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes