<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[69296] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/69296">69296</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2010-10-07 05:20:10 -0700 (Thu, 07 Oct 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>2010-10-07  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;

        Reviewed by Xan Lopez.

        [GTK] Fix the build for GTK+ 3
        https://bugs.webkit.org/show_bug.cgi?id=47249

        Use GdkVisual instead of GdkColormap. GdkColormap has been removed
        in gtk3.

        * plugins/gtk/PluginViewGtk.cpp:
        (WebCore::PluginView::platformStart):
        * plugins/gtk/gtk2xtbin.c:
        (gtk_xtbin_new):
2010-10-07  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;

        Reviewed by Xan Lopez.

        [GTK] Fix the build for GTK+ 3
        https://bugs.webkit.org/show_bug.cgi?id=47249

        Use GdkVisual instead of GdkColormap. GdkColormap has been removed
        in gtk3

        * webkit/webkitwebview.cpp:
        (webkit_web_view_realize):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorepluginsgtkPluginViewGtkcpp">trunk/WebCore/plugins/gtk/PluginViewGtk.cpp</a></li>
<li><a href="#trunkWebCorepluginsgtkgtk2xtbinc">trunk/WebCore/plugins/gtk/gtk2xtbin.c</a></li>
<li><a href="#trunkWebKitgtkChangeLog">trunk/WebKit/gtk/ChangeLog</a></li>
<li><a href="#trunkWebKitgtkwebkitwebkitwebviewcpp">trunk/WebKit/gtk/webkit/webkitwebview.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (69295 => 69296)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-10-07 12:03:38 UTC (rev 69295)
+++ trunk/WebCore/ChangeLog        2010-10-07 12:20:10 UTC (rev 69296)
</span><span class="lines">@@ -5,6 +5,21 @@
</span><span class="cx">         [GTK] Fix the build for GTK+ 3
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=47249
</span><span class="cx"> 
</span><ins>+        Use GdkVisual instead of GdkColormap. GdkColormap has been removed
+        in gtk3.
+
+        * plugins/gtk/PluginViewGtk.cpp:
+        (WebCore::PluginView::platformStart):
+        * plugins/gtk/gtk2xtbin.c:
+        (gtk_xtbin_new):
+
+2010-10-07  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Fix the build for GTK+ 3
+        https://bugs.webkit.org/show_bug.cgi?id=47249
+
</ins><span class="cx">         Do not use GdkDrawable deprecated API. Some methods of GdkDrawable
</span><span class="cx">         are deprecated in gtk2 and have been removed in gtk3. Equivalent
</span><span class="cx">         API has been added to GdkWindow.
</span></span></pre></div>
<a id="trunkWebCorepluginsgtkPluginViewGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/plugins/gtk/PluginViewGtk.cpp (69295 => 69296)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/plugins/gtk/PluginViewGtk.cpp        2010-10-07 12:03:38 UTC (rev 69295)
+++ trunk/WebCore/plugins/gtk/PluginViewGtk.cpp        2010-10-07 12:20:10 UTC (rev 69296)
</span><span class="lines">@@ -842,9 +842,9 @@
</span><span class="cx">             m_npWindow.window = (void*)gtk_socket_get_id(GTK_SOCKET(platformPluginWidget()));
</span><span class="cx">             GdkWindow* window = gtk_widget_get_window(widget);
</span><span class="cx">             ws-&gt;display = GDK_WINDOW_XDISPLAY(window);
</span><del>-            ws-&gt;visual = GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(GDK_DRAWABLE(window)));
-            ws-&gt;depth = gdk_visual_get_depth(gdk_drawable_get_visual(GDK_DRAWABLE(window)));
-            ws-&gt;colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(GDK_DRAWABLE(window)));
</del><ins>+            ws-&gt;visual = GDK_VISUAL_XVISUAL(gdk_window_get_visual(window));
+            ws-&gt;depth = gdk_visual_get_depth(gdk_window_get_visual(window));
+            ws-&gt;colormap = XCreateColormap(ws-&gt;display, GDK_ROOT_WINDOW(), ws-&gt;visual, AllocNone);
</ins><span class="cx">         } else {
</span><span class="cx">             m_npWindow.window = (void*)GTK_XTBIN(platformPluginWidget())-&gt;xtwindow;
</span><span class="cx">             ws-&gt;display = GTK_XTBIN(platformPluginWidget())-&gt;xtdisplay;
</span></span></pre></div>
<a id="trunkWebCorepluginsgtkgtk2xtbinc"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/plugins/gtk/gtk2xtbin.c (69295 => 69296)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/plugins/gtk/gtk2xtbin.c        2010-10-07 12:03:38 UTC (rev 69295)
+++ trunk/WebCore/plugins/gtk/gtk2xtbin.c        2010-10-07 12:20:10 UTC (rev 69296)
</span><span class="lines">@@ -326,8 +326,9 @@
</span><span class="cx"> {
</span><span class="cx">   GtkXtBin *xtbin;
</span><span class="cx">   gpointer user_data;
</span><ins>+  GdkScreen *screen;
</ins><span class="cx">   GdkVisual* visual;
</span><del>-  GdkColormap* colormap;
</del><ins>+  Colormap colormap;
</ins><span class="cx"> 
</span><span class="cx">   assert(parent_window != NULL);
</span><span class="cx">   xtbin = g_object_new (GTK_TYPE_XTBIN, NULL);
</span><span class="lines">@@ -341,12 +342,15 @@
</span><span class="cx">   /* Initialize the Xt toolkit */
</span><span class="cx">   xtbin-&gt;parent_window = parent_window;
</span><span class="cx"> 
</span><del>-  visual = gtk_widget_get_default_visual();
-  colormap = gtk_widget_get_default_colormap();
</del><ins>+  screen = gtk_widget_get_screen(GTK_WIDGET(parent_window));
+  visual = gdk_screen_get_system_visual(screen);
+  colormap = XCreateColormap(GDK_DISPLAY_XDISPLAY(gdk_screen_get_display(screen)),
+                             GDK_WINDOW_XWINDOW(gdk_screen_get_root_window(screen)),
+                             GDK_VISUAL_XVISUAL(visual), AllocNone);
</ins><span class="cx"> 
</span><span class="cx">   xt_client_init(&amp;(xtbin-&gt;xtclient), 
</span><span class="cx">                  GDK_VISUAL_XVISUAL(visual),
</span><del>-                 GDK_COLORMAP_XCOLORMAP(colormap),
</del><ins>+                 colormap,
</ins><span class="cx">                  gdk_visual_get_depth(visual));
</span><span class="cx"> 
</span><span class="cx">   if (!xtbin-&gt;xtclient.xtdisplay) {
</span></span></pre></div>
<a id="trunkWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/ChangeLog (69295 => 69296)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/ChangeLog        2010-10-07 12:03:38 UTC (rev 69295)
+++ trunk/WebKit/gtk/ChangeLog        2010-10-07 12:20:10 UTC (rev 69296)
</span><span class="lines">@@ -5,6 +5,19 @@
</span><span class="cx">         [GTK] Fix the build for GTK+ 3
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=47249
</span><span class="cx"> 
</span><ins>+        Use GdkVisual instead of GdkColormap. GdkColormap has been removed
+        in gtk3
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_realize):
+
+2010-10-07  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Fix the build for GTK+ 3
+        https://bugs.webkit.org/show_bug.cgi?id=47249
+
</ins><span class="cx">         Do not use GdkDrawable deprecated API. Some methods of GdkDrawable
</span><span class="cx">         are deprecated in gtk2 and have been removed in gtk3. Equivalent
</span><span class="cx">         API has been added to GdkWindow.
</span></span></pre></div>
<a id="trunkWebKitgtkwebkitwebkitwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/gtk/webkit/webkitwebview.cpp (69295 => 69296)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/gtk/webkit/webkitwebview.cpp        2010-10-07 12:03:38 UTC (rev 69295)
+++ trunk/WebKit/gtk/webkit/webkitwebview.cpp        2010-10-07 12:20:10 UTC (rev 69296)
</span><span class="lines">@@ -848,7 +848,9 @@
</span><span class="cx">     attributes.height = allocation.height;
</span><span class="cx">     attributes.wclass = GDK_INPUT_OUTPUT;
</span><span class="cx">     attributes.visual = gtk_widget_get_visual(widget);
</span><ins>+#ifdef GTK_API_VERSION_2
</ins><span class="cx">     attributes.colormap = gtk_widget_get_colormap(widget);
</span><ins>+#endif
</ins><span class="cx">     attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK
</span><span class="cx">                             | GDK_EXPOSURE_MASK
</span><span class="cx">                             | GDK_BUTTON_PRESS_MASK
</span><span class="lines">@@ -861,7 +863,10 @@
</span><span class="cx">                             | GDK_BUTTON2_MOTION_MASK
</span><span class="cx">                             | GDK_BUTTON3_MOTION_MASK;
</span><span class="cx"> 
</span><del>-    gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
</del><ins>+    gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+#ifdef GTK_API_VERSION_2
+    attributes_mask |= GDK_WA_COLORMAP;
+#endif
</ins><span class="cx">     GdkWindow* window = gdk_window_new(gtk_widget_get_parent_window(widget), &amp;attributes, attributes_mask);
</span><span class="cx">     gtk_widget_set_window(widget, window);
</span><span class="cx">     gdk_window_set_user_data(window, widget);
</span></span></pre>
</div>
</div>

</body>
</html>