Commit Graph

472 Commits

Author SHA1 Message Date
Boris Zbarsky
e2971e3210 Bug 812742. Fix sequence codegen to not do AppendElement multiple times by accident. r=peterv 2012-11-27 15:20:40 -05:00
Bobby Holley
8ef2b01458 Bug 811152 - Decxify various DOM methods. r=me 2012-11-15 11:54:34 -08:00
Boris Zbarsky
fa61227956 Bug 811449 part 8. Get rid of nsGenericElement. r=peterv 2012-11-14 14:10:08 -08:00
Bobby Holley
a75f5ca4d9 Bug 800915 - Remove the cx parameter and simplify various APIs. r=sfink,bz
If callers want to throw, it's now their responsibility.
2012-11-14 09:56:26 -08:00
Boris Zbarsky
2d4ae2e778 Bug 810618. Make sure we don't allow layout statics to go away while we're still trying to use them. r=khuey 2012-11-13 00:26:55 -08:00
Boris Zbarsky
93edcc7097 Bug 810520. Correctly handle static methods and attributes in the NativeProperties structs that Xrays use. r=peterv
Note that at this point we actaully do Xrays for all of our various
property types, except in worker code.  The real substantive change
here is the change to what usedForXrays returns.  The rest is minor
cleanup.
2012-11-13 00:26:55 -08:00
Ryan VanderMeulen
6dd149a122 Backed out de9fff3a523, c567df2244f5, 8e3d976d5dc5, and c7499faaec23 (bug 800915) for bustage.
--HG--
extra : rebase_source : c823063bfa31d59d32b3402bd4b458b84b703cd5
2012-11-12 21:43:39 -05:00
Bobby Holley
a575c96c5e Bug 800915 - Remove the cx parameter and simplify various APIs. r=sfink,bz
If callers want to throw, it's now their responsibility.
2012-11-12 17:35:32 -08:00
Andrew McCreight
30c7820d71 Bug 792090 - Ignore unused result in CGProxy...PresenceChecker. r=bz 2012-11-12 14:21:46 -08:00
Peter Van der Beken
451ff8f738 Fix for bug 804950 (New DOM binding APIs for Element). r=bz.
--HG--
extra : rebase_source : a8691ead07dfa8ecca812396047627dc15474d83
2012-10-16 13:51:00 +02:00
Boris Zbarsky
722d581206 Bug 809260. Example codegen should include ErrorResult.h in the header. r=mccr8 2012-11-09 08:24:32 -08:00
Boris Zbarsky
03231584a7 Bug 808698. Set up example codegen for proxy bindings to work correctly. r=jst 2012-11-09 08:24:32 -08:00
Boris Zbarsky
3f363542b4 Bug 796983 followup to address peterv's comments. r=presumably-peterv 2012-11-09 08:24:32 -08:00
Boris Zbarsky
cdb20c6607 Bug 805310. Add some documentation for our object-wrapping helpers. r=peterv 2012-11-09 08:24:32 -08:00
Boris Zbarsky
5621c744b0 Bug 807224 followup to address review comments. r=presumably-peterv 2012-11-09 08:24:31 -08:00
Boris Zbarsky
76d46dee13 Bug 807226 part 8. Remove the exceptions for EventHandler in WebIDL codegen. r=smaug 2012-11-09 08:00:25 -08:00
Boris Zbarsky
6ac6b2b6fd Bug 807226 part 2. Change event handlers to store WebIDL callback functions. r=smaug 2012-11-09 08:00:25 -08:00
Boris Zbarsky
1dfb1af14b Bug 807224. Implement native-to-JS conversion for WebIDL unions. r=peterv 2012-11-09 07:59:33 -08:00
Boris Zbarsky
f01c979296 Bug 779048 followup. Add a comment that explains why the assert about exceptionCode being default when invalidEnumValueFatal is false is an ok thing to assert. r=peterv, DONTBUILD 2012-11-09 07:58:33 -08:00
Boris Zbarsky
6d7bbe9aed Bug 779048 part 10. Start using the new callback codegen in argument and return value conversion. r=peterv,smaug 2012-11-09 07:43:58 -08:00
Boris Zbarsky
abdb1e731e Bug 779048 part 9. Give JS-to-native conversion an object pointer to work with so it can convert callback objects. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky
d745a9276e Bug 779048 part 8. Handling of arguments for callbacks. r=peterv
Note that we're now using the array object as the "obj" when wrapping
sequence members, because we don't have an 'obj' around in our
code... and every single existing sequence-of-interfaces consumer
relied on there being an 'obj' floating about.

