Commit graph

2058 commits

Author SHA1 Message Date
Logan Rosen
f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Olli Pettay
489c29f6cb Bug 1851333 - Add BinaryType dictionary member annotation to let the generated member variables use different type, r=edgar
We need a separate bug to document all the special annotations dictionaries have, including things for json etc.

Differential Revision: https://phabricator.services.mozilla.com/D187337
2023-09-05 16:26:18 +00:00
Peter Van der Beken
fa69f2861a Bug 1841325 - Allow ClassItems to be grouped. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D182596
2023-07-04 14:28:31 +00:00
Peter Van der Beken
36003fd793 Bug 1803752 - Make CSS2Properties getters and setters use a common generated implementation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181106
2023-06-22 08:12:07 +00:00
Kelsey Gilbert
8acce1d525 Bug 1838703 - [dom/bindings] Mark SetAsFoo() as nodiscard. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D181140
2023-06-21 16:29:19 +00:00
Sandor Molnar
53e2e84520 Backed out 2 changesets (bug 1803752) for causing python mbu failures in dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py CLOSED TREE
Backed out changeset 0a06638b1f49 (bug 1803752)
Backed out changeset 3e1599493e2e (bug 1803752)
2023-06-20 21:35:33 +03:00
Peter Van der Beken
f1c25edf31 Bug 1803752 - Make CSS2Properties getters and setters use a common generated implementation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D181106
2023-06-20 16:32:06 +00:00
Peter Van der Beken
b74f99371e Bug 1838818 - Shrink NativePropertyHooks by moving hooks for indexed or named properties to a separate struct. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D181224
2023-06-20 12:16:00 +00:00
Peter Van der Beken
e60bb840bb Bug 1838818 - Give interface objects their own DOMJSClass. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D181223
2023-06-20 12:16:00 +00:00
Peter Van der Beken
c0bd0c45c9 Bug 1838797 - Rename namedConstructor to legacyFactoryFunction everywhere. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D181210
2023-06-19 15:48:58 +00:00
Peter Van der Beken
a5361fdb4a Bug 1838797 - Only assert slot indexes if we're using them. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D181209
2023-06-19 15:48:58 +00:00
WhiteMind
cfa5030891 Bug 1782776 - Include guards generated by mach webidl-example do not align with C++ coding style. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D175547
2023-06-15 12:22:38 +00:00
Nika Layzell
bfebcdae69 Bug 1837090 - Support [NeedsSubjectPrincipal] on workers, r=peterv
We've supported nsIPrincipal off-main-thread since bug 1443925, and
nsIPrincipal has been used as the JSPrincipals on workers and worklets
since bug 1804093.

This change updates the signature of these methods to match the main
thread, and provides the subject principal off-main-thread as well as on
the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D180158
2023-06-07 15:58:51 +00:00
Peter Van der Beken
c00606a3ff Bug 1828264 - Assertion from creating a OffscreenCanvas on a media track graph thread. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D178173
2023-06-06 06:51:34 +00:00
Edgar Chen
5efbb426be Bug 1836127 - Nullable union used as callback arguments needs to be actually declared; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D176127
2023-06-02 09:47:46 +00:00
Cosmin Sabou
1f2010dee4 Backed out 2 changesets (bug 1828264) for causing xpcshell failures on test_upgrade_add_index.js. CLOSED TREE
Backed out changeset 8c256ebacc5a (bug 1828264)
Backed out changeset 81e8bc2a7253 (bug 1828264)
2023-05-31 21:50:21 +03:00
Peter Van der Beken
e0aec88fdf Bug 1828264 - Assertion from creating a OffscreenCanvas on a media track graph thread. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D178173
2023-05-31 16:00:31 +00:00
Norisz Fay
968ef96aa7 Backed out 2 changesets (bug 1828264) for causing multiple failures CLOSED TREE
Backed out changeset 6f8b0b36ee84 (bug 1828264)
Backed out changeset 18efba6ba1de (bug 1828264)
2023-05-30 11:58:03 +03:00
Peter Van der Beken
ddd665fbff Bug 1828264 - Assertion from creating a OffscreenCanvas on a media track graph thread. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D178173
2023-05-30 07:39:17 +00:00
Edgar Chen
5c497cc6bf Bug 1829311 - Fix build error when a callback has multiple union types as arguments; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D176126
2023-05-16 12:03:52 +00:00
Kelsey Gilbert
bd114c4d9c Bug 1829025 - Add dom::FooOrBar::GetType() for bindings. r=peterv
Also add a first use-case.

