My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 13: add bindings to DOM model (requires patch to webkit)
6 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----
Type-Enhancement
Priority-Medium


Sign in to add a comment
 
Reported by luke.leighton, Aug 27, 2008
https://bugs.webkit.org/show_bug.cgi?id=16401

patch also includes javascript execution of #12 which _may_ end
up being superceded - POSSIBLY - by the DOM model handling.
Comment 1 by luke.leighton, Aug 29, 2008
update.
Comment 2 by luke.leighton, Aug 31, 2008
update.
Comment 3 by jmalonzo, Oct 27, 2008
(No comment was entered for this change.)
Status: Accepted
Comment 4 by luke.leighton, Jan 09, 2009
updated patch which splits out DOM-specific bindings into webkit_glib.defs
also up-to-date for webkit svn as of about dec 2008.

Comment 5 by houda.Qt4, Jan 29, 2009
Hi , 	
I applied the patch f 160 KB but I got this error when compiling :

cd . && automake-1.9 --foreign  Makefile
/bin/sh: line 11: automake-1.9: command not found
make: *** [Makefile.in] Erreur 127

any idea please , 
Comment 6 by luke.leighton, Jan 29, 2009
hiya,
that looks like you don't have automake-1.9 installed (?)
what is in line 11?  which file?

i think you should be re-running ./autogen.sh

also - you _have_ got the patched version of webkit-glib, yes?

bug #16401

if not, go get the latest code from http://github.com/lkcl/webkit/tree/16401.master

Comment 7 by MonkeeSage, Apr 22, 2009
Doesn't seem like a good idea to rely on branch of webkit, since WebView already
exposes a DOMDocument in the ObjC backend.* Seems better to try to get the C/GTK port
to implement it.

____

*
http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/WebKit/Classes/WebView_Class/Reference/Reference.html#//apple_ref/occ/instm/WebView/mainFrameDocument
Comment 8 by luke.leighton, Apr 23, 2009
the objective-c backend is proprietary and specific to the proprietary apple
operating system.  it is therefore of absolutely no value to anyone but apple.

if you would like to help, you could help get the patch to webkit into webkit.
Comment 9 by MonkeeSage, Apr 23, 2009
The ObjC backend is not proprietary to Apple, they released it to WebKit. They have
their own proprietary branch, but the WebKit branch is BSD licensed.* I just linked
to the Apple docs because WebKit doesn't have any standardized API docs. The Windows
backend also implements the same interface.** I didn't mean to say that the patch(s)
in the WebKit bug tracker shouldn't be supported. I've not reviewed them, or the
comments (quite a few of both!) I only meant that it doesn't seem like a good idea to
rely on a forked version of WebKit with pywebkit, since, for example, it will break
if you deploy with a custom-built pywebkit to a system with vanilla WebKit.

____

* http://webkit.org/coding/bsd-license.html
** http://trac.webkit.org/browser/trunk/WebKit/win/Interfaces/IWebView.idl

Comment 10 by jmalonzo, May 28, 2009
 Issue 29  has been merged into this issue.
Comment 12 by sneilan1, Jun 03, 2009
Is this patch integrated into pywebkitgtk? I assume the patches listed above from
2008 are in, but, what about the latest one from Jan 9, 2009?
Comment 13 by luke.leighton, Jun 04, 2009
monkeysage: all the more reason, then, as to why you should, if you would like to use
python bindings to webkit, that you should get onto the webkit mailing lists, get on
to the webkit irc, get on to the webkit bug tracker and continuously request for an
explanation as to why this patch is being delayed.
Comment 14 by luke.leighton, Jun 04, 2009
sneilan1: no, and it cannot be integrated, until the patch to webkit is integrated. 
the reason is very very simple: there are 1,500 functions added (all automatic), none
of which are there until the patch to webkit is integrated.

therefore, you must get onto the webkit mailing lists, get on to the irc, get on to
the webkit bug tracker and continuously request explanations for the delay and
express your support for the removal of delays to the integration of the patch.
Comment 15 by jmalonzo, Jun 04, 2009
Hey y'all! We're aware of this issue. The DOM bindings is one of the tasks in the
priority list, and I myself are slowly going through those (Accessibility support
comes to mind as well as API work). If this is something really important to you, I
encourage you to look at the DOM bindings patch in bugs.webkit.org and help out with
the effort. There's a fairly detailed comment on that patch as to what needs to be
done first, and people are willing to review patches to get it started!

And please, don't annoy people on the list. It's counter-productive. Everyone's
already busy as it is. Contribute if you must!

Comment 16 by jmalonzo, Jun 04, 2009
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Comment 17 by sneilan1, Jun 04, 2009
OK, I'll definitely do that. Didn't mean to annoy you guys, I was just curious,
although, now I see the depth of the problem and why ya'll might've been annoyed.
Comment 18 by luke.leighton, Jun 04, 2009
hiya jmalonzo,