Also note that I needed to rearrange the various wrapping helpers so
that we can wrap things that are hanging out in const smartpointers or
in const OwningNonNull or in plain object references.
2012-11-09 07:43:58 -08:00
Boris Zbarsky
dcaa56d321 Bug 779048 part 7. Make native-to-JS conversion support doing something other than "return false" on JS exceptions. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky
7e2dca188e Bug 779048 part 6. Handling of return values for callbacks. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky
f7b9a5bdea Bug 779048 part 5. Make js-to-native conversion support doing something other than "return false" on JS exceptions. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky
01c98be853 Bug 779048 part 4. Implement basic codegen for callbacks, without handling of arguments or return values yet. r=peterv 2012-11-09 07:43:57 -08:00
Boris Zbarsky
cba09556db Bug 779048 part 3. Refactor the code we use for generating example declarations a bit so we can reuse it for callbacks. r=peterv 2012-11-09 07:43:57 -08:00
Boris Zbarsky
7bd6f6912f Bug 779048 part 2. Rearrange how we do our includes and forward-declares to actually work with callbacks and dictionaries sanely. r=peterv 2012-11-09 07:43:57 -08:00
Boris Zbarsky
b01e12f509 Bug 779048 part 1. Implement a parent class for C++ reflections of callback functions in WebIDL. r=bholley,smaug 2012-11-09 07:43:57 -08:00
Boris Zbarsky
bd227d01e5 Bug 805988. Add some asserts that new-binding objects are nsISupports if they claim to be or or can be safely reinterpret_cast to nsWrapperCache, if they have an nsWrapperCache at all, if they don't claim to be nsISupports. r=peterv
Note that everything except the new asserts just got moved with no changes.
2012-11-08 23:48:42 -08:00
Boris Zbarsky
75b79a780d Bug 808991. Named getters should get called for indexed properties on objects that don't support indexed properties. r=peterv 2012-11-08 23:48:42 -08:00
Ehsan Akhgari
ab8bc55c73 Bug 809654 - Implement BiquadFilterNode; r=bzbarsky 2012-11-07 20:59:14 -05:00
Robert O'Callahan
cecf3ae790 Bug 792675. Part 1: Make the URL interface use WebIDL. r=bz
--HG--
extra : rebase_source : dbb7a3158b71446930400ad523a2896b6306de40
2012-09-25 15:24:43 +12:00
Robert O'Callahan
9caa3eeb38 Bug 792675. Part 0.6: Handle empty dictionary types in WebIDL bindings. r=bz
--HG--
extra : rebase_source : a38a2405d32b76bdef9095398c759346cfc28282
2012-11-07 17:56:55 -05:00
Robert O'Callahan
720f71a0d7 Bug 792765. Part 0.5: Fix WebIDL codegen to avoid emitting QueryInterface when there is no interface prototype object. r=bz
--HG--
extra : rebase_source : 7e1df198548d8a4f1b2f2a045f637412a5fe8450
2012-09-25 15:24:43 +12:00
Ehsan Akhgari
21bc1f2095 Bug 809271 - Implement DynamicsCompressorNode; r=bzbarsky 2012-11-06 20:01:11 -05:00
Masatoshi Kimura
aa251d934b Bug 801487 - Implement ErrorResult::ThrowTypeError. r=bz 2012-11-06 18:23:14 -05:00
Ehsan Akhgari
46aae97b87 Bug 808876 - Part 1: Implement PannerNode; r=bzbarsky
--HG--
extra : rebase_source : a7b901dcc7758ff9c7a8917a956d0541187fea07
2012-11-05 21:14:13 -05:00
Boris Zbarsky
8b9e634fac Bug 804738 part 2. Fix codegen for indexed operations to be consistent about the naming of the index argument. r=peterv 2012-11-06 08:01:49 -08:00
Boris Zbarsky
dd4d31b923 Bug 804738 part 1. Fix codegen for named operations to be consistent about the naming of the string argument. r=peterv 2012-11-06 08:00:57 -08:00
Ehsan Akhgari
543d0a3b54 Backed out changeset ecf0c2a7cb9f (bug 808876) for build bustage 2012-11-05 22:30:08 -05:00
Ehsan Akhgari
45ebdb31e5 Bug 808876 - Implement PannerNode; r=bzbarsky 2012-11-05 21:14:13 -05:00
Ehsan Akhgari
0eea5a9900 Bug 808841 - Implement AudioContext.listener; r=bzbarsky 2012-11-05 19:26:03 -05:00
Boris Zbarsky
0b3703ffee Bug 806033. Finish getting rid of stray [Infallible] annotation bits. r=khuey 2012-11-05 14:40:33 -05:00
Boris Zbarsky
f447d2024f Bug 804632. Allow certain reserved words as argument names in WebIDL. r=khuey 2012-11-05 14:40:32 -05:00
Boris Zbarsky
bb15ddc515 Bug 804319. Implement parsing of the "stringifier;" shorthand. r=khuey 2012-11-05 14:40:32 -05:00
Boris Zbarsky
5617a17824 Bug 804635. Make codegen deal with Document not being an external interface but not available in workers even though XMLHttpRequest (which can return or accept Document) is available there. r=peterv 2012-11-05 11:58:04 -05:00
Boris Zbarsky
fa578d8179 Bug 803129. Convert DOMStringMap to WebIDL. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky
3138ceecd8 Bug 803519. Require indexed/named getters if we have creators/deleters/setters. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky
892b323c34 Bug 772869. Make getOwnPropertyNames work correctly for WebIDL proxy bindings. r=peterv,ms2ger 2012-11-05 11:58:03 -05:00
Boris Zbarsky
5865858536 Bug 807548. Enumerating an Xray should not see the 'constructor' property on DOM prototypes unless we're told to include non-enumerable properties. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky
cee04c4622 Bug 803306. Calling a named creator should not define an expando. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky
dbf8898dc9 Bug 788225. Implement WebIDL deleters. r=peterv 2012-11-05 11:58:02 -05:00
Boris Zbarsky
1e35c82ae5 Bug 749866 part 4. Generate slightly better code when we know we're null or undefined. r=khuey 2012-11-05 11:58:02 -05:00
Boris Zbarsky
c31dc49516 Bug 749866 part 3. Rejigger overload resolution a bit more so we can tell argument conversion that we know the argument is null or undefined. r=khuey 2012-11-05 11:58:02 -05:00
Boris Zbarsky
72eecce718 Bug 749866 part 2. Simplify the code generated by overload resolution a bit when we have sequences or dates at our distinguishing index. r=khuey 2012-11-05 11:58:02 -05:00
Boris Zbarsky
1910c4ad9c Bug 749866 part 1. Add support for failureCode for sequence unwrapping. r=khuey 2012-11-05 11:58:02 -05:00
Ehsan Akhgari
67d9a2b2ad Bug 807533 - Implement DelayNode; r=bzbarsky
--HG--
extra : rebase_source : 36bb70c9f4b9c86fc1564447a34153d92fe7f347
2012-10-31 20:26:03 -04:00
Ehsan Akhgari
5d48f4efff Bug 807697 - Enable integer to float type coercion in the Web IDL parser; r=bzbarsky
--HG--
extra : rebase_source : 93907e32c1111773af0b207274aa32323aabfa03
2012-11-01 12:30:21 -04:00
Ehsan Akhgari
7afb9c40d0 Bug 807526 - Implement GainNode; r=bzbarsky 2012-10-31 15:09:32 -04:00
William Chen
3a6c68bd11 Bug 807034 - Fix WebIDL codegen for static readonly attributes. r=bz 2012-10-30 11:38:58 -07:00
Vendelin Ruzicka
a41524cf2a Bug 806184 - Can't use 'delete' method in WebIDL. r=bz 2012-10-31 13:36:20 +01:00
Peter Van der Beken
020e296215 Fix for bug 763643 (Implement static operations and attributes for WebIDL). r=bz.
--HG--
extra : rebase_source : d9dd5450af5d2b1f3e7e3a738ec2efdc7f7053da
2012-10-19 09:34:28 +02:00
Ehsan Akhgari
2bcb7f9713 Bug 803392 - Initial implementation of AudioParam; r=bzbarsky
This patch implements most of the semantics of AudioParam in a
templatized base class called AudioEventTimeline.  This is done in order
to make it possible to test this code from C++ without the need of
linking to libxul.  Basically we take everything that could depend on
libxul or is not suitable for a genertic implementation and put it in a
traits like type as a template argument.  Then the test creates mock
objects that conform to the argument interfaces, and tests the logic of
AudioEventTimeline.
2012-10-16 21:19:06 -04:00
Peter Van der Beken
b17dd93f15 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - followup to fix problem pointed out by reviewer. r=bz.
--HG--
extra : rebase_source : 13271029cb0c7cd18b98fa2ed409e43f1df13e47
2012-10-29 21:55:13 +01:00
Peter Van der Beken
99782186da Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript). r=bz.
Switch from using the interface objects from the Xrays compartment to wrapping
interface objects and interface prototype objects in Xrays. Make dom binding
Xrays deal with both instance objects and interface and interface prototype
objects.
2012-10-09 20:50:27 +02:00
Peter Van der Beken
3c03fcb747 Fix for bug 785277 (Implement PutForwards in the new DOM bindings). r=bz.
--HG--
extra : rebase_source : 5153ebab17a9637946d0f0c322997c0c3d118190
2012-08-13 14:20:49 +02:00
Peter Van der Beken
e57327d601 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - move some code. r=bz.
--HG--
extra : rebase_source : 524e537ee6c6b30fdb67cbced3dbb574de83be28
2012-10-09 20:50:27 +02:00
Peter Van der Beken
da84553f1f Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - rename ProtoOrIfaceArray. r=bz.
--HG--
extra : rebase_source : c426270fc1ebee818629bd94dfc8d11af59bfc00
2012-10-09 20:50:27 +02:00
Bobby Holley
2c584933ef Bug 797821 - Address Ms2ger's review comments. r=me 2012-10-25 17:01:09 +02:00
Bobby Holley
461c6572fd Bug 797821 - Hoist XPConnect-y stuff out of the compartment private and into the XPCWrappedNativeScope. r=mrbkap
This change means we no longer have to keep around a set of XPConnect compartments.
We keep the compartment private around for non-xpconnecty stuff like about:memory
instrumentation that needs to happen on non-xpconnect compartments.
2012-10-25 17:01:09 +02:00
Bobby Holley
3d0731683a Bug 797821 - Removed the unused reserved slot for XPConnect globals. r=mrbkap 2012-10-25 17:01:09 +02:00
Bobby Holley
f46b3babff Bug 797821 - Replace usage of XPCWrappedNativeScope::FindInJSObjectScope(ccx, obj) with GetObjectScope(obj). r=mrbkap 2012-10-25 17:01:08 +02:00
Boris Zbarsky
18610055c4 Bug 804725. Use the right type name for interface arguments for binding example codegen. r=jst 2012-10-24 16:10:49 -04:00
Boris Zbarsky
2b5f806cc9 Bug 793267. Add support for [Unforgeable] in WebIDL. r=peterv
Unforgeable attributes are defined directly on the object, not on the
prototype.  So we keep them in a separate spec array and define them
during object creation as needed.

