Commit Graph

70 Commits

Author SHA1 Message Date
Benoit Jacob
d41eaaa3a0 Bug 816187 - make WebIDL accept nullable dictionary retvals; let getContextAttributes's retval be nullable - r=bz 2012-11-30 18:30:05 -05:00
Boris Zbarsky
d9cf3678cc Bug 812783. Add support for flagging callbacks as worker-only. r=khuey 2012-11-29 11:14:40 -05:00
Eric Faust
4cde2d46f9 Bug 747289 - Part 1/2 - Update Paris bindings to expose DOM constants. r=bz 2012-11-28 16:28:36 -05:00
Boris Zbarsky
15c58aff2b Bug 767933 part 1. Implement parser support for 'unrestricted float' and 'unrestricted double', and for the [LenientFloat] extended attribute. r=khuey 2012-11-27 15:32:05 -05: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
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
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
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
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
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
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
9dc86ac76f Bug 792137. [TreatNonCallableAsNull] lives on the callback type now. r=peterv 2012-10-10 15:53:02 -04:00
Boris Zbarsky
271c035440 Bug 792980. Don't force consumers to list descriptors for interfaces that are using all teh defaults. r=peterv
The new setup is:

* Consequential interfaces with no explicit descriptor are still skipped.
* If no information is provided about an interface, an empty descriptor is
  assumed.
* If a list is provided and the only entry is a worker descriptor, an empty
  main-thread descriptor is assumed.
2012-10-01 08:56:31 -04:00
Peter Van der Beken
c707cfbc30 Fix for bug 768684 (Fix sequence<any> return type in WebIDL). r=bz.
--HG--
extra : rebase_source : acbd2ce77f62146e9bd7fc285a8042073ed95722
2012-06-13 17:15:05 +02:00
Boris Zbarsky
7fcdacaf95 Bug 790273. Add support for [LenientThis] in WebIDL. r=peterv 2012-09-12 17:24:58 +01:00
Boris Zbarsky
82186c4dca Bug 742144. Implement support for typedefs in WebIDL. r=khuey 2012-09-06 10:23:51 -04:00
Ms2ger
c84831a407 Bug 763367 - Add support for [EnforceRange] and [Clamp]; r=bz 2012-09-06 09:25:03 +02:00
Boris Zbarsky
a860438a8a Bug 778044. Add a way to pref off Paris binding constructor objects. r=peterv 2012-09-05 13:37:28 -04:00
Boris Zbarsky
2ec1495f64 Bug 778150 part 2. Default methods to infallible. Allow annotation of fallible methods in WebIDL using [Throws]. r=peterv
[Throws] can either take no value, or can take MainThread or Workers if the
throwing behavior is only happening on main thread or in workers.
2012-09-05 09:21:33 -04:00
Boris Zbarsky
f7db6bf41a Bug 786105. Setting inline style properties to null should remove them, just like setting them to empty string does. r=peterv 2012-08-31 20:59:46 -04:00
Ehsan Akhgari
2ad8757e0c Bug 785459 follow-up: use the python 2.5 syntax 2012-08-24 16:47:45 -04:00
Ehsan Akhgari
27825ab40b Bug 785472 - The Web IDL parser should not allow inheriting from an interface that is only forward declared; r=khuey 2012-08-24 15:23:21 -04:00
Ehsan Akhgari
d48b3516a7 Backout changeset 1142882b6c0b (bug 785472) because it breaks the build 2012-08-24 16:22:42 -04:00
Ehsan Akhgari
a285473a01 Bug 785472 - The Web IDL parser should not allow inheriting from an interface that is only forward declared; r=khuey 2012-08-24 15:23:21 -04:00
Ehsan Akhgari
ab612930d9 Bug 785459 - Enable the WebIDL parser to be used stand-alone for syntax checking; r=khuey 2012-08-24 14:51:45 -04:00
Peter Van der Beken
f531239bc1 Fix for bug 742195 (Implement the extended attributes for null and undefined handling on strings in Paris bindings). r=bz. 2012-07-12 15:55:30 +02:00
Peter Van der Beken
854457d901 Fix for bug 768692 (Move DOM list binding generation to the new DOM binding codegen). r=bzbarsky.
--HG--
extra : rebase_source : 651a0fac4c9a87ef1c0a9cd91588c6421fd050c4
2012-05-22 15:46:20 +02:00
Boris Zbarsky
d7233f1cb3 Bug 771636 part 2. Implement default values for WebIDL enums. r=peterv 2012-07-31 00:22:23 -04:00
Boris Zbarsky
32ecc36c05 Bug 771636 part 1. Rearrange default-value handling so we actually set C++ values directly instead of round-tripping through jsval. r=peterv 2012-07-31 00:22:22 -04:00
Boris Zbarsky
c2d945d04f Bug 775844. Make sure to examine constructor signatures when looking for union types. r=peterv 2012-07-27 00:09:10 -04:00
Boris Zbarsky
8aaf82198b Bug 777415. Disallow GetterInfallible/SetterInfallible annotations where they don't make sense. r=khuey 2012-07-27 00:09:10 -04:00
Boris Zbarsky
b7908cda19 Bug 764456 part 5. Actually look at hasConcreteDescendant in hasInterfacePrototypeObject() so that we can avoid codegen for [NoInterfaceObject] interfaces hat are only implemented via "implements". r=peterv 2012-07-19 14:48:58 -04:00
Boris Zbarsky
0a1d212672 Bug 768537 part 1. Update parser support for dictionaries to spec changes. r=jlebar
There are several parts here:

