Bug 36398

Summary: [GTK] Does not build with latest GTK+ development release
Product: WebKit Reporter: Gustavo Noronha (kov) <gustavo>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, webkit.review.bot, xan.lopez, zecke
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
fix building with newest GTK+
gustavo: commit-queue-
proposed fix
none
proposed fix none

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.