Bug 37851 - [GTK] Does not compile with -DGSEAL_ENABLE
: [GTK] Does not compile with -DGSEAL_ENABLE
Status: RESOLVED FIXED
: WebKit
WebKit Gtk
: 528+ (Nightly build)
: PC Linux
: P3 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-04-20 05:17 PST by
Modified: 2010-06-28 07:40 PST (History)


Attachments
Partial patch (28.29 KB, patch)
2010-04-21 08:03 PST, Andre Klapper
no flags Review Patch | Details | Formatted Diff | Diff
Partial patch (28.35 KB, patch)
2010-04-23 03:23 PST, Andre Klapper
no flags Review Patch | Details | Formatted Diff | Diff
Partial patch (28.34 KB, patch)
2010-04-23 03:37 PST, Andre Klapper
no flags Review Patch | Details | Formatted Diff | Diff
gseal.diff (23.55 KB, patch)
2010-06-14 12:39 PST, Xan Lopez
no flags Review Patch | Details | Formatted Diff | Diff
gseal.diff (25.07 KB, patch)
2010-06-15 11:47 PST, Xan Lopez
no flags Review Patch | Details | Formatted Diff | Diff
gseal2.diff (58.25 KB, patch)
2010-06-27 07:38 PST, Xan Lopez
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-04-20 05:17:52 PST
Version: webkit-1.2.0 (not available from dropdown)


WebKit-Gtk does not build with -DGSEAL_ENABLE.
Fixing this is required for GNOME 3. See http://live.gnome.org/GnomeGoals/UseGseal .

