Unreviewed. Fix GTK+ build with GTK+ < 3.14.
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jan 2016 17:06:35 +0000 (17:06 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jan 2016 17:06:35 +0000 (17:06 +0000)
Flags GTK_ICON_LOOKUP_DIR_LTR and GTK_ICON_LOOKUP_DIR_RTL were
added in GTK+ 3.14.

* rendering/RenderThemeGtk.cpp:
(WebCore::loadThemedIcon):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeGtk.cpp

index 0d6d9d2..a9a1e8e 100644 (file)
@@ -1,5 +1,15 @@
 2016-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        Unreviewed. Fix GTK+ build with GTK+ < 3.14.
+
+        Flags GTK_ICON_LOOKUP_DIR_LTR and GTK_ICON_LOOKUP_DIR_RTL were
+        added in GTK+ 3.14.
+
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::loadThemedIcon):
+
+2016-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         Unreviewed. Fix GObject DOM bindings API break after r195264.
 
         Add webkit_dom_character_data_set_data to the list of functions
index 5256e1e..34c3f92 100644 (file)
@@ -376,10 +376,12 @@ static GRefPtr<GdkPixbuf> loadThemedIcon(GtkStyleContext* context, const char* i
     GRefPtr<GIcon> icon = adoptGRef(g_themed_icon_new(iconName));
     unsigned lookupFlags = GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_FORCE_SIZE | GTK_ICON_LOOKUP_FORCE_SVG;
     GtkTextDirection direction = gtk_style_context_get_direction(context);
+#if GTK_CHECK_VERSION(3, 14, 0)
     if (direction & GTK_TEXT_DIR_LTR)
         lookupFlags |= GTK_ICON_LOOKUP_DIR_LTR;
     else if (direction & GTK_TEXT_DIR_RTL)
         lookupFlags |= GTK_ICON_LOOKUP_DIR_RTL;
+#endif
     int width, height;
     gtk_icon_size_lookup(iconSize, &width, &height);
     GRefPtr<GtkIconInfo> iconInfo = adoptGRef(gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon.get(), std::min(width, height), static_cast<GtkIconLookupFlags>(lookupFlags)));