Commit Graph

1262 Commits

Author SHA1 Message Date
Boris Zbarsky
6aae0341c3 Bug 746570. Get rid of bogus uses of rstrip() that are leaving random trailing spaces in the middle of our string. r=peterv 2012-06-15 16:25:51 -04:00
Boris Zbarsky
6d6455d86f Bug 764104. Avoid collisions with C++ reserved words by using initial-caps for WebIDL enum values. r=peterv 2012-06-15 16:25:51 -04:00
Boris Zbarsky
60ae23ad37 Bug 750297 part 2. Switch WebGLUniformLocation to Paris bindings. r=peterv, bjacob 2012-06-15 16:25:51 -04:00
Boris Zbarsky
3417cf0e8b Bug 750297 part 1. Add support for objects that do not have a wrapper cache in WebIDL bindings. r=peterv 2012-06-15 16:25:50 -04:00
Boris Zbarsky
11ae7922e9 Bug 742153 part 4. Allow strings inside sequences and dictionaries. r=peterv 2012-06-12 10:22:05 -04:00
Boris Zbarsky
3c4e09b808 Bug 742153 part 3. Implement codegen for dictionary arguments. r=peterv
Another implementation option would be to put all the dictionaries in a single
file and have a static global set of ids which works across all dictionaries
and is initialized once at startup or so.  That would also handle cross-file
dictionary inheritance better.

