Skip to content
Permalink
Browse files
Unreviewed, rolling out r192727.
It made the selections transparent again and broke
/webkit2/WebKitWebView/snapshot

Reverted changeset:

"[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor,
et. al. should not clobber state of cached GtkStyleContexts"
https://bugs.webkit.org/show_bug.cgi?id=151533
http://trac.webkit.org/changeset/192727

Canonical link: https://commits.webkit.org/169693@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Nov 22, 2015
1 parent 58d5e6c commit e734cfa8106ff7b1d1bec01916e38fdaa24cb99f
Showing with 16 additions and 3 deletions.
  1. +14 −0 Source/WebCore/ChangeLog
  2. +2 −3 Source/WebCore/rendering/RenderThemeGtk.cpp
@@ -1,3 +1,17 @@
2015-11-22 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed, rolling out r192727.

It made the selections transparent again and broke
/webkit2/WebKitWebView/snapshot

Reverted changeset:

"[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor,
et. al. should not clobber state of cached GtkStyleContexts"
https://bugs.webkit.org/show_bug.cgi?id=151533
http://trac.webkit.org/changeset/192727

2015-11-22 Michael Catanzaro <mcatanzaro@igalia.com>

[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
@@ -1348,17 +1348,16 @@ enum StyleColorType { StyleColorBackground, StyleColorForeground };

static Color styleColor(GType widgetType, GtkStateFlags state, StyleColorType colorType)
{

GtkStyleContext* context = getStyleContext(widgetType);
gtk_style_context_save(context);
// Recent GTK+ versions (> 3.14) require to explicitly set the state before getting the color.
gtk_style_context_set_state(context, state);

GdkRGBA gdkRGBAColor;
if (colorType == StyleColorBackground)
gtk_style_context_get_background_color(context, gtk_style_context_get_state(context), &gdkRGBAColor);
else
gtk_style_context_get_color(context, gtk_style_context_get_state(context), &gdkRGBAColor);

gtk_style_context_restore(context);
return gdkRGBAColor;
}

0 comments on commit e734cfa

Please sign in to comment.