Differential Revision: https://phabricator.services.mozilla.com/D175968
2023-05-02 02:47:31 +00:00
Ms2ger
2d692f5838 Bug 1765992 - Support regular and static WebIDL operations with the same identifier; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D171216
2023-03-30 12:56:35 +00:00
Andi-Bogdan Postelnicu
fa5d4cca1f Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 11:35:33 +00:00
Stanca Serban
e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu
0b692b5a96 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 09:27:57 +00:00
Stanca Serban
77aa495f94 Backed out 4 changesets (bug 1765992, bug 1823148) for causing multiple failures. CLOSED TREE
Backed out changeset fc5514b8c974 (bug 1823148)
Backed out changeset f1557bbb7e52 (bug 1765992)
Backed out changeset 605a523fd68f (bug 1765992)
Backed out changeset a4b61f52eb59 (bug 1765992)
2023-03-21 12:51:09 +02:00
Ms2ger
f4e42cdc76 Bug 1765992 - Support regular and static WebIDL operations with the same identifier; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D171216
2023-03-21 09:50:20 +00:00
Cosmin Sabou
8d7a73ea59 Backed out 3 changesets (bug 1765992) for causing WebIDLError linting opt failures. CLOSED TREE
Backed out changeset 3861a5ec6941 (bug 1765992)
Backed out changeset 70ee010fff60 (bug 1765992)
Backed out changeset ae92922b3b3a (bug 1765992)
2023-03-15 18:15:39 +02:00
Ms2ger
ee5e91d905 Bug 1765992 - Support regular and static WebIDL operations with the same identifier; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D171216
2023-03-15 15:44:42 +00:00
Edward Thomas
90f5fa7210 Bug 1622677 - Make dom/bindings flake8 compliant. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D160902
2023-02-24 13:53:21 +00:00
Peter Van der Beken
5382860158 Bug 1814235 - Union in CanvasRenderingContext2D.webidl fails to compile. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D169006
2023-02-08 14:59:14 +00:00
Peter Van der Beken
68c4f242d6 Bug 1806994 - Define @@toStringTag on Xrays for namespace objects. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165459
2023-01-09 22:19:53 +00:00
Norisz Fay
763b11dc22 Backed out 3 changesets (bug 1806994) for causing failures on test_bug1112014.html CLOSED TREE
Backed out changeset abb5cca27825 (bug 1806994)
Backed out changeset e89aa95fa286 (bug 1806994)
Backed out changeset e5185a9c05fb (bug 1806994)
2023-01-05 13:22:41 +02:00
Peter Van der Beken
d304a1e132 Bug 1806994 - Define @@toStringTag on Xrays for namespace objects. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165459
2023-01-05 09:51:41 +00:00
Iulian Moraru
f7d7b3f71e Backed out changeset 02b8e04c764c (bug 1622677) for causing multiple failures related to WebIDL. CLOSED TREE 2022-12-17 12:00:00 +02:00
Edward Thomas
74a55649b4 Bug 1622677 - Make dom/bindings flake8 compliant. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D160902
2022-12-17 09:48:10 +00:00
Peter Van der Beken
ffc71c85c1 Bug 1746997 - Infinite recursion in FontFaceSet_Binding. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163675
2022-12-02 12:20:52 +00:00
Peter Van der Beken
f8868855ed Bug 1792883 - Stop requiring a mutable handle for converting to a WebIDL union. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D158360
2022-09-30 06:40:26 +00:00
Peter Van der Beken
9e85242679 Bug 1792444 - Switch some WebIDL APIs from 'any' to a union with 'undefined'. r=edgar,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D158195
2022-09-28 19:10:51 +00:00
Edgar Chen
5151189f4d Bug 1784266 - Part 8: Hide union TrySetTo* methods; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D156197
2022-09-28 08:56:09 +00:00
Edgar Chen
3410f7bc19 Bug 1784266 - Part 4: Generate init methods for union; r=peterv
And switch to use `Init` method in binding code.