1)  Enforce the requirement that dictionary arguments not followed by a required argument are optional.
2)  Make dictionaries no longer be distinguishable from nullable types.
3)  Disallow dictionaries or unions containing dictionaries inside a nullable type.
4)  Force optional dictionaries to have a default value of null so that codegen doesn't have to worry about dealing with
    optional arguments that have no default value in the IDL but need to be treated as if they were null.
2012-07-17 12:18:53 -04:00
Ed Morley
57e533a7ae Backout 9deb8edb5070 (bug 773519), ea5a243a60f1 & 0cad1e553bea (bug 768537) for compilation failures 2012-07-17 17:48:11 +01:00
Boris Zbarsky
a550b8943d Bug 768537 part 1. Update parser support for dictionaries to spec changes. r=jlebar
There are several parts here:

1)  Enforce the requirement that dictionary arguments not followed by a required argument are optional.
2)  Make dictionaries no longer be distinguishable from nullable types.
3)  Disallow dictionaries or unions containing dictionaries inside a nullable type.
4)  Force optional dictionaries to have a default value of null so that codegen doesn't have to worry about dealing with
    optional arguments that have no default value in the IDL but need to be treated as if they were null.
2012-07-17 12:18:53 -04:00
Boris Zbarsky
3e8ac4b134 Bug 757164. Move infallibility annotations into webidl. r=peterv
In this new setup, there are three new extended attributes: Infallible,
GetterInfallible, SetterInfallible.  The first one applies to both methods and
attributes, while the last two apply only to attributes.  Each one can be
either set with no value specified (in which case it applies both on main
thread and in workers) or can be set to MainThread or Workers to limit where it
applies.

If Infallible is set on an attribute, then GetterInfallible and
SetterInfallible will be ignored.  So if you want to specify, for example, an
attribute that's infallible on the main thread and has an infallible getter in
workers, the right way to do that is [GetterInfallible,
SetterInfallible=MainThread].
2012-07-13 19:29:14 -04:00
Boris Zbarsky
79f324124f Bug 767352. Keep track of a method's overloads in a list of IDLMethodOverload objects. r=jlebar 2012-07-06 12:21:24 -04:00
Boris Zbarsky
62837584c4 Bug 768190. Don't allow [TreatNullAs] or [TreatUndefinedAs] on dictionary members. r=jlebar 2012-06-30 01:53:32 -04:00
Boris Zbarsky
a7c253d8cc Bug 767546. Make the WebIDLError constructor take a list of locations. r=jlebar 2012-06-30 01:53:28 -04:00
Boris Zbarsky
642a039769 Bug 768085. Speed up WebIDL tests and make them more usable by pickling the datastructures Yacc produces for the grammar and shutting up the logging it does in the debug mode we force it into. r=khuey 2012-06-25 23:35:42 -04:00
Peter Van der Beken
b6c85dca77 Fix for bug 756258 (Support union types in new DOM bindings). r=bz.
--HG--
extra : rebase_source : 5352801a4eb5085f73a5b6e78aa238c5c9d44179
2012-05-18 23:25:47 +02:00
Peter Van der Beken
2b749452b1 Fix for bug 765467 (Fix special operations in the WebIDL parser). r=khuey.
--HG--
extra : rebase_source : 4186629224c5e822473de1931604970106c721a6
2012-05-22 12:02:21 +02:00
Boris Zbarsky
2370b212ad Bug 766853 followup to address review comment. No review other than the other review. 2012-06-22 16:21:44 -04:00
Boris Zbarsky
abe2e98f40 Bug 766853. The two sides of an implements statement must both be non-callback interfaces. r=jlebar 2012-06-22 16:18:51 -04:00
Boris Zbarsky
63b0366493 Bug 766844. Non-callback interfaces must not inherit from callback interfaces. r=jlebar 2012-06-22 16:18:51 -04:00
Boris Zbarsky
85ad2a87de Bug 742152. Move distinguishing index determination and verification of type-identity of preceding arguments out of codegen and into the WebIDL parser. r=jlebar 2012-06-22 16:18:50 -04:00
Boris Zbarsky
8a229b6dcb Bug 742213. isDistinguishableFrom should correctly check whether two interfaces can be implemented on the same object. r=jlebar 2012-06-22 16:18:50 -04:00
Boris Zbarsky
4df159829d Bug 764456 part 1. Flag consequential interfaces in the WebIDL data model. r=khuey 2012-06-22 16:18:50 -04:00