aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
Commit message (Collapse)AuthorAgeFilesLines
* script: Move code generation and webidl files to new script_bindings crate. ↵Josh Matthews2025-01-241-553/+0
| | | | | (#35157) Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Create two-phase initialization for generated JS engine bindings (#34366)Josh Matthews2024-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Generate a runtime initialization for static JS binding information. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Replace dummy static initializers with OnceLock. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Only initialize statics for DOM interfaces with interface objects. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Remove one unnecessary Box::leak usage. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Tidy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide thread-unsafe OnceLock usage inside of a wrapper type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mark ThreadUnsafeOnceLock::get unsafe. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Simplify ThreadUnsafeOnceLock internals. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Support custom derives for generated types (#34356)Josh Matthews2024-11-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Derive more Default implementations for dictionaries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Support arbitrary derives on generated enums. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Support arbitrary derives for generated dictionaries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Support arbitrary derives for generated unions. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Derive more impls for generated dicts and unions. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Implement FromStr for generated enums. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * crown: Allow returning unrooted values from Default::default. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Propagate `CanGc` from `Document::new()` (#33386)Andriy Sultanov2024-09-091-0/+1
| | | | | | | | | | | | | * Add canGc as a parameter to autogenerated trait methods Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> * Propagate CanGc from Document::new() Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> --------- Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* Update WebIDL.py (#32495)Ngo Iok Ui (Wu Yu Wei)2024-06-151-5/+5
| | | | | | | | | | | | | | | | | * Update WebIDL.py * Update WebIDL.py * Add builtin-array.patch * Fix CodegenRust.py and Configuration.py * Fix missing downcasts * mach fmt * Update check and comment to explain why we need this check * Update Global of DissimilarOriginWindow.webidl
* webgpu: Move errorscopes to WGPU thread (#32304)Samson2024-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | * Prepare errorscopes logic in wgpu_thread * remove scope_id from ipc * new GPUErrors per spec * remove cotent timeline error_scope * fixup poperrorscope types * device_scope -> gpu_error and nice errors * Handle errors detection more elegantly * good expectations * new expectations * Make error_scope.errors Vec as per spec
* Revert "script: implement AbortController (#31361)" (#32243)Samson2024-05-071-1/+0
| | | This reverts commit 7fce850cffb72a6fbcf763a40164a9b35b7fa833.
* script: implement AbortController (#31361)Smitty2024-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | * Implement AbortController Signed-off-by: syvb <me@iter.ca> * Update WPT tests Signed-off-by: syvb <me@iter.ca> * Address review comments * Fix duplicate import generation * Update WPT test expectations * Change expectation to FAIL for flaky test --------- Signed-off-by: syvb <me@iter.ca>
* Fix trivial typo in variable name (#31143)Olivier Tilloy2024-01-211-2/+2
|
* Codegen support multiple interfaces in single webidl file & WebGPU single ↵Samson2023-09-301-2/+16
| | | | | | | | | webidl (#30448) * Codegen support multiple interfaces in single webidl file * Merge GPU*.webidl into WebGPU.webidl * Update gpu files to use WebGPUBinding module file
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-1/+1
| | | | | * Update Codegen.py to emit Foo_Binding instead of FooBinding * s/FooBinding/Foo_Binding/g
* Impl Setlike and Maplike (#30237)Samson2023-09-061-3/+7
| | | | | | | | | | | | | | | | | | | * MallocSizeOf for Index{Set, Map} * like as iterable in WebIDL * Codegen magic for like interfaces * TestBinding for like * Test for Setlike and Maplike test bindings * Some fixes * Switch to any.js * nit * Keep order
* apply pylbrecht/servo/named.window.getter (closes #27952)Delan Azabani2023-03-231-1/+11
|
* Fix Codegensagudev2023-02-201-7/+7
|
* feat(script): implement some of the non-ordinary internal methods of `Location`yvt2021-07-161-0/+8
| | | | | | | | | | | | | | | <https://html.spec.whatwg.org/multipage/#the-location-interface> - `[[GetPrototypeOf]]`: not yet - `[[SetPrototypeOf]]`: not yet - `[[IsExtensible]]`: `proxyhandler::is_extensible` - `[[PreventExtensions]]`: `proxyhandler::prevent_extensions` - `[[GetOwnProperty]]`: `CGDOMJSProxyHandler_getOwnPropertyDescriptor` (updated) - `[[DefineOwnProperty]]`: `CGDOMJSProxyHandler_defineProperty` (updated) - `[[Get]]`: `CGDOMJSProxyHandler_get` (updated) - `[[Set]]`: not yet - `[[Delete]]`: `CGDOMJSProxyHandler_delete` (updated) - `[[OwnPropertyKeys]]`: `CGDOMJSProxyHandler_ownPropertyKeys` (updated)
* Port some code to Python3Vincent Ricard2021-02-181-6/+6
|
* dom: Generate iterator symbol for interfaces with indexed getters.Josh Matthews2020-07-091-0/+3
|
* Fix remaining flake8 warningsKagami Sascha Rosylight2020-06-211-33/+44
|
* rename compartment to realmKunal Mohan2020-01-241-1/+1
|
* Fix tidiness errors for Python3 compatibility across whole repomarmeladema2019-12-111-2/+4
|
* Convert [HTMLConstructor] as constructor extensionKagami Sascha Rosylight2019-10-191-2/+6
|
* Remove [PrimaryGlobal]Kagami Sascha Rosylight2019-10-031-5/+0
|
* Support default toJSON in WebIDLKagami Sascha Rosylight2019-07-241-0/+4
|
* Add an inCompartments config for bindingsBastien Orivel2019-05-241-0/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Use 2018-style paths in generated DOM bindingsSimon Sapin2018-11-061-6/+6
|
* Update the WebIDL parserAnthony Ramine2018-04-031-2/+0
|
* Import sequence inner types if it appears in dictionary membersKeith Yeung2017-11-081-2/+8
|
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-1/+1
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Generate GetConstructorObject for all interfacesConnor Brewster2017-06-131-1/+5
|
* Remove unused Descriptor.needsRooting field.Ms2ger2017-02-081-3/+0
|
* Don't generate constructor IDs for inline interfacesAnthony Ramine2017-01-031-0/+2
|
* Implement [Inline] interfacesAnthony Ramine2016-10-061-2/+9
| | | | | Inline interfaces just appear as a Rust type and in the TypeId hierarchy. They are completely invisible on the JS side.
* Ensure Promise "reflector" is not GCed before the Rust object.Josh Matthews2016-09-221-1/+2
|
* Implement binding support for returning and accepting Promises in WebIDL.Josh Matthews2016-09-221-2/+10
|
* Implement WebIDL namespacesAnthony Ramine2016-09-081-7/+15
|
* Implement pair iterators in WebIDL interfaces.Josh Matthews2016-08-241-2/+26
|
* Support multiple WebIDL interfaces being generated in the same output ↵Josh Matthews2016-08-241-4/+10
| | | | | | | | | | | | | binding file. Each interface gets its own module named ${Interface}Binding. Structs, enums, and callbacks continue to use the root module of the binding file. If there is only one interface in the file, we generate reexports for several public APIs and types so that existing DOM implementations don't need any modifications. When multiple interfaces exist, the reexported names get the interface name prepended (eg. FooWrap instead of Wrap). As part of this work, stop glob-importing all DOM types in every generated binding and start generating more targeted lists of relevant types based on the methods, members, etc. of WebIDL types that are in use.
* Generate a list of supported DOM APIs from parsed WebIDLs.Josh Matthews2016-07-151-0/+2
|
* Implement the [Exposed] extended attribute on interfaces.Ms2ger2016-07-121-0/+2
| | | | Fixes #2823.
* Make sure that Descriptor.isGlobal() returns a bool.Ms2ger2016-07-121-2/+2
|
* Support WindowProxy return values in bindingsJansen Jan2016-06-091-4/+6
| | | | unscopable
* Forbid unconditionally-exposed interfaces that inherit from ↵Josh Matthews2016-05-021-0/+6
| | | | conditionally-exposed ones.
* Support controlling the visibility of WebIDL interfaces via the Pref annotation.Josh Matthews2016-04-291-0/+3
|
* Use os.path.basename instead of split('/')[-1]Zbynek Winkler2016-04-171-1/+3
| | | | Fixes #10596.
* Cache legacy callback interface objects in proto_or_icache_arrayAnthony Ramine2016-02-251-0/+4
| | | | | We need them to be cached to not instantiate them multiple times with lazy initialisation.
* generate typedefs in CodegenRustPrabhjyot Singh Sodhi2016-01-261-0/+4
|
* Introduce Descriptor.prototypeDepthAnthony Ramine2016-01-121-0/+1
|
* Auto merge of #8993 - nox:small-codegen-slimming, r=Ms2gerbors-servo2015-12-181-1/+1
|\ | | | | | | | | | | | | | | | | | | Slightly reduce the output of codegen Interfaces which we know are never instantiated can generate less code. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8993) <!-- Reviewable:end -->
| * Link [Abstract] to the existing concrete descriptor fieldAnthony Ramine2015-12-161-1/+1
| | | | | | | | | | | | This makes codegen not emit anything strictly related to the interface which are never used in the case of abstract interfaces, such as the Wrap method or the DOMJSClass.