This means that we have to pass that separate spec array to the Xray
helpers, unfortunately, which somewhat complicates those.
2012-10-24 16:10:49 -04:00
Boris Zbarsky
9af1986044 Bug 798187 even more followup. Disable broken WebGL test, and update to Peter's review comments. r=peterv 2012-10-22 15:14:30 -04:00
Boris Zbarsky
8027643a0f Bug 798187 followup. Actually return our newly-created object from dictionary ToObject. r=peterv 2012-10-22 14:35:08 -04:00
Boris Zbarsky
cd4e9e4533 Bug 798187 part 2. Switch WebGLContextAttributes to being a dictionary. r=peterv,bjacob 2012-10-22 13:08:52 -04:00
Boris Zbarsky
5480ae711c Bug 798187 part 1. Add support for dictionary return values. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky
48f9a54684 Bug 798151. Support stringifier operations (but not yet attributes!) on non-proxy bindings, and fix Object.prototype.toString for proxy bindings. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky
e5df170f5b Bug 801712 part 3. Make object return values faster by only doing the JS_WrapValue if needed. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky
04d6d1040c Bug 801712 part 2. Switch ImageData to WebIDL bindings. r=peterv 2012-10-22 13:08:52 -04:00
Ms2ger
198e457ea6 Bug 796903 - Part a: Move DOMImplementation to its own file and move it to Paris bindings; r=bz 2012-10-21 09:38:41 +02:00
Peter Van der Beken
e86cd8818c Fix for bug 801083 (Remove old proxy-based list bindings). r=bz. 2012-10-13 14:50:24 +02:00
Peter Van der Beken
350fbbbaa6 Fix for bug 802739 (Make parent wrapping for DOM bindings fall back to XPConnect for nsISupports classes).
--HG--
extra : rebase_source : 212a49060710b5b3791203b9472c9efcad578a58
2012-10-19 09:33:18 +02:00
Peter Van der Beken
a69ce442c1 Fix for bug 773780 (Add API for new DOM bindings for Node). r=bz.
--HG--
extra : rebase_source : 5dd51c4ad5274da9235c8c341b0531f234e95a91
2012-10-09 14:31:24 +02:00
Boris Zbarsky
46e3240468 Bug 802636. Add a test that makes sure that codegen and example generation agree with each other. r=jst 2012-10-17 21:17:16 -04:00
Boris Zbarsky
f1bf746514 Bug 796983 part 2. Add a way to generate an example class declaration for a given WebIDL interface. r=jst
We mark constructors as static in the parser because they are.  This
allows us to just use the isStatic() for the IDLMember to mark our
declarations static.

