Index: chrome/browser/ui/libgtkui/gtk_util.cc |
diff --git a/chrome/browser/ui/libgtkui/gtk_util.cc b/chrome/browser/ui/libgtkui/gtk_util.cc |
index 9463d533c50e19d1713d63b5152226d48638b88e..23808239b874d3c70d61ee4608c20d3f02f14ccc 100644 |
--- a/chrome/browser/ui/libgtkui/gtk_util.cc |
+++ b/chrome/browser/ui/libgtkui/gtk_util.cc |
@@ -492,24 +492,8 @@ SkColor GetBorderColor(const char* css_selector) { |
return surface.GetAveragePixelValue(true); |
} |
-ScopedStyleContext GetSelectedStyleContext(const char* css_selector) { |
+SkColor GetSelectionBgColor(const char* css_selector) { |
auto context = GetStyleContextFromCss(css_selector); |
- if (GtkVersionCheck(3, 20)) { |
- context = AppendCssNodeToStyleContext(context, "#selection"); |
- } else { |
- GtkStateFlags state = gtk_style_context_get_state(context); |
- state = static_cast<GtkStateFlags>(state | GTK_STATE_FLAG_SELECTED); |
- gtk_style_context_set_state(context, state); |
- } |
- return context; |
-} |
- |
-SkColor GetSelectedTextColor(const char* css_selector) { |
- return GetFgColorFromStyleContext(GetSelectedStyleContext(css_selector)); |
-} |
- |
-SkColor GetSelectedBgColor(const char* css_selector) { |
- auto context = GetSelectedStyleContext(css_selector); |
if (GtkVersionCheck(3, 20)) |
return GetBgColorFromStyleContext(context); |
// This is verbatim how Gtk gets the selection color on versions before 3.20. |