Bug 51885 - [GTK] Fix gtk2 compilation for master
Summary: [GTK] Fix gtk2 compilation for master
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-01-04 10:57 PST by Alejandro G. Castro
Modified: 2011-01-10 11:31 PST (History)
2 users (show)

See Also:


Attachments
Proposed patch (5.36 KB, patch)
2011-01-04 11:23 PST, Alejandro G. Castro
no flags Details | Formatted Diff | Diff
Proposed patch (5.43 KB, patch)
2011-01-05 10:23 PST, Alejandro G. Castro
xan.lopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2011-01-04 10:57:21 PST
Some functions have been deprecated and we need some cleaning, namely:

   - gdk_drawable_get_size
   - gtk_dialog_set_has_separator
Comment 1 Alejandro G. Castro 2011-01-04 11:23:09 PST
Created attachment 77912 [details]
Proposed patch
Comment 2 Xan Lopez 2011-01-04 11:41:45 PST
Comment on attachment 77912 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=77912&action=review

> Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:43
> +    gdk_pixmap_get_size(GDK_DRAWABLE(pixmap), &width, &height);

This is confusing, I think you should make the macro do nothing in newer versions. But then the code will be a mess to understand... ugh :/(the fact that it still compiles tells me the GTK+ guys dropped the ball by now).

> WebKit/gtk/webkit/webkitsoupauthdialog.c:230
> +    g_object_set(dialog, "has-separator", FALSE, NULL);

Let's just remove the separator? It's not like we have to have one or anything :)
Comment 3 Alejandro G. Castro 2011-01-05 04:37:38 PST
(In reply to comment #2)
> (From update of attachment 77912 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=77912&action=review
> 
> > Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:43
> > +    gdk_pixmap_get_size(GDK_DRAWABLE(pixmap), &width, &height);
> 
> This is confusing, I think you should make the macro do nothing in newer versions. But then the code will be a mess to understand... ugh :/(the fact that it still compiles tells me the GTK+ guys dropped the ball by now).
> 

Yep, I can add that or even try to remove the gtk2 code and use other way to get the size.

> > WebKit/gtk/webkit/webkitsoupauthdialog.c:230
> > +    g_object_set(dialog, "has-separator", FALSE, NULL);
> 
> Let's just remove the separator? It's not like we have to have one or anything :)

Actually we are removing it with the code, but yeah, I do not think anything depends on not having it.
Comment 4 Alejandro G. Castro 2011-01-05 10:22:43 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 77912 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=77912&action=review
> > 
> > > Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:43
> > > +    gdk_pixmap_get_size(GDK_DRAWABLE(pixmap), &width, &height);
> > 
> > This is confusing, I think you should make the macro do nothing in newer versions. But then the code will be a mess to understand... ugh :/(the fact that it still compiles tells me the GTK+ guys dropped the ball by now).
> > 
> 
> Yep, I can add that or even try to remove the gtk2 code and use other way to get the size.
> 

I've checked we do not need this, we did not even need GDK_DRAWABLE macro in the first place because:

...
typedef struct _GdkDrawable           GdkDrawable;
...
typedef struct _GdkDrawable           GdkPixmap;
...
Comment 5 Alejandro G. Castro 2011-01-05 10:23:40 PST
Created attachment 78014 [details]
Proposed patch
Comment 6 Xan Lopez 2011-01-10 10:36:06 PST
Comment on attachment 78014 [details]
Proposed patch

Looks good.
Comment 7 Alejandro G. Castro 2011-01-10 11:31:15 PST
Landed http://trac.webkit.org/changeset/75397