[Webkit-unassigned] [Bug 27435] adding XMLHttpRequest send idl language gobject

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 30 03:48:48 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27435


Maciej Stachowiak <mjs at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjs at apple.com




--- Comment #22 from Maciej Stachowiak <mjs at apple.com>  2009-07-30 03:48:46 PDT ---
Luke asked me to comment. Here's my thoughts:

1) It's reasonable for a DOM binding to choose to export XMLHttpRequest. One
plausible use case: the bindings user may want to write some code that
participates fully in the browser's loading model, including security, progress
notifications, cancel on end of page load, etc. It might be possible to do that
otherwise, but it doesn't seem simple to me. Also, some native platform APIs,
for example Cocoa Touch on the iPhone, have found the XHR model, quirky though
it may be, to be fairly convenient and have added their own native imitation.

2) I think whether to support XMLHttpRequest (which has lots of quirky
behaviors) as public API should be up to the port maintainers. For the GObject
bindings, I think it should be up to the WebKit/Gtk+ port maintainers, as the
WebKit/Gtk+ port is the only one that is currently planning to export GObject
bindings, so it impacts logic and maintainability of their public API. If other
ports decide they want to do so, then they should have a say as well.

3) Since this involves handling the weird case of multiple methods with the
same name in C, maybe XHR is not the best choice to tackle in an early phase of
this project. I'd rather see a simple bindings script, and a consensus on the
general design for overloaded methods in C.

4) Important point to consider about overloaded methods: it's possible for
methods in the Web platform to start out having a fixed number of arguments,
but later gain optional arguments or overloading. It's also the case that
sometimes the IDL files are edited and reordered. To support overloading in C,
I think it's important to make a design that's future-proof against future
changes to the IDL. One possible way: sort methods by number of parameters, and
add number variants to the ones with more parameters. I don't know if this has
been done already or not but there should probably be some agreement on the
right approach before moving forward.

Overall, it might be better to resubmit this patch once a bindings generator
script that can handle at least basic cases has been submitted, and once input
has been gathered from WebKit/Gtk developers on whether this makes sense in the
public API.

For what it's worth, I think it might make sense to make XMLHttpRequest part of
the ObjC DOM bindings as well.

Side not for Luke: marking a patch as r- doesn't indicate the matter is closed,
just that the patch needs revision according to the reviewer.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list