apple's employees have made unacceptable dictatorial decisions that render the webkit
gdom bindings near useless.  they raise issues with the patch, which i counter, and
then they IGNORE rather than accept the counter-arguments, preferring to stick with
"their way".

this is totally unacceptable, and the more people that tell them so, the better.

then, there was the totally disrespectful attitude towards the project that inspired
these python bindings (pyjd) and the totally disrespectful attitude towards myself. 
the lack of respect allowed all progress to be dismissed, which is of course what
apple's employees want: total control and a situation in which _they_ are in control.

unfortunately, a number of people actually listened to apple, and ended up wasting
their time.  the latest group was the people who took on the Vala bindings.  they
listened to apple, and ended up getting themselves into an awful mess.  the result
was that they had to abandon contributions to the project.

unfortunately, because they listened to apple, they REMOVED a large section of
absolutely critical functionality (event handling) which meant that anything that
they did from that point onwards was useless.

imagine if someone did an implementation of javascript DOM bindings, but without
onload, onclick, onkeypress etc, and without XMLHTTPRequest asynchronous callbacks.

so - i am starting again, unfortunately ignoring everything that they've done, and am
forward-porting the patch.

i'm giving serious consideration to creating a completely separate library.

Comment 19 by luke.leighton, Jun 23, 2009
ok - this is an update which matches the current #16401.master update to the
webkit/gdom branch.  the revision of webkit that it was updated to was r44473.
the matching webkit fork is available from:
http://github.com/lkcl/webkit/tree/16401.master

Comment 20 by luke.leighton, Jun 26, 2009
new version of patch which thanks to kees bos is the beginnings of remapping
stupid_glib_naming_convention to properW3CStandardNaming.

Comment 21 by luke.leighton, Jun 26, 2009
... btw, obviously, that involves renaming webkit.so to _webkit.so.  webkit.py is now
auto-generated by create_webkit_wrapper.py - yes, i know, there are better ways to do
this but this is a first shot.
l.
Comment 22 by luke.leighton, Jul 11, 2009
ok another update.  i've added a few extra properties and a couple of functions.
the auto-generated remapper now works really well.  event handling is a _little_
awkward, and ideally needs a bit more work to be made more like e.g. python-xpcom.
the auto-generated webkit.py is 70,000 lines but that can't be helped.  i'd like
to think of a way to do that dynamically, but right now this "works".

to make changes, you MUST install _webkit.so a first time and THEN run
create_webkit_wrapper.py because it does "import _webkit".

or put build/.libs into the python path somehow.  all very awkward.

Comment 23 by jhuangjiahua, Jul 12, 2009
@luke.leighton

compile failed

{{{
make[1]: Entering directory `/home/huahua/debs/webkit/pywebkit/r70'
(cd . \
	 && /usr/bin/pygobject-codegen-2.0 \
	    --register /usr/share/pygtk/2.0/defs/gdk-types.defs \
	    --register /usr/share/pygtk/2.0/defs/gtk-types.defs \
	    --override webkit.override \
	    --prefix pywebkit webkit.defs) 2>&1 >gen-webkit.c | tee webkit.errors \
	&& ! grep -q -v "^\*\*\*INFO\*\*\*" webkit.errors \
	&& cp gen-webkit.c webkit.c \
	&& rm -f gen-webkit.c
/usr/share/pygobject/2.0/codegen/definitions.py:42: DeprecationWarning:
object.__init__() takes no parameters
  str.__init__(self, type_name)
***INFO*** There are no declared global functions.
***INFO*** The coverage of methods is 100.00% (410/410)
***INFO*** There are no declared virtual proxies.
***INFO*** There are no declared virtual accessors.
***INFO*** There are no declared interface proxies.
make[1]: *** [webkit.c] Error 1
make[1]: Leaving directory `/home/huahua/debs/webkit/pywebkit/r70'
make: *** [all] Error 2
Command exited with non-zero status 2

}}}
Comment 24 by luke.leighton, Jul 12, 2009
 jhuangjiahua, hi,

 you'll need the absolute latest version of #16401.master off of github: please
confirm that you have done a "git pull" from
http://github.com/lkcl/webkit/tree/16401.master within the past 24 hours.

also, can you get a complete compile listing - "error in webkit.c" is of absolutely
no use to anyone.  i suspect that code.google.com is interfering.  if it is, please
place the compile output somewhere where it can be downloaded without interference
(perhaps as an attachment).

l.
Comment 25 by luke.leighton, Jul 12, 2009
ok i've prepared an update, to the latest svn revision.
again, you will need to get latest svn of pywebkitgtk
and latest git pull of #16401.master.

that _should_ fix any build issues.

Comment 26 by luke.leighton, Jul 26, 2009
ok - another update.  this one is for svn revision r46395.
pywebkitgtk.patch
3.0 MB Download
Sign in to add a comment

Hosted by Google Code