[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c

xan at webkit.org xan at webkit.org
Mon Dec 27 16:30:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1748b6ef2d1ec1a9e2e3bc994f4a2315712c3821
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 22 20:53:56 2010 +0000

    2010-12-22  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            [GTK] Compilation fixes with GTK+ 2.91.7
            https://bugs.webkit.org/show_bug.cgi?id=51487
    
            * configure.ac: depend on GTK+ 2.91.7 when using GTK+ 3.x.
    
    WebCore:
    
    2010-12-22  Xan Lopez  <xlopez at igalia.com>
    
            Reviewed by Gustavo Noronha.
    
            [GTK] Compilation fixes with GTK+ 2.91.7
            https://bugs.webkit.org/show_bug.cgi?id=51487
    
            * platform/gtk/GtkVersioning.h: do not define GDK_DISPLAY for
            backwards compatibility, it's now defined again in GTK+ 3.x.
            * platform/gtk/PasteboardHelper.cpp: do not call GDK functions to
            initialize global static variables (!). These are called when the
            .so is loaded, and they now require GType to be initialized and
            will crash. Initialize them once from the ctor, which is a more
            common pattern anyway.
            (WebCore::initGdkAtoms): new method to initialize static variables.
            (WebCore::PasteboardHelper::PasteboardHelper): call it.
            * plugins/gtk/PluginViewGtk.cpp: do not include gdkconfig.h when
            using GTK+ 3.x, since it's no longer installed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/ChangeLog b/ChangeLog
index 0daa39c..9f90b0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-22  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Compilation fixes with GTK+ 2.91.7
+        https://bugs.webkit.org/show_bug.cgi?id=51487
+
+        * configure.ac: depend on GTK+ 2.91.7 when using GTK+ 3.x.
+
 2010-12-22  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 37e2e3b..24e2221 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-12-22  Xan Lopez  <xlopez at igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Compilation fixes with GTK+ 2.91.7
+        https://bugs.webkit.org/show_bug.cgi?id=51487
+
+        * platform/gtk/GtkVersioning.h: do not define GDK_DISPLAY for
+        backwards compatibility, it's now defined again in GTK+ 3.x.
+        * platform/gtk/PasteboardHelper.cpp: do not call GDK functions to
+        initialize global static variables (!). These are called when the
+        .so is loaded, and they now require GType to be initialized and
+        will crash. Initialize them once from the ctor, which is a more
+        common pattern anyway.
+        (WebCore::initGdkAtoms): new method to initialize static variables.
+        (WebCore::PasteboardHelper::PasteboardHelper): call it.
+        * plugins/gtk/PluginViewGtk.cpp: do not include gdkconfig.h when
+        using GTK+ 3.x, since it's no longer installed.
+
 2010-12-22  Dirk Schulze  <krit at wbekit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/platform/gtk/GtkVersioning.h b/WebCore/platform/gtk/GtkVersioning.h
index 9c38aba..11d1f8a 100644
--- a/WebCore/platform/gtk/GtkVersioning.h
+++ b/WebCore/platform/gtk/GtkVersioning.h
@@ -31,7 +31,6 @@ G_BEGIN_DECLS
 
 // Macros to avoid deprecation checking churn
 #ifndef GTK_API_VERSION_2
-#define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
 #define GDK_WINDOW_XWINDOW(window) (gdk_x11_window_get_xid(window))
 #else
 GdkPixbuf* gdk_pixbuf_get_from_surface(cairo_surface_t* surface, int srcX, int srcY,
diff --git a/WebCore/platform/gtk/PasteboardHelper.cpp b/WebCore/platform/gtk/PasteboardHelper.cpp
index 228d5e9..4428be0 100644
--- a/WebCore/platform/gtk/PasteboardHelper.cpp
+++ b/WebCore/platform/gtk/PasteboardHelper.cpp
@@ -34,11 +34,11 @@
 
 namespace WebCore {
 
-static GdkAtom textPlainAtom = gdk_atom_intern("text/plain;charset=utf-8", FALSE);
-static GdkAtom markupAtom = gdk_atom_intern("text/html", FALSE);
-static GdkAtom netscapeURLAtom = gdk_atom_intern("_NETSCAPE_URL", FALSE);
-static GdkAtom uriListAtom = gdk_atom_intern("text/uri-list", FALSE);
-static String gMarkupPrefix = "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
+static GdkAtom textPlainAtom;
+static GdkAtom markupAtom;
+static GdkAtom netscapeURLAtom;
+static GdkAtom uriListAtom;
+static String gMarkupPrefix;
 
 static void removeMarkupPrefix(String& markup)
 {
@@ -49,9 +49,26 @@ static void removeMarkupPrefix(String& markup)
         markup.remove(0, gMarkupPrefix.length());
 }
 
+static void initGdkAtoms()
+{
+    static gboolean initialized = FALSE;
+
+    if (initialized)
+        return;
+
+    initialized = TRUE;
+
+    textPlainAtom = gdk_atom_intern("text/plain;charset=utf-8", FALSE);
+    markupAtom = gdk_atom_intern("text/html", FALSE);
+    netscapeURLAtom = gdk_atom_intern("_NETSCAPE_URL", FALSE);
+    uriListAtom = gdk_atom_intern("text/uri-list", FALSE);
+    gMarkupPrefix = "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
+}
+
 PasteboardHelper::PasteboardHelper()
     : m_targetList(gtk_target_list_new(0, 0))
 {
+    initGdkAtoms();
 }
 
 PasteboardHelper::~PasteboardHelper()
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 925ab79..ec855a2 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -62,7 +62,9 @@
 #include <runtime/JSLock.h>
 #include <runtime/JSValue.h>
 
+#ifdef GTK_API_VERSION_2
 #include <gdkconfig.h>
+#endif
 #include <gtk/gtk.h>
 
 #if defined(XP_UNIX)
diff --git a/configure.ac b/configure.ac
index a00b296..81d0b67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,7 +199,7 @@ case "$with_gtk" in
           GAIL_PC_NAME=gail
           GAIL_REQUIRED_VERSION=1.8
           ;;
-     3.0) GTK_REQUIRED_VERSION=2.91
+     3.0) GTK_REQUIRED_VERSION=2.91.7
           GTK_API_VERSION=3.0
           WEBKITGTK_API_MAJOR_VERSION=3
           WEBKITGTK_API_MINOR_VERSION=0

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list