Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp (197247 => 197248)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp 2016-02-27 15:02:59 UTC (rev 197247)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp 2016-02-27 15:08:43 UTC (rev 197248)
@@ -139,12 +139,19 @@
GdkRGBA color;
GtkStyleContext* containerContext = getStyleContext(GTK_TYPE_CONTAINER);
- gtk_style_context_get_background_color(containerContext, GTK_STATE_FLAG_NORMAL, &color);
+ gtk_style_context_save(containerContext);
+
+ gtk_style_context_set_state(containerContext, GTK_STATE_FLAG_NORMAL);
+ gtk_style_context_get_background_color(containerContext, gtk_style_context_get_state(containerContext), &color);
m_panelColor = color;
- gtk_style_context_get_background_color(containerContext, GTK_STATE_FLAG_ACTIVE, &color);
+ gtk_style_context_set_state(containerContext, GTK_STATE_FLAG_ACTIVE);
+ gtk_style_context_get_background_color(containerContext, gtk_style_context_get_state(containerContext), &color);
m_sliderColor = color;
- gtk_style_context_get_background_color(containerContext, GTK_STATE_FLAG_SELECTED, &color);
+ gtk_style_context_set_state(containerContext, GTK_STATE_FLAG_SELECTED);
+ gtk_style_context_get_background_color(containerContext, gtk_style_context_get_state(containerContext), &color);
m_sliderThumbColor = color;
+
+ gtk_style_context_restore(containerContext);
}
#endif
@@ -346,7 +353,7 @@
if (interiorFocus) {
GtkBorder borderWidth;
- gtk_style_context_get_border(context, static_cast<GtkStateFlags>(flags), &borderWidth);
+ gtk_style_context_get_border(context, gtk_style_context_get_state(context), &borderWidth);
buttonRect = IntRect(buttonRect.x() + borderWidth.left + focusPad, buttonRect.y() + borderWidth.top + focusPad,
buttonRect.width() - (2 * focusPad + borderWidth.left + borderWidth.right),
@@ -395,7 +402,8 @@
gtk_style_context_add_class(context, GTK_STYLE_CLASS_BUTTON);
gtk_style_context_set_direction(context, static_cast<GtkTextDirection>(gtkTextDirection(style->direction())));
- gtk_style_context_get_border(context, static_cast<GtkStateFlags>(0), &border);
+ gtk_style_context_set_state(context, static_cast<GtkStateFlags>(0));
+ gtk_style_context_get_border(context, gtk_style_context_get_state(context), &border);
gboolean interiorFocus;
gint focusWidth, focusPad;
@@ -575,9 +583,9 @@
separatorWidth, innerRect.height());
} else {
GtkBorder padding;
- gtk_style_context_get_padding(separatorStyleContext, state, &padding);
+ gtk_style_context_get_padding(separatorStyleContext, gtk_style_context_get_state(separatorStyleContext), &padding);
GtkBorder border;
- gtk_style_context_get_border(separatorStyleContext, state, &border);
+ gtk_style_context_get_border(separatorStyleContext, gtk_style_context_get_state(separatorStyleContext), &border);
if (direction == GTK_TEXT_DIR_LTR)
separatorPosition.move(-(padding.left + border.left), 0);
@@ -751,9 +759,10 @@
gtk_style_context_save(context);
gtk_style_context_add_class(context, GTK_STYLE_CLASS_PROGRESSBAR);
+ gtk_style_context_set_state(context, static_cast<GtkStateFlags>(0));
GtkBorder padding;
- gtk_style_context_get_padding(context, static_cast<GtkStateFlags>(0), &padding);
+ gtk_style_context_get_padding(context, gtk_style_context_get_state(context), &padding);
IntRect progressRect(rect.x() + padding.left, rect.y() + padding.top,
rect.width() - (padding.left + padding.right),
rect.height() - (padding.top + padding.bottom));
@@ -775,7 +784,7 @@
static gint spinButtonArrowSize(GtkStyleContext* context)
{
PangoFontDescription* fontDescription;
- gtk_style_context_get(context, static_cast<GtkStateFlags>(0), "font", &fontDescription, NULL);
+ gtk_style_context_get(context, gtk_style_context_get_state(context), "font", &fontDescription, nullptr);
gint fontSize = pango_font_description_get_size(fontDescription);
gint arrowSize = std::max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
pango_font_description_free(fontDescription);
@@ -788,7 +797,7 @@
GtkStyleContext* context = getStyleContext(GTK_TYPE_SPIN_BUTTON);
GtkBorder padding;
- gtk_style_context_get_padding(context, static_cast<GtkStateFlags>(0), &padding);
+ gtk_style_context_get_padding(context, gtk_style_context_get_state(context), &padding);
int width = spinButtonArrowSize(context) + padding.left + padding.right;
style->setWidth(Length(width, Fixed));
@@ -947,9 +956,9 @@
GdkRGBA gdkRGBAColor;
if (colorType == StyleColorBackground)
- gtk_style_context_get_background_color(context, state, &gdkRGBAColor);
+ gtk_style_context_get_background_color(context, gtk_style_context_get_state(context), &gdkRGBAColor);
else
- gtk_style_context_get_color(context, state, &gdkRGBAColor);
+ gtk_style_context_get_color(context, gtk_style_context_get_state(context), &gdkRGBAColor);
return gdkRGBAColor;
}
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/ScrollbarThemeGtk3.cpp (197247 => 197248)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/ScrollbarThemeGtk3.cpp 2016-02-27 15:02:59 UTC (rev 197247)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/ScrollbarThemeGtk3.cpp 2016-02-27 15:08:43 UTC (rev 197248)
@@ -75,7 +75,8 @@
static void adjustRectAccordingToMargin(GtkStyleContext* context, GtkStateFlags state, IntRect& rect)
{
GtkBorder margin;
- gtk_style_context_get_margin(context, state, &margin);
+ gtk_style_context_set_state(context, state);
+ gtk_style_context_get_margin(context, gtk_style_context_get_state(context), &margin);
rect.move(margin.left, margin.right);
rect.contract(margin.left + margin.right, margin.top + margin.bottom);
}