Bug 36398 - [GTK] Does not build with latest GTK+ development release
Summary: [GTK] Does not build with latest GTK+ development release
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
: 36404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-19 16:37 PDT by Gustavo Noronha (kov)
Modified: 2010-03-23 06:25 PDT (History)
4 users (show)

See Also:


Attachments
fix building with newest GTK+ (17.44 KB, patch)
2010-03-19 17:01 PDT, Gustavo Noronha (kov)
gns: commit-queue-
Details | Formatted Diff | Diff
proposed fix (15.75 KB, patch)
2010-03-22 10:58 PDT, Gustavo Noronha (kov)
no flags Details | Formatted Diff | Diff
proposed fix (17.45 KB, patch)
2010-03-22 18:48 PDT, Gustavo Noronha (kov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2010-03-19 16:37:06 PDT
Latest development release deprecates a number of macros we use, such as GTK_WIDGET_REALIZED, and GTK_WIDGET_NO_WINDOW. We should have a nice way of handling this without causing too much churn.
Comment 1 Gustavo Noronha (kov) 2010-03-19 17:01:45 PDT
Created attachment 51206 [details]
fix building with newest GTK+

Since deprecation is a growing trend in GTK+, for the 3.0 release, I thought we needed a more centralized, and nice solution, instead of adding churn everywhere. This is my proposed solution.
Comment 2 WebKit Review Bot 2010-03-19 17:03:28 PDT
Attachment 51206 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/plugins/gtk/gtk2xtbin.c:45:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebCore/plugins/gtk/gtk2xtbin.c:405:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:460:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:460:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 WebKit Review Bot 2010-03-19 17:07:52 PDT
Attachment 51206 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/1051019
Comment 4 Gustavo Noronha (kov) 2010-03-22 10:58:58 PDT
Created attachment 51310 [details]
proposed fix

This one actually builds with earlier GTK+ versions, and fixes the logical bug with using gtk_widget_has_window() pointed out by Holger.
Comment 5 Gustavo Noronha (kov) 2010-03-22 10:59:48 PDT
*** Bug 36404 has been marked as a duplicate of this bug. ***
Comment 6 WebKit Review Bot 2010-03-22 11:03:35 PDT
Attachment 51310 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/plugins/gtk/gtk2xtbin.c:45:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebCore/plugins/gtk/gtk2xtbin.c:405:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:460:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:460:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Review Bot 2010-03-22 11:40:26 PDT
Attachment 51310 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/1051108
Comment 8 Gustavo Noronha (kov) 2010-03-22 18:48:58 PDT
Created attachment 51381 [details]
proposed fix

I suck. Forgot to add the file in my new tree.
Comment 9 WebKit Review Bot 2010-03-22 18:51:26 PDT
Attachment 51381 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/plugins/gtk/gtk2xtbin.c:45:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebCore/plugins/gtk/gtk2xtbin.c:405:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:460:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:460:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 4 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Holger Freyther 2010-03-23 01:35:05 PDT
Comment on attachment 51381 [details]
proposed fix

Mostly fine, we will just ignore the style warning as we want to keep the mozilla code mergable.


> -    /* only paint widgets with NO_WINDOW this way */
> -    if (!GTK_WIDGET_NO_WINDOW(platformWidget()))
> +    /* only paint widgets with no window this way */
> +    if (!!gtk_widget_get_has_window(platformWidget()))
>          return;

You can just remove the '!'?!
Comment 11 Gustavo Noronha (kov) 2010-03-23 05:35:30 PDT
(In reply to comment #10)
> (From update of attachment 51381 [details])
> Mostly fine, we will just ignore the style warning as we want to keep the
> mozilla code mergable.
> 
> 
> > -    /* only paint widgets with NO_WINDOW this way */
> > -    if (!GTK_WIDGET_NO_WINDOW(platformWidget()))
> > +    /* only paint widgets with no window this way */
> > +    if (!!gtk_widget_get_has_window(platformWidget()))
> >          return;
> 
> You can just remove the '!'?!

Search and replace fail =D
Comment 12 Gustavo Noronha (kov) 2010-03-23 06:24:59 PDT
Comment on attachment 51381 [details]
proposed fix

Landed as r56387.