To generate an example interface implementation, just "make
interfacename-example" in $objdir/dom/bindings.  This will place files
called interfacename-example.h and interfacename-example.cpp in that
directory.  For example, "make XMLHttpRequest-example" will get you
$objdir/dom/bindings/XMLHttpRequest-example.h and
$objdir/dom/bindings/XMLHttpRequest-example.cpp.

Attribute getters currently default to const methods, while setters
and operations default to non-const methods.

--HG--
rename : dom/bindings/BindingGen.py => dom/bindings/ExampleGen.py
2012-10-17 17:01:55 -04:00
Boris Zbarsky
3ee2ff3f57 Bug 796983 part 1. Switch nullable primitives to using a const Nullable. r=jst 2012-10-17 17:01:55 -04:00
Benoit Jacob
92800ce87b Bug 742781 - Implement WEBGL_debug_renderer_info extension - r=bz,jgilbert 2012-10-17 15:11:51 -04:00
Ehsan Akhgari
aef4fa9628 Merge mozilla-central into mozilla-inbound 2012-10-16 20:43:47 -04:00
Olli Pettay
c3acd4988e Bug 797806 - Helper method to handle stringified JSON in C++, part2, r=khuey 2012-10-16 18:37:44 +03:00
Olli Pettay
4a3f200675 Bug 797806 - Helper method to handle stringified JSON in C++, r=khuey 2012-10-16 17:52:10 +03:00
Boris Zbarsky
4c9f7b0f5a Bug 800386. Fix getInterface from JS on XMLHttpRequest objects to actually work. r=khuey 2012-10-15 23:12:03 -04:00
Trevor Saunders
6c294d1802 Bug 742191 - Part d: Throw TypeErrors for Paris binding exceptions; r=bz 2012-10-16 14:06:10 -04:00
Ed Morley
f87439d0bc Merge mozilla-central to mozilla-inbound 2012-10-15 16:09:10 +01:00
Ryan VanderMeulen
1598bd50f0 Merge inbound to m-c. 2012-10-14 16:39:23 -04:00
Ms2ger
0ad78542ff Bug 793244 - Part b: Convert Screen to WebIDL; r=bz 2012-10-14 09:40:11 +02:00
Ms2ger
81b6ab3a65 Bug 798014 - Remove dead DefineConstructor definition; r=khuey 2012-10-14 09:39:05 +02:00
Ed Morley
f63fc6d67a Backout 3044539fec87 (bug 799465),2dbcd6d16b43 (bug 798264), f7019f73a5f0 (bug 711628), a484a3a904da, 7154061ddc00 & 7e7fc42021c1 (bug 799465) for burning 2012-10-12 14:45:38 +01:00