Bug 94313 - [GTK] Enable introspection for webkit2
Summary: [GTK] Enable introspection for webkit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-17 01:53 PDT by Jesse van den Kieboom
Modified: 2012-10-31 12:29 PDT (History)
4 users (show)

See Also:


Attachments
Enable webkit2 introspection (5.05 KB, patch)
2012-08-17 01:53 PDT, Jesse van den Kieboom
cgarcia: review-
Details | Formatted Diff | Diff
Enable webkit2 introspection (6.03 KB, patch)
2012-10-30 11:22 PDT, Jesse van den Kieboom
no flags Details | Formatted Diff | Diff
Enable webkit2 introspection (6.83 KB, patch)
2012-10-31 06:33 PDT, Jesse van den Kieboom
no flags Details | Formatted Diff | Diff
Enable webkit2 introspection (6.84 KB, patch)
2012-10-31 07:15 PDT, Jesse van den Kieboom
no flags Details | Formatted Diff | Diff
Enable webkit2 introspection (7.02 KB, patch)
2012-10-31 10:16 PDT, Jesse van den Kieboom
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse van den Kieboom 2012-08-17 01:53:17 PDT
Created attachment 159047 [details]
Enable webkit2 introspection

The attached patch enables introspection for webkit2. It's not completely finished since I was not entirely sure how to reference JSCore. Also, I wasn't entirely sure about reusing some of the autotools variables (so I suffixed most with 2).
Comment 1 Jesse van den Kieboom 2012-10-30 02:29:04 PDT
Ping! Would be cool if this could be merged since we are starting to use webkit2 with the new gitg and we depend on this.
Comment 2 Carlos Garcia Campos 2012-10-30 02:36:00 PDT
Comment on attachment 159047 [details]
Enable webkit2 introspection

View in context: https://bugs.webkit.org/attachment.cgi?id=159047&action=review

Thanks for the patch, and sorry for the late review. Patches in WebKit require a ChangeLog entry, and you should set the review flag to ? to ask for a review. See http://www.webkit.org/coding/contributing.html

> Source/WebKit2/GNUmakefile.am:211
> +	     --include=Gtk-@GTK_API_VERSION@ \

WebKit2 depends unconditionally on GTK 3, so we don't need to use the GTK_API_VERSION
Comment 3 Jesse van den Kieboom 2012-10-30 11:22:54 PDT
Created attachment 171488 [details]
Enable webkit2 introspection

Patch with changelog entry
Comment 4 Martin Robinson 2012-10-30 11:29:20 PDT
Comment on attachment 171488 [details]
Enable webkit2 introspection

View in context: https://bugs.webkit.org/attachment.cgi?id=171488&action=review

> Source/WebKit2/GNUmakefile.am:251
> +%.typelib: %.gir $(G_IR_COMPILER)
> +	$(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit2) --includedir $(top_builddir) $< -o $@

How does this not conflict with the similar rule for WebKit1?
Comment 5 Jesse van den Kieboom 2012-10-30 12:02:48 PDT
Hmm, I forgot that webkit uses non-recursive make (I guess?). So, I can make specific rules for WebKit2-@WEBKITGTK_API_VERSION@.typelib: WebKit2-@WEBKITGTK_API_VERSION@.gir and maybe then also make the webkit one rule specific?
Comment 6 Martin Robinson 2012-10-30 12:05:18 PDT
(In reply to comment #5)
> Hmm, I forgot that webkit uses non-recursive make (I guess?). So, I can make specific rules for WebKit2-@WEBKITGTK_API_VERSION@.typelib: WebKit2-@WEBKITGTK_API_VERSION@.gir and maybe then also make the webkit one rule specific?

That might be safer. I can't say for sure if there's a problem or not, but it's probably better to be more specific.
Comment 7 Martin Robinson 2012-10-30 12:05:43 PDT
Comment on attachment 171488 [details]
Enable webkit2 introspection

View in context: https://bugs.webkit.org/attachment.cgi?id=171488&action=review

> Source/WebKit2/GNUmakefile.am:208
> +WEBKIT2_GIRSOURCES = WebKit2-@WEBKITGTK_API_VERSION@.gir

Instead of using a variable here, I think it might be clearer, just to use the string everywhere.
Comment 8 Jesse van den Kieboom 2012-10-31 06:33:54 PDT
Created attachment 171637 [details]
Enable webkit2 introspection

Separate webkit and webkit2 typelib generation
Comment 9 WebKit Review Bot 2012-10-31 07:08:08 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 10 Jesse van den Kieboom 2012-10-31 07:15:54 PDT
Created attachment 171650 [details]
Enable webkit2 introspection

Sorry, missed your comment there. New patch
Comment 11 Martin Robinson 2012-10-31 09:34:13 PDT
Comment on attachment 171650 [details]
Enable webkit2 introspection

View in context: https://bugs.webkit.org/attachment.cgi?id=171650&action=review

> Source/WebKit/gtk/GNUmakefile.am:332
> +WebKit-@WEBKITGTK_API_VERSION@.typelib: WebKit-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER)

I apologize for the back and forth, but doesn't this pose an issue for JSCore-@WEBKITGTK_API_VERSION@.typelib?
Comment 12 Jesse van den Kieboom 2012-10-31 10:16:07 PDT
Created attachment 171680 [details]
Enable webkit2 introspection

Ah yes, of course. Sorry for that. I added back a special rule also for JSCore. Related to that, I didn't really know what to do with JSCore for WebKit2. In any case it doesn't seem like the JSCore gir does any good wrt introspection.
Comment 13 Martin Robinson 2012-10-31 10:47:12 PDT
Comment on attachment 171680 [details]
Enable webkit2 introspection

Thanks!
Comment 14 WebKit Review Bot 2012-10-31 12:29:39 PDT
Comment on attachment 171680 [details]
Enable webkit2 introspection

Clearing flags on attachment: 171680

Committed r133059: <http://trac.webkit.org/changeset/133059>
Comment 15 WebKit Review Bot 2012-10-31 12:29:43 PDT
All reviewed patches have been landed.  Closing bug.