RESOLVED FIXED Bug 36398
[GTK] Does not build with latest GTK+ development release
https://bugs.webkit.org/show_bug.cgi?id=36398
Summary [GTK] Does not build with latest GTK+ development release
Gustavo Noronha (kov)
Reported 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.
Attachments
fix building with newest GTK+ (17.44 KB, patch)
2010-03-19 17:01 PDT, Gustavo Noronha (kov)
gustavo: commit-queue-
proposed fix (15.75 KB, patch)
2010-03-22 10:58 PDT, Gustavo Noronha (kov)
no flags
proposed fix (17.45 KB, patch)
2010-03-22 18:48 PDT, Gustavo Noronha (kov)
no flags
Gustavo Noronha (kov)
Comment 1 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.
WebKit Review Bot
Comment 2 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.
WebKit Review Bot
Comment 3 2010-03-19 17:07:52 PDT
Gustavo Noronha (kov)
Comment 4 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.
Gustavo Noronha (kov)
Comment 5 2010-03-22 10:59:48 PDT
*** Bug 36404 has been marked as a duplicate of this bug. ***
WebKit Review Bot
Comment 6 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.
WebKit Review Bot
Comment 7 2010-03-22 11:40:26 PDT
Gustavo Noronha (kov)
Comment 8 2010-03-22 18:48:58 PDT
Created attachment 51381 [details] proposed fix I suck. Forgot to add the file in my new tree.
WebKit Review Bot
Comment 9 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.
Holger Freyther
Comment 10 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 '!'?!
Gustavo Noronha (kov)
Comment 11 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
Gustavo Noronha (kov)
Comment 12 2010-03-23 06:24:59 PDT
Comment on attachment 51381 [details] proposed fix Landed as r56387.
Note You need to log in before you can comment on or make changes to this bug.