Commit Graph

58 Commits

Author SHA1 Message Date
Boris Zbarsky
d5b5a81973 Bug 869014. Don't allow name collisions between external interfaces and other objects. r=khuey 2013-05-09 13:08:29 -04:00
Ryan VanderMeulen
1b533138b8 Backed out 6 changesets (bug 868996, bug 867903, bug 869014, bug 870219, bug 861587) for PGO bustage.
CLOSED TREE
2013-05-09 17:11:59 -04:00
Boris Zbarsky
ea008c86cd Bug 869014. Don't allow name collisions between external interfaces and other objects. r=khuey 2013-05-09 13:08:29 -04:00
Boris Zbarsky
c192be59aa Bug 742206 part 2. Implement WebIDL parser support for Date. r=smaug,khuey 2013-05-02 14:38:19 -04:00
Reuben Morais
a9e6bfba22 Bug 864578 - Follow up, fixing test.
--HG--
extra : rebase_source : ace505d178de7ce66e5733df74291b31471a0202
2013-04-22 18:22:47 -07:00
Reuben Morais
a5f7e797a4 Bug 864578 - Allow NamedConstructor and NoInterfaceObject in the same interface. r=bz
--HG--
extra : rebase_source : 1c15c840a72539cfd97d54dbaef4908b1571aefa
2013-04-22 18:05:25 -07:00
Olli Pettay
b1ddad7f2c Bug 863094 - Infinity/-Infinity/NaN defaults for unrestricted types, r=bz
--HG--
extra : rebase_source : c2495008be9b084656222e6a0773c72d5224e9cc
2013-04-18 19:58:01 +03:00
Boris Zbarsky
01b9201374 Bug 859503. Make unknown extended attributes into parse errors. r=khuey 2013-04-10 13:49:06 -04:00
Boris Zbarsky
7f2a3c9dd0 Bug 837339. Re-disallow nullable dictionary members inside dictionaries. r=khuey 2013-03-14 15:42:59 -04:00
Pranav Ravichandran
d8ca91d555 Bug 847928 - Element type of a WebIDL array must not be a sequence or dictionary type. r=bzbarsky 2013-03-06 13:06:23 -05:00
Pranav Ravichandran
6219840c22 Bug 836816 - WebIDL parser should enforce spec restrictions on dictionary member types. r=bzbarsky 2013-02-27 09:55:56 -05:00
Kyle Huey
36a231a8ac Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted 2013-02-24 12:36:44 -08:00
Boris Zbarsky
1fc37c44da Bug 822470 part 4. Expose the concept of "single operation interface" in the WebIDL data model. r=peterv 2013-01-28 08:34:30 -05:00
William Chen
db2ddd0bfd Bug 828532 - Removed 'prototype' as a reserved identifier in WebIDL. r=bz 2013-01-10 11:54:13 -08:00
Boris Zbarsky
5fd2bbb94f Bug 824237. Add support for "partial interface" to WebIDL parser. r=khuey 2013-01-10 10:49:07 -05:00
Boris Zbarsky
d19479dcd6 Bug 820665 part 1. More WebIDL spec updates to changes in how dictionaries work. r=khuey
Specifically, the following changes:

1) A union that includes a dictionary and is the last non-optional
   argument must actually be marked optional, just like a dictionary
   argument.
2) Disallow a union from containing both a nullable type and a dictionary.
3) Now all non-Date and non-RegExp objects can be used as dictionaries,
   including from overload resolution and union conversion.

We don't support dictionaries inside unions yet, or unions as
distinguishing args, so the spec changes to do with converting null to
dictionaries inside a union or picking the union overload if there is
a union containing a dictionary and null is the distinguishing arg
value are not relevant to us so far.
2013-01-03 14:03:00 -05:00
Boris Zbarsky
2c128858e0 Bug 821580. Disallow [Unforgeable] on static attributes, per spec update. r=khuey 2013-01-02 22:03:25 -05:00
Boris Zbarsky
6ed64d61c5 Bug 819845. Update WebIDL bindings to spec change: sequences/arrays are no longer distinguishable from dictionaries, and conversion to a sequence works on arbitrary objects. r=khuey 2013-01-02 22:03:25 -05:00
Boris Zbarsky
675e9c743e Bug 821438. Allow inheritance from interfaces with Unforgeable attributes. r=peterv 2012-12-14 14:10:50 -05:00
Boris Zbarsky
4240d9a262 Bug 815502. Implement support for variadic arguments in WebIDL. r=peterv 2012-12-11 17:50:56 -05:00
Benoit Jacob
f5d2c58055 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
11ebd08a60 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
0483bf931f Bug 806033. Finish getting rid of stray [Infallible] annotation bits. r=khuey 2012-11-05 14:40:33 -05:00
Boris Zbarsky
888a7ed3bc Bug 804319. Implement parsing of the "stringifier;" shorthand. r=khuey 2012-11-05 14:40:32 -05:00
Ehsan Akhgari
463e083c2e 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
d7322eea5c 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
f2b84a3ae9 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
ac7e3e09f9 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
1ecbdb1149 Bug 792137. [TreatNonCallableAsNull] lives on the callback type now. r=peterv 2012-10-10 15:53:02 -04:00
Boris Zbarsky
c0a96f3008 Bug 790273. Add support for [LenientThis] in WebIDL. r=peterv 2012-09-12 17:24:58 +01:00
Boris Zbarsky
591d969173 Bug 742144. Implement support for typedefs in WebIDL. r=khuey 2012-09-06 10:23:51 -04:00
Ehsan Akhgari
0ab97da3c8 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
b1634fb871 Backout changeset 1142882b6c0b (bug 785472) because it breaks the build 2012-08-24 16:22:42 -04:00
Ehsan Akhgari
28893c29cf 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
Boris Zbarsky
f9ac7c28ba Bug 771636 part 2. Implement default values for WebIDL enums. r=peterv 2012-07-31 00:22:23 -04:00
Boris Zbarsky
a64bcb8bb8 Bug 777415. Disallow GetterInfallible/SetterInfallible annotations where they don't make sense. r=khuey 2012-07-27 00:09:10 -04:00
Boris Zbarsky
8e925299c6 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
8a2ea81bc5 Backout 9deb8edb5070 (bug 773519), ea5a243a60f1 & 0cad1e553bea (bug 768537) for compilation failures 2012-07-17 17:48:11 +01:00
Boris Zbarsky
56133baee1 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
7d734037c4 Bug 768190. Don't allow [TreatNullAs] or [TreatUndefinedAs] on dictionary members. r=jlebar 2012-06-30 01:53:32 -04:00
Boris Zbarsky
7f6400efa5 Bug 767546. Make the WebIDLError constructor take a list of locations. r=jlebar 2012-06-30 01:53:28 -04:00
Peter Van der Beken
7efab19797 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
1e00518240 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
c1cd32f316 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
bb2335a09e Bug 766844. Non-callback interfaces must not inherit from callback interfaces. r=jlebar 2012-06-22 16:18:51 -04:00
Boris Zbarsky
3e7e99e0c5 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
c5731be201 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
d991f38a07 Bug 763724. Detect cycles in the interface inheritance and implementation graph. r=jlebar 2012-06-21 12:29:11 -04:00
Boris Zbarsky
22dc1c73f5 Bug 764698. Fix isDistinguishableFrom for dictionaries to work right. r=peterv 2012-06-21 12:29:11 -04:00
Boris Zbarsky
b38a6f1231 Bug 742153 part 1. Add support for dictionaries in the WebIDL parser. r=khuey 2012-06-12 10:22:05 -04:00