Note that maybe this report cannot be fixed yet, as GTK+ still misses some accessor functions (see http://bugzilla.gnome.org/show_bug.cgi?id=588339 , http://bugzilla.gnome.org/show_bug.cgi?id=597610 ) needed for sealing.
Also see http://live.gnome.org/GTK%2B/3.0/PendingSealings for current status.

The jhbuild output posted here of course only lists the very first error when trying to compile.

WebCore/plugins/gtk/gtk2xtbin.c: In function ‘gtk_xtbin_realize’:
WebCore/plugins/gtk/gtk2xtbin.c:293: error: ‘GtkWidget’ has no member named ‘allocation’
WebCore/plugins/gtk/gtk2xtbin.c:294: error: ‘GtkWidget’ has no member named ‘allocation’
WebCore/plugins/gtk/gtk2xtbin.c: In function ‘gtk_xtbin_set_position’:
WebCore/plugins/gtk/gtk2xtbin.c:405: warning: passing argument 1 of ‘gtk_widget_get_realized’ from incompatible pointer type
/home/andre/include/gtk-2.0/gtk/gtkwidget.h:963: note: expected ‘struct GtkWidget *’ but argument is of type ‘struct GtkXtBin *’
WebCore/plugins/gtk/gtk2xtbin.c:406: error: ‘GtkWidget’ has no member named ‘window’
WebCore/plugins/gtk/gtk2xtbin.c: In function ‘gtk_xtbin_unrealize’:
WebCore/plugins/gtk/gtk2xtbin.c:459: error: ‘GtkObject’ has no member named ‘flags’
WebCore/plugins/gtk/gtk2xtbin.c: In function ‘xt_add_focus_listener’:
WebCore/plugins/gtk/gtk2xtbin.c:886: warning: unused variable ‘errorcode’
WebCore/plugins/gtk/gtk2xtbin.c: In function ‘xt_remove_focus_listener’:
WebCore/plugins/gtk/gtk2xtbin.c:906: warning: unused variable ‘errorcode’
make[1]: *** [WebCore/plugins/gtk/libwebkit_1_0_la-gtk2xtbin.lo] Error 1
make[1]: Leaving directory `/home/andre/webkit-1.2.0'
make: *** [all] Error 2
*** Error during phase build of WebKit: ########## Error running make   *** [1/1]
------- Comment #1 From 2010-04-21 08:03:50 PST -------
Created an attachment (id=53958) [details]
Partial patch

Needs way more work in gtk2drawing.c.
Note that fixing this ticket is required for usage with GTK+ 3.0.
------- Comment #2 From 2010-04-22 07:48:08 PST -------
Attachment 53958 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
Last 3072 characters of output:
lugins/gtk/PluginViewGtk.cpp:668:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/PluginViewGtk.cpp:796:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/PluginViewGtk.cpp:797:  Declaration has space between type name and * in GdkWindow *window  [whitespace/declaration] [3]
WebCore/plugins/gtk/PluginViewGtk.cpp:829:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/PluginViewGtk.cpp:830:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/PluginViewGtk.cpp:856:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/PluginViewGtk.cpp:857:  Extra space before ( in function call  [whitespace/parens] [4]
WARNING: File exempt from style guide. Skipping: "WebCore/platform/gtk/gtk2drawing.c"
WebCore/platform/gtk/ScrollbarGtk.cpp:122:  Missing space after ,  [whitespace/comma] [3]
WebCore/platform/gtk/ScrollbarGtk.cpp:173:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/gtk2xtbin.c:273:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/gtk2xtbin.c:274:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:274:  widget_allocation is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebCore/plugins/gtk/gtk2xtbin.c:296:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/gtk2xtbin.c:297:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:297:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:298:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:299:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:414:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/gtk2xtbin.c:415:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:417:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:419:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/gtk2xtbin.c:420:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:476:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:476:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:477:  Missing space after ,  [whitespace/comma] [3]
WebCore/plugins/gtk/gtk2xtbin.c:480:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:480:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 50 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
------- Comment #3 From 2010-04-23 03:23:10 PST -------
Created an attachment (id=54143) [details]
Partial patch
------- Comment #4 From 2010-04-23 03:25:21 PST -------
Attachment 54143 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/gtk/PasteboardGtk.cpp:63:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/platform/gtk/PasteboardGtk.cpp:180:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/platform/gtk/WidgetGtk.cpp:88:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/platform/gtk/GtkPluginWidget.cpp:51:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/platform/gtk/ScrollViewGtk.cpp:180:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/PluginViewGtk.cpp:218:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/PluginViewGtk.cpp:356:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/PluginViewGtk.cpp:830:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/PluginViewGtk.cpp:857:  Extra space before ( in function call  [whitespace/parens] [4]
WARNING: File exempt from style guide. Skipping: "WebCore/platform/gtk/gtk2drawing.c"
WebCore/plugins/gtk/gtk2xtbin.c:274:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:274:  widget_allocation is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebCore/plugins/gtk/gtk2xtbin.c:297:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:297:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:298:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:299:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:415:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:417:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:420:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:476:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:476:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:480:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:480:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 22 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
------- Comment #5 From 2010-04-23 03:37:26 PST -------
Created an attachment (id=54144) [details]
Partial patch
------- Comment #6 From 2010-04-23 03:42:08 PST -------
Attachment 54144 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/gtk/WidgetGtk.cpp:88:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/platform/gtk/ScrollViewGtk.cpp:180:  Extra space before ( in function call  [whitespace/parens] [4]
WARNING: File exempt from style guide. Skipping: "WebCore/platform/gtk/gtk2drawing.c"
WebCore/plugins/gtk/gtk2xtbin.c:274:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:297:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:298:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:299:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:415:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:417:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:420:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:476:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:480:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:480:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 12 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
------- Comment #7 From 2010-05-03 06:20:06 PST -------
(From update of attachment 54144 [details])
Sorry for waiting so letting you wait so long. We want to avoid the #if GTK_CHECK_VERSION, what we do  is to add a macro in WebCore/platform/gtk/GtkVersioning.h and this way can use the new API on old systems. It would be nice if you could adjust your patch.
------- Comment #8 From 2010-05-03 06:58:49 PST -------
(In reply to comment #7)
> Sorry for waiting so letting you wait so long.

No problem at all.

> We want to avoid the #if
> GTK_CHECK_VERSION, what we do  is to add a macro in
> WebCore/platform/gtk/GtkVersioning.h and this way can use the new API on old
> systems. It would be nice if you could adjust your patch.

Quite busy currently here, sorry.
If somebody wants to go ahead, just do it. :)
------- Comment #9 From 2010-06-14 12:39:14 PST -------
Created an attachment (id=58689) [details]
gseal.diff

Gave a shot at this today, seems to work fine.
------- Comment #10 From 2010-06-14 15:19:49 PST -------
(From update of attachment 58689 [details])
Looks good to me, with the following comments:

WebKit/gtk/tests/testdomnode.c:164
 +      g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)) == FALSE);
oops =)

WebKit/gtk/webkit/webkitwebview.cpp:834
 +      gdk_window_set_user_data(gtk_widget_get_window(widget), widget);
Might be worth saving the call to get here by using a variable? Micro-optimization, but it doesn't get less readable.

WebKit/gtk/webkit/webkitwebview.cpp:845
 +      gtk_im_context_set_client_window(priv->imContext, gtk_widget_get_window(widget));
One more call saved! yay hehe
------- Comment #11 From 2010-06-15 11:47:27 PST -------
Created an attachment (id=58800) [details]
gseal.diff

Uploading the new patch to check that it builds in EWS.
------- Comment #12 From 2010-06-15 12:05:38 PST -------
Attachment 58800 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/plugins/gtk/gtk2xtbin.c:275:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:275:  widget_allocation is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebCore/plugins/gtk/gtk2xtbin.c:298:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:299:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:300:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
WebCore/plugins/gtk/gtk2xtbin.c:416:  Extra space before ( in function call  [whitespace/parens] [4]
WebCore/plugins/gtk/gtk2xtbin.c:469:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
------- Comment #13 From 2010-06-15 12:14:57 PST -------
(From update of attachment 58689 [details])
Pushed as r61206 with the requested changes.
------- Comment #14 From 2010-06-15 12:15:31 PST -------
Closing.
------- Comment #15 From 2010-06-16 00:25:08 PST -------
Thanks! By any chance, is a tarball release planned for the next days?
------- Comment #16 From 2010-06-16 01:53:36 PST -------
(In reply to comment #15)
> Thanks! By any chance, is a tarball release planned for the next days?

My plan is to make it parallel installable with GTK+3 and do a release before 2.31.4. As all plans, it could fail ;)
------- Comment #17 From 2010-06-27 07:38:28 PST -------
Created an attachment (id=59855) [details]
gseal2.diff

OK, turns out there was a bunch of stuff missing to fix here...

Unfortunately there are a few things we do in gtk2drawing.c which cannot be done in a sealed GTK+, so I've just left them out when compiling with GTK+3.x for now.
------- Comment #18 From 2010-06-27 07:38:56 PST -------
Reopening.
------- Comment #19 From 2010-06-28 05:23:50 PST -------
(From update of attachment 59855 [details])
Clear Main Comment Box:8
 +          Add automake flage to signal whether we are building with GTK+ 2.x
s/flage/flag/

OK! Thankfully adding a gtk_widget_{set,get}_has_focus should be simple!
------- Comment #20 From 2010-06-28 07:40:27 PST -------
(From update of attachment 59855 [details])
Landed as r62002.
------- Comment #21 From 2010-06-28 07:40:40 PST -------
All patches landed, closing.