One problem that remains is the fake descriptor business.  At the moment this
does not allow interface types inside dictionaries.  We could probably work
around this by either refactoring code to make it possible to get the declType
independently of the actual conversion template (whether because it lives in a
separate function or because the conversion template generator knows to just
return an empty string when the fake descriptor provirder is passed) or by
figuring out a way to pass an actual descriptor provider to dictionary codegen.
2012-06-12 10:22:05 -04:00
Boris Zbarsky
a550f31d7d Bug 742153 part 2. Rename isSequenceMember to isMember, since it will apply to both sequences and dictionaries. r=peterv 2012-06-12 10:22:05 -04:00
Kyle Huey
d42d206076 Bug 763573: Don't export PrimitiveConversions.h. r=bz 2012-06-11 13:04:34 -07:00
Boris Zbarsky
bb37c2a5a0 Bug 761707 part 2. Drop the vestigial jsclass argument to UnwrapDOMObject. r=bholley 2012-06-06 15:59:46 -04:00
Boris Zbarsky
1ccda2efe0 Bug 761707 part 1. Rip out the various infrastructure for allowing different slot indices on different DOMJSClass instances. r=bholley 2012-06-06 15:59:46 -04:00
Boris Zbarsky
d8299d963a Bug 748266. Switch the WebGL canvas context to new DOM bindings. r=peterv 2012-05-31 14:16:48 -04:00
Boris Zbarsky
bd63b368ca Backed out changeset f96e0f078b49 (bug 748266) because the test suite is bogus and we're failing a crashtest too. 2012-05-31 16:20:49 -04:00
Boris Zbarsky
d25bb48544 Bug 748266. Switch the WebGL canvas context to new DOM bindings. r=peterv 2012-05-31 14:16:48 -04:00
Peter Van der Beken
51a7de4e8f Fix for bug 759275 (Specialize unwrapping to HTML elements in dom bindings). r=bz. 2012-05-21 23:29:58 +02:00
Peter Van der Beken
3f5726c007 Fix for bug 759278 (Support binarynames for attributes too in new DOM bindings). r=bz. 2012-05-18 23:25:47 +02:00
Boris Zbarsky
26111ae37d Bug 743906 part 3. Stop listing default values for optional arguments with no defaults, now that we're guaranteed to only examine such values if argc is big enough. r=peterv 2012-05-29 23:45:18 -04:00
Boris Zbarsky
89e01282f1 Bug 743906 part 2. Use Optional<> for optional arguments that don't have default values. r=peterv 2012-05-29 23:45:18 -04:00
Boris Zbarsky
f68192a4f6 Bug 755636 part 2. Add some tests (not exhaustive!) for sequence codegen and fix the bugs they uncover. r=peterv 2012-05-25 01:08:26 -04:00
Boris Zbarsky
794994cab4 Bug 755636 part 1. Convert sequence argument codegen to dom::Sequence. r=peterv 2012-05-25 01:08:22 -04:00
Boris Zbarsky
d5b6f25379 Bug 749864. Codegen for typed array and arraybuffer arguments. r=peterv 2012-05-25 01:07:03 -04:00
Boris Zbarsky
308bec7942 Bug 753642. Rip out the codegen for the Xray-related bits of worker bindings, since we don't have Xrays in workers. r=peterv 2012-05-23 12:44:48 -04:00
Boris Zbarsky
7e545b4df7 Bug 755080 part 1. Add infrastructure for binding codegen tests. r=khuey,peterv 2012-05-23 12:44:48 -04:00
Boris Zbarsky
44de39bbe7 Bug 753522. Add support for controlling the existence of methods, properties, interface constants, etc with a pref. r=peterv 2012-05-23 12:44:48 -04:00
Peter Van der Beken
5e61e78f90 Fix for bug 756257 (Replace xpc_qsDOMString with a conversion function in new DOM bindings). r=bz. 2012-05-18 23:25:46 +02:00
Peter Van der Beken
bafe562dcd Fix for bug 756256 (Add support for object arguments and return types in new DOM bindings). r=bz. 2012-04-26 23:44:28 +02:00
Peter Van der Beken
1d83aa68a4 Fix for bug 756251 (Pass extendedAttributes to CGCallGenerator). r=bz. 2012-04-26 23:44:28 +02:00
Peter Van der Beken
3166d44220 Fix for bug 756231 (Remove NativeToSupports, replace with reinterpret_cast). r=bz. 2012-04-26 23:44:28 +02:00
Peter Van der Beken
d8d8bc42a4 Fix for bug 756225 (Make CGNamespace.build respect declareOnly). r=bz. 2012-04-26 23:44:28 +02:00
Peter Van der Beken
08272d6ed2 Fix for bug 741263 (Paris bindings constructors shouldn't abuse reserved identifiers). r=bz. 2012-04-26 22:57:33 +02:00
Brian Hackett
b4c002a912 Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 15:03:45 -07:00
Brian Hackett
4f8baecc9e Backed out changeset 5fc7462dd394 for android orange. 2012-05-19 11:52:55 -07:00
Brian Hackett
b7d2500332 Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 09:48:09 -07:00
Boris Zbarsky
84ed2eac92 Bug 748267 part 3. Codegen for sequence return values. r=peterv
The big block in getRetvalDeclarationForType is just direct cut/paste from CGCallGenerator plus the addition of the sequence case.  The IDL parser changes were OKed by khuey; they're needed so that we don't have to worry about the ordering of sequence with conversions for strings and primitives.
2012-05-15 14:23:29 -04:00
Boris Zbarsky
752857bc03 Bug 748267 part 2. Implement codegen for dealing with sequence arguments. r=peterv 2012-05-15 14:23:29 -04:00
Boris Zbarsky
d2e2c27224 Bug 748267 part 1. Refactor js-to-native conversion to make it not assume it's only happening on stack arguments. r=peterv
The changes in CastableObjectUnwrapper and CallbackObjectUnwrapper are
basically reindentation.  Similar for the actual conversion changes for all the
non-interface types, though for those the actual declaration of the thing being
converted to has moved out, since we may not be converting onto the stack.
2012-05-15 14:23:29 -04:00
Peter Van der Beken
6e0426949a Fix for bug 752042 (Support running code after successful wrapping in Paris bindings). r=bz. 2012-04-26 23:44:24 +02:00
Luke Wagner
645efe19ef Bug 747617 - fix document.all and swap JSClass::{construct,hasInstance} so this doesn't happen again (r=bz) 2012-05-07 12:44:08 -07:00
Boris Zbarsky
a70bedac4b Bug 749485. Switch new DOM bindings to using a struct for keeping track of failures for fallible methods. r=peterv,bent
ErrorResult is in a separate header file so it can be included from all over the
place without having to pull in mozilla/dom/Utils.h and all the xpconnect gunk
that needs.
2012-05-05 21:15:11 -04:00
Phil Ringnalda
1aed450286 Back out 1907bf7e6d7c (bug 749485) for build bustage 2012-05-05 20:33:59 -07:00
Boris Zbarsky
1cf6310e05 Bug 749485. Switch new DOM bindings to using a struct for keeping track of failures for fallible methods. r=peterv,bent
ErrorResult is in a separate header file so it can be included from all over the
place without having to pull in mozilla/dom/Utils.h and all the xpconnect gunk
that needs.
2012-05-05 21:15:11 -04:00
Boris Zbarsky
3951da37e9 Bug 748637. Refactor argument conversion to primitive values to make it easier to extend in the future. r=peterv 2012-05-04 12:38:48 -04:00
Boris Zbarsky
3d4a032e7f Bug 748983. Fix the instanceof behavior for new bindings in situations where we don't need a custom hasInstance hook. r=peterv 2012-05-03 00:35:38 -04:00
Boris Zbarsky
830492af6c Bug 742217. Reduce the use of nested namespaces in our binding code. r=peterv,bent
In the new setup, all per-interface DOM binding files are exported into
mozilla/dom.  General files not specific to an interface are also exported into
mozilla/dom.

In terms of namespaces, most things now live in mozilla::dom.  Each interface
Foo that has generated code has a mozilla::dom::FooBinding namespace for said
generated code (and possibly a mozilla::bindings::FooBinding_workers if there's
separate codegen for workers).

IDL enums are a bit weird: since the name of the enum and the names of its
entries all end up in the same namespace, we still generate a C++ namespace
with the name of the IDL enum type with "Values" appended to it, with a
::valuelist inside for the actual C++ enum.  We then typedef
EnumFooValues::valuelist to EnumFoo.  That makes it a bit more difficult to
refer to the values, but means that values from different enums don't collide
with each other.

The enums with the proto and constructor IDs in them now live under the
mozilla::dom::prototypes and mozilla::dom::constructors namespaces respectively.
Again, this lets us deal sanely with the whole "enum value names are flattened
into the namespace the enum is in" deal.

The main benefit of this setup (and the reason "Binding" got appended to the
per-interface namespaces) is that this way "using mozilla::dom" should Just
Work for consumers and still allow C++ code to sanely use the IDL interface
names for concrete classes, which is fairly desirable.
2012-05-03 00:35:38 -04:00
Peter Van der Beken
70167db26f Fix for bug 741267 (UserScript's XMLHttpRequest is undefined in 20120401 nightly).
Pass two objects when creating a DOM interface object, the global used to cache
the DOM interface objects and a receiver object on which the named property is
that points to the DOM interface object.
2012-04-23 16:10:56 +02:00
Boris Zbarsky
31f123812f Bug 747819. When wrapping non-prefable objects, don't generate a fallback-to-XPConnect codepath. r=peterv 2012-04-26 00:42:20 -04:00
Boris Zbarsky
e2abff7f4a Bug 747815. Use const strings for arguments in DOM bindings. r=peterv 2012-04-26 00:42:03 -04:00
Ehsan Akhgari
21769f977a Merge mozilla-central into birch 2012-04-22 16:10:35 -04:00
Boris Zbarsky
216a4882a0 Bug 742197. Make unannotated non-nullable string arguments stringify null and undefined in the webidl bindings. r=peterv 2012-04-18 15:28:01 -04:00
Boris Zbarsky
b3b76893b3 Bug 742425. Remove the extra compartment-entering code we don't need. r=peterv 2012-04-18 12:11:33 -04:00
Boris Zbarsky
ac799d2699 Bug 742170. Use CGThings in CGCreateInterfaceObjectsMethod more. r=peterv 2012-04-18 12:10:48 -04:00