Differential Revision: https://phabricator.services.mozilla.com/D156176
2022-09-28 08:56:07 +00:00
Edgar Chen
1aa03613fa Bug 1784266 - Part 3: Get rid of union conversion structure; r=peterv
TrySetTo* conversion methods are generated in the regular union structure now.

Differential Revision: https://phabricator.services.mozilla.com/D157327
2022-09-28 08:56:07 +00:00
Edgar Chen
82be3e6295 Bug 1784266 - Part 2: Stop using the union conversion structure to root Record/Sequence type; r=peterv
Remove the conditional *Rooter member in the union conversion structure and switch
the regular union structure to use Rooted* for Record and Sequence that contains
js object (like what we do for Dictionary type). Codegen introudces a new type on
isMember in getJSToNativeConversionInfo() as we need to generate different conversion
code for Sequence and Record if they are union member which now use Rooted* instead
of *Rooter to root js object.

Differential Revision: https://phabricator.services.mozilla.com/D157326
2022-09-28 08:56:06 +00:00
Edgar Chen
587c7f6dd0 Bug 1784266 - Part 1: Move union conversion code generator to getUnionConversionTemplate; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D156175
2022-09-28 08:56:06 +00:00
Peter Van der Beken
b6baa7702e Bug 1782400 - Implement "return" method for WebIDL async iterable iterator. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D156350
2022-09-22 18:28:18 +00:00
Peter Van der Beken
b8156bbc41 Bug 1777145 - Don't expose Wrap for WebIDL iterable iterator objects outside of binding code. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D156348
2022-09-22 18:28:18 +00:00
Peter Van der Beken
b79090edf7 Bug 1777145 - Store the WebIDL iterable iterator's data directly in the iterator. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D156347
2022-09-22 18:28:17 +00:00
Peter Van der Beken
aef7bf7e9c Bug 1777145 - Iterable iterators don't need aGivenProto. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D156346
2022-09-22 18:28:17 +00:00
Peter Van der Beken
4bf997b37a Bug 1777145 - Expose the Wrap function for WebIDL iterable iterators through a template argument instead of as a function pointer member. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D156344
2022-09-22 18:28:16 +00:00
Peter Van der Beken
3e507adf99 Bug 1788969 - Align async iterable code more closely with the spec. r=edgar
Implement the common steps for the next method from
https://webidl.spec.whatwg.org/#es-asynchronous-iterator-prototype-object in
a base class, that all async iterable iterator objects inherit from. Natives
that implement an async iterable only need to implement the "getting the
next iteration result" part in their GetNextPromise method. This means they
don't have to create the object according to "CreateIterResultObject"
themselves, but can just create promise and often resolve it with a native
value directly. We've switched to a special JS::Value to signal "end of
iteration", but that's hidden inside the
iterator_utils::ResolvePromiseForFinished helper.
The WebIDL parser now uses the right return type for the generated "next"
method, which means that any exceptions in the binding code itself will
actually be correctly converted to a rejected promise instead of being
rethrown.
This also uses a class for the generated iterable iterator that's not
exposed outside the binding code. No other code should create and/or
wrap these anyway.

Differential Revision: https://phabricator.services.mozilla.com/D156323
2022-09-22 18:28:15 +00:00