Bug 47090 - Don't use GtkObject
Summary: Don't use GtkObject
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 08:49 PDT by Carlos Garcia Campos
Modified: 2010-10-07 05:44 PDT (History)
3 users (show)

See Also:


Attachments
Do not use GtkObject (2.70 KB, patch)
2010-10-04 08:49 PDT, Carlos Garcia Campos
mrobinson: review-
Details | Formatted Diff | Diff
Updated patch to remove gtkobject (4.66 KB, patch)
2010-10-06 01:25 PDT, Carlos Garcia Campos
xan.lopez: review-
Details | Formatted Diff | Diff
Another update (4.54 KB, patch)
2010-10-07 03:49 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2010-10-04 08:49:24 PDT
Created attachment 69638 [details]
Do not use GtkObject

GtkObject has been removed in gtk3. It's only used in WebCore/plugins/gtk/gtk2xtbin.c, where we can just use GObjectClass->dispose to make the code compatible with gtk2, and WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp that calls gtk_adjustment_new() which returned a GtkObject in gtk2, but now returns a GtkAdjustment.
Comment 1 Martin Robinson 2010-10-04 12:35:59 PDT
Comment on attachment 69638 [details]
Do not use GtkObject

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

This change needs a ChangeLog. :) Check the WebKit contributing page for some handy shortcuts wrt to ChangeLogs: http://webkit.org/coding/contributing.html#changelogs

> WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp:550
> +#if GTK_CHECK_VERSION (2, 90, 8)
> +    GtkAdjustment* adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0);
> +#else
> +    GtkAdjustment* adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0));
> +#endif
> +    m_timeHScale = gtk_hscale_new(adjustment);
>      gtk_scale_set_draw_value(GTK_SCALE(m_timeHScale), FALSE);

I think in this case, the extra cast is worth getting preventing #ifdefs here.
Comment 2 Carlos Garcia Campos 2010-10-06 01:25:22 PDT
Created attachment 69898 [details]
Updated patch to remove gtkobject

Updated patch including ChangeLog entry and another use of gtkobject I missed in WebCoreSupport/EditorClientGtk.cpp
Comment 3 WebKit Review Bot 2010-10-06 01:26:26 PDT
Attachment 69898 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/plugins/gtk/gtk2xtbin.c:75:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:75:  gtk_xtbin_dispose is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebCore/plugins/gtk/gtk2xtbin.c:247:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:247:  Extra space between GObjectClass and *object_class  [whitespace/declaration] [3]
WebCore/plugins/gtk/gtk2xtbin.c:255:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:255:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:256:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:483:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:517:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Xan Lopez 2010-10-07 03:14:27 PDT
Comment on attachment 69898 [details]
Updated patch to remove gtkobject

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

Patch looks good otherwise.

> WebCore/ChangeLog:12
> +        No new tests. (OOPS!)

You need to remove this or the cq will fail to apply the patch. And need to regenerate the ChangeLog.
Comment 5 Carlos Garcia Campos 2010-10-07 03:49:04 PDT
Created attachment 70065 [details]
Another update

Fixes Changelog formatting issues
Comment 6 WebKit Review Bot 2010-10-07 03:51:13 PDT
Attachment 70065 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/plugins/gtk/gtk2xtbin.c:75:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:75:  gtk_xtbin_dispose is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebCore/plugins/gtk/gtk2xtbin.c:247:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:247:  Extra space between GObjectClass and *object_class  [whitespace/declaration] [3]
WebCore/plugins/gtk/gtk2xtbin.c:255:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:255:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:256:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:483:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:517:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 9 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Xan Lopez 2010-10-07 03:53:07 PDT
Comment on attachment 70065 [details]
Another update

r=me
Comment 8 WebKit Commit Bot 2010-10-07 05:44:13 PDT
Comment on attachment 70065 [details]
Another update

Clearing flags on attachment: 70065

Committed r69301: <http://trac.webkit.org/changeset/69301>
Comment 9 WebKit Commit Bot 2010-10-07 05:44:19 PDT
All reviewed patches have been landed.  Closing bug.