WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
33486
Upgrade 1.1.17->1.1.18 fails: GTK_WIDGET_TOPLEVEL' was not declared in this scope
https://bugs.webkit.org/show_bug.cgi?id=33486
Summary
Upgrade 1.1.17->1.1.18 fails: GTK_WIDGET_TOPLEVEL' was not declared in this ...
David Ronis
Reported
2010-01-11 12:39:54 PST
I'm trying to upgrade as mentioned in the summary. The build fails with errors like: GTK_WIDGET_TOPLEVEL' was not declared in this scope WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp: In member function 'virtual void WebKit::ChromeClient::unfocus()': WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:109: error: 'GTK_WIDGET_TOPLEVEL' was not declared in this scope I'm running with gtk+-2.19.3 (1.1.17 was built against 2.19.2).
Attachments
Fix deprecated symbols to allow webkitgtk+ 1.1.18 to compile against gtk+-2.19.3.
(5.76 KB, patch)
2010-01-12 13:33 PST
,
David Ronis
xan.lopez
: review-
Details
Formatted Diff
Diff
Proposed patch
(7.83 KB, patch)
2010-01-15 02:47 PST
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Proposed patch
(8.05 KB, patch)
2010-01-15 02:54 PST
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
David Ronis
Comment 1
2010-01-11 12:46:43 PST
The problem is gtk+ related. I tried rebuilding 1.1.17. It now fails with similar errors as well as some triggered by GTK_WIDGET_CAN_FOCUS no longer being defined. So, I'm now in a state where I can't upgrade or downgrade. HELP!
David Ronis
Comment 2
2010-01-12 13:33:28 PST
Created
attachment 46397
[details]
Fix deprecated symbols to allow webkitgtk+ 1.1.18 to compile against gtk+-2.19.3. It turns out there were only a few places that the deprecated symbols triggered a compile error. The patch fixes there. Note that one of the changes required me to cast as: - return GTK_WIDGET_CAN_FOCUS(m_webView); + return gtk_widget_get_can_focus((GtkWidget*)m_webView); It compiles but I'm not sure it's right.
Xan Lopez
Comment 3
2010-01-14 05:04:07 PST
Comment on
attachment 46397
[details]
Fix deprecated symbols to allow webkitgtk+ 1.1.18 to compile against gtk+-2.19.3. I'm going to comment about some particular issues in your code, but the overall patch is wrong. You need to check the GTK+ version with GTK_CHECK_VERSION, and only use your code if we are using 2.19.3 or newer. If you grep for that macro you'll see examples of its usage. If you don't do this WebKitGTK+ wouldn't compile with older GTK+ versions, and we don't want that.
>@@ -45,6 +45,7 @@ > #include <glib.h> > #include <glib/gi18n-lib.h> > #include <gtk/gtk.h> >+#include <gtk/gtkwidget.h>
This is wrong, only the toplevel header should be included (I'm surprised this works at all, I think GTK+ should complain).
> bool ChromeClient::canTakeFocus(FocusDirection) > { >- return GTK_WIDGET_CAN_FOCUS(m_webView); >+ return gtk_widget_get_can_focus((GtkWidget*)m_webView);
You can use GTK_WIDGET here, since it's safer and C-style casts are against the style guidelines.
David Ronis
Comment 4
2010-01-14 08:52:24 PST
Hi xan, I suspect you're right about the include. I'd included it explicitly in the hope that I could simply modify the build to support deprecated symbols. I wasn't able to figure that out and had forgotten to remove the include; you'll notice that the other patched files don't have the include. As to protecting the patch's against GTK+ version and using GTK_WIDGET both suggestions make sense; however, I'm neither a webkit or GTK developer and would prefer someone who knows those codes make the change.
Alejandro G. Castro
Comment 5
2010-01-15 02:47:27 PST
Created
attachment 46662
[details]
Proposed patch Based on David patch.
Alejandro G. Castro
Comment 6
2010-01-15 02:54:29 PST
Created
attachment 46663
[details]
Proposed patch Changelog not saved :)
Xan Lopez
Comment 7
2010-01-15 13:16:52 PST
Comment on
attachment 46663
[details]
Proposed patch r=me
WebKit Commit Bot
Comment 8
2010-01-15 17:13:20 PST
Comment on
attachment 46663
[details]
Proposed patch Clearing flags on attachment: 46663 Committed
r53351
: <
http://trac.webkit.org/changeset/53351
>
WebKit Commit Bot
Comment 9
2010-01-15 17:13:24 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug