Skip to content

Commit

Permalink
Unreviewed. Fix the build with GTK+ < 3.19.
Browse files Browse the repository at this point in the history
* platform/gtk/ScrollbarThemeGtk3.cpp:
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):
  • Loading branch information
carlosgcampos committed Feb 29, 2016
1 parent ca702ef commit 322d526
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,12 @@
2016-02-29 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed. Fix the build with GTK+ < 3.19.

* platform/gtk/ScrollbarThemeGtk3.cpp:
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):

2015-02-06 Zalan Bujtas <zalan@apple.com>

ASSERT repaintContainer->hasLayer() in WebCore::RenderObject::repaintUsingContainer
Expand Down
10 changes: 5 additions & 5 deletions Source/WebCore/platform/gtk/ScrollbarThemeGtk3.cpp
Expand Up @@ -115,12 +115,12 @@ void ScrollbarThemeGtk::updateThemeProperties()
updateScrollbarsFrameThickness();
}

#if GTK_CHECK_VERSION(3, 19, 2)
static const char* orientationStyleClass(ScrollbarOrientation orientation)
{
return orientation == VerticalScrollbar ? "vertical" : "horizontal";
}

#if !GTK_CHECK_VERSION(3, 19, 2)
#else
static void applyScrollbarStyleContextClasses(GtkStyleContext* context, ScrollbarOrientation orientation)
{
gtk_style_context_add_class(context, GTK_STYLE_CLASS_SCROLLBAR);
Expand Down Expand Up @@ -197,7 +197,7 @@ void ScrollbarThemeGtk::paintScrollbarBackground(GraphicsContext* context, Scrol
gtk_render_frame(styleContext.get(), context->platformContext()->cr(), scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());

#if !GTK_CHECK_VERSION(3, 19, 2)
gtk_style_context_restore(styleContext);
gtk_style_context_restore(styleContext.get());
#endif
}

Expand Down Expand Up @@ -242,7 +242,7 @@ void ScrollbarThemeGtk::paintThumb(GraphicsContext* context, ScrollbarThemeClien
orientation == VerticalScrollbar ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL);

#if !GTK_CHECK_VERSION(3, 19, 2)
gtk_style_context_restore(styleContext);
gtk_style_context_restore(styleContext.get());
#endif
}

Expand Down Expand Up @@ -312,7 +312,7 @@ void ScrollbarThemeGtk::paintButton(GraphicsContext* context, ScrollbarThemeClie
gtk_render_arrow(styleContext.get(), context->platformContext()->cr(), angle, arrowPoint.x(), arrowPoint.y(), arrowSize);

#if !GTK_CHECK_VERSION(3, 19, 2)
gtk_style_context_restore(styleContext);
gtk_style_context_restore(styleContext.get());
#endif
}

Expand Down

0 comments on commit 322d526

Please sign in to comment.