Files
servo/components/script_bindings/third_party/WebIDL/builtin-array.patch
Jonathan Schwender 9069043477 Move ply and WebIDL into script_bindings (#43180)
This is required to publish script_bindings, since all files used during
codegen need to be there.
It might also be possible to generate the bindings ahead of time and
vendor them in-tree, but this seems painful to setup from a CI
perspective.
Since there don't seem to be any other users in-tree we can just vendor
into the script-bindings directory.

`ply` is licensed under the BSD 3 clause, and WebIDL under MPL-2.0, with
the licenses available in our cargo package. Both tools won't end up in
`servo` since they are build-time dependencies, so I believe we don't
need to adjust the crate license, or configure `about.toml`.

Testing: Should be covered by existing tests. We don't test if this
allows vendored builds or published builds.
Fixes: Partial fix for #43145

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-03-12 05:44:46 +00:00

50 lines
1.9 KiB
Diff

--- WebIDL.py
+++ WebIDL.py
@@ -2549,6 +2549,17 @@ class IDLType(IDLObject):
"object",
# Funny stuff
"interface",
+ "int8array",
+ "uint8array",
+ "int16array",
+ "uint16array",
+ "int32array",
+ "uint32array",
+ "float32array",
+ "float64array",
+ "arrayBuffer",
+ "arrayBufferView",
+ "uint8clampedarray",
"dictionary",
"enum",
"callback",
@@ -3842,17 +3853,17 @@ class IDLBuiltinType(IDLType):
Types.utf8string: IDLType.Tags.utf8string,
Types.jsstring: IDLType.Tags.jsstring,
Types.object: IDLType.Tags.object,
- Types.ArrayBuffer: IDLType.Tags.interface,
- Types.ArrayBufferView: IDLType.Tags.interface,
- Types.Int8Array: IDLType.Tags.interface,
- Types.Uint8Array: IDLType.Tags.interface,
- Types.Uint8ClampedArray: IDLType.Tags.interface,
- Types.Int16Array: IDLType.Tags.interface,
- Types.Uint16Array: IDLType.Tags.interface,
- Types.Int32Array: IDLType.Tags.interface,
- Types.Uint32Array: IDLType.Tags.interface,
- Types.Float32Array: IDLType.Tags.interface,
- Types.Float64Array: IDLType.Tags.interface,
+ Types.ArrayBuffer: IDLType.Tags.arrayBuffer,
+ Types.ArrayBufferView: IDLType.Tags.arrayBufferView,
+ Types.Int8Array: IDLType.Tags.int8array,
+ Types.Uint8Array: IDLType.Tags.uint8array,
+ Types.Uint8ClampedArray: IDLType.Tags.uint8clampedarray,
+ Types.Int16Array: IDLType.Tags.int16array,
+ Types.Uint16Array: IDLType.Tags.uint16array,
+ Types.Int32Array: IDLType.Tags.int32array,
+ Types.Uint32Array: IDLType.Tags.uint32array,
+ Types.Float32Array: IDLType.Tags.float32array,
+ Types.Float64Array: IDLType.Tags.float64array,
Types.ReadableStream: IDLType.Tags.interface,
}