Bug 27430

Summary: adds glib / gobject bindings to webkit gtk port
Product: WebKit Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: a9016009, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 27426, 27427, 27428, 27429    
Bug Blocks: 16401, 28109, 28110, 28111    
Attachments:
Description Flags
adds use of glib / gobject bindings to webkitwebframe
eric: review-
adds use of gobject bindings to webkit gtk port - PLEASE OBSERVE DEPENDENCIES
none
uploaded eric: review-

Description Luke Kenneth Casson Leighton 2009-07-19 14:47:54 PDT
this is part of the series of patches to split #16401 under
an agreement suggested by david.

this patch adds support for glib / gobject bindings to the webkit gtk port.  it may come as a surprise to some that glib / gobject has no dependency on gtk whatsoever, and so consequently neither do the glib / gobject bindings.  the implications are that with a little careful thought, glib / gobject bindings could be added to the qt and to all other ports - including windows, cocoa and wxWidgets.

design discussions are buried somewhere around the comment c50 to c70 mark in #16401.
Comment 1 Luke Kenneth Casson Leighton 2009-07-19 15:01:25 PDT
Created attachment 33059 [details]
adds use of glib / gobject bindings to webkitwebframe

this patch should be one of those that is applied almost aaabsolutely at the end, once its dependent patches are landed.  the modifications to webkitmarshal.list are also included here: somewhere along the line, in compiling the glib / gobject bindings (most likely the signals) this extra jobbie is needed.

the functions add in the essential "hooks" in order to actually get at the glib / gobjects available through the bindings.  it would be very nice if there were less of them - but there are not.

missing from the list of functions here is things like webkit_web_frame_create_text_document() and other such functions.

also - it's worth noting that now that GdomFrame exists, much of the functionality provided in webkitwebframe.cpp is duplicated, and can be seen to have been necessarily hard-coded!  the auto-generated functions of GdomFrame now make that code redundant, and, with careful thought, it should be possible to drop most of webkitwebframe.cpp.

one for the future.
Comment 2 Eric Seidel (no email) 2009-07-31 20:05:47 PDT
Comment on attachment 33059 [details]
adds use of glib / gobject bindings to webkitwebframe

WebCore avoids using superfluous argument names in headers:
 91     gpointer toGDOM(DOMWindow* doc);
 92     gpointer toGDOM(Document* doc);
 93     gpointer toGDOM(XMLHttpRequest* obj);

We don't commit commented out code:
 407     //WebKitWebFramePrivate* priv = frame->priv;

Name:
 2536 2008-11-30  lkcl  <lkcl@lkcl.net>

Otherwise looks fine.  I mean, I'm not really a gtk expert.  There are style violations, but I assume this stuff is more supposed to be more gtk style than webkit style, not sure.

r- for the above nits.  If you were a committer I could just r+ it and let you fix it as you landed.
Comment 3 Luke Kenneth Casson Leighton 2009-08-03 01:50:09 PDT
(In reply to comment #2)
> (From update of attachment 33059 [details])
> WebCore avoids using superfluous argument names in headers:
>  91     gpointer toGDOM(DOMWindow* doc);
>  92     gpointer toGDOM(Document* doc);
>  93     gpointer toGDOM(XMLHttpRequest* obj);

 oh?  ah.  didn't know that. hmmm, i might have a few of those.. hmmm...

> We don't commit commented out code:
>  407     //WebKitWebFramePrivate* priv = frame->priv;

 ack.  hmm, what about #ifdef TODO?
 
> Name:
>  2536 2008-11-30  lkcl  <lkcl@lkcl.net>
> 
> Otherwise looks fine.  I mean, I'm not really a gtk expert.  There are style
> violations, but I assume this stuff is more supposed to be more gtk style than
> webkit style, not sure.

 yes.  makes for a bit of a mess, but hey :)

 btw, erik: _whatever_ you do, don't land this one until the other patches are landed.  i've specified the dependency ordering in the bugreports.

 if this one goes in before anything else does it will _royally_ mess things up, as there are functions which don't exist yet.
Comment 4 Luke Kenneth Casson Leighton 2009-08-03 01:51:47 PDT
Created attachment 33965 [details]
adds use of gobject bindings to webkit gtk port - PLEASE OBSERVE DEPENDENCIES

fixed up to meet review comments
Comment 5 Eric Seidel (no email) 2009-08-06 19:03:11 PDT
Comment on attachment 33965 [details]
adds use of gobject bindings to webkit gtk port - PLEASE OBSERVE DEPENDENCIES

Please get a gtk reviewer to review this.  I've cleared the review flag.
Comment 6 Luke Kenneth Casson Leighton 2009-08-07 02:43:53 PDT
(In reply to comment #5)
> (From update of attachment 33965 [details])
> Please get a gtk reviewer to review this.  I've cleared the review flag.

 ack.  i'll leave it for a while until the dependencies are in.
Comment 7 Gour 2009-08-10 08:21:50 PDT
Created attachment 34471 [details]
uploaded
Comment 8 Eric Seidel (no email) 2009-08-12 13:44:52 PDT
Comment on attachment 34471 [details]
uploaded

See my comments in the mail to you.
Comment 9 Andre Klapper 2009-08-12 17:59:51 PDT
(In reply to comment #8)
> See my comments in the mail to you.

I did not receive that email. For the sake of transparency please keep technical debates in public comments. Thanks.