Commit graph

822 commits

Author SHA1 Message Date
Josh Matthews
60ef6bc461
Start marking functions that can transitively trigger a GC (#33144)
* Mark JS reflector wrappers as CanGc.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Propagate CanGc from reflect_dom_object_with_proto.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Mark DOM constructors as GC operations.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-08-22 11:42:36 +00:00
Koki Saito
280063eee2
Make string formatting more consistent in CodegenRust.py (#33096)
* fix: Replace string concatenation with f-string

Signed-off-by: Koki Saito <saitoto828@gmail.com>

* fix: Replace substitute method with f-string

Signed-off-by: Koki Saito <saitoto828@gmail.com>

* fix: Cleanup unused function `onFailureInvalidEnumValue`

Signed-off-by: Koki Saito <saitoto828@gmail.com>

* fix: Replace %formatting with f-string

Signed-off-by: Koki Saito <saitoto828@gmail.com>

* fix: Fix some typo

Signed-off-by: Koki Saito <saitoto828@gmail.com>

* fix: Lint

Signed-off-by: Koki Saito <saitoto828@gmail.com>

---------

Signed-off-by: Koki Saito <saitoto828@gmail.com>
Co-authored-by: kokisaito <kosaito@indeed.com>
2024-08-18 05:02:11 +00:00
Koki Saito
db312319ae
fix: Replace callargs_is_constructing with is_constructing method (#33101)
Signed-off-by: Koki Saito <saitoto828@gmail.com>
Co-authored-by: kokisaito <kosaito@indeed.com>
2024-08-18 01:48:39 +00:00
Daniel Adams
20273b062a
webxr: Update XRSession to latest spec (#33059)
* Add missing XRSession members, initial implementations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Implement supportedFramerates getter

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Implement framerate changes, add spec links

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update WPT expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* ./mach fmt

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec link

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-08-17 03:36:52 +00:00
Taym Haddadi
c01b733523
Update codegen for GetOpener:inRealms in Bindings.conf (#33062)
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-08-15 13:42:50 +00:00
Samson
68f4b359c5
Add exception to rejection logic in generic_call (#32950)
* exception in JS Promise

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* EXCEPTION_TO_REJECTION on generic_call

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* PromiseRejectionEvent should handle promise as object

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-08-06 17:12:31 +00:00
Samson
5e59988c87
webgpu: Use wgpu's instead of string errors and update limits handling (#32925)
* Use wgpu specific errors

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixup expect

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* WIP

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Fix records erasing enforcerange

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* page can already be destroyed

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Support more limits

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Set good results

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Set OK (not PASS) expect CRASH

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixup expectation

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* bad expectations

https://github.com/gfx-rs/wgpu/issues/6075
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* set bad expectation

render bundleencoder needs to be rewritten

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-08-04 17:19:46 +00:00
Samson
f3bec0aed3
bindings: Convert certain Exceptions into Promise rejections (#32923)
* Impl promise exception to rejection for methods

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Impl promise exception to rejection for getters

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Impl promise exception to rejection for static methods

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Add tests for exception to rejection

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-08-03 12:58:37 +00:00
Rémy SAISSY
eac54183c1
clippy: components/script/realms (#32859)
Signed-off-by: Rémy Saissy <remy.saissy@gmail.com>
2024-07-26 10:15:02 +00:00
Daniel Adams
2c17de7fa7
Gamepad: Implement GamepadHapticActuator (#32046)
* Implement Servo side of GamepadHapticActuator

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Get build working

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Create effect handling on embedder side

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update tracing for GamepadHapticEffect

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update gilrs to point to commit with effect complete event

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Implement playing and preempting haptic effects

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update IDL to add trigger rumble

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update WPT expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Handle stopping haptic effects from reset()

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* ./mach fmt, fix test-tidy issues

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add extra validity checks for trigger rumble

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Retrieve supported haptic effects from embedder

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Fix test expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec link, pin gilrs commit

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* servoshell cargo formatting

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Fix Cargo.toml

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Additional comments, realm proof, naming

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* ./mach fmt

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update gilrs rev to gilrs-core 0.5.12 release

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Implement sequence ids for gamepad haptic promises

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Take playing effect promise instead of cloning

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Implement listener for reset function

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Fix Cargo.lock

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Restructure IPC listeners, add comments, handle visibility change

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Check that haptic effect still exists before handling ff completion event

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Visibility steps, add InRealm bindings for promises

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add Gamepad EmbedderMsg arms to egl servo_glue

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-07-20 06:29:27 +00:00
Danila Matveev
0189b89fd1
Fixes typo in clippy::enum_variant_names (#32784)
Signed-off-by: Danila Matveev <optician_owl@fastmail.com>
Signed-off-by: Danila Matveev <usurname.r@gmail.com>
2024-07-16 09:59:12 +00:00
Bumsoo Kim
c6cb7ee981
script: Use the new C string literal in the DOM bindings (#32741)
* simple conversion to cstrings using as_ptr()

Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>

* replaced byte strings with c strings using new helper functions

Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>

* changed &[u8] type parameters to &CStr

Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>

---------

Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
2024-07-11 04:18:54 +00:00
Martin Robinson
26624a109f
clippy: Fix a bunch of warnings in script (#32680)
This is just a portion of the errors that are remaining to be fixed.
2024-07-04 11:40:23 +00:00
Samson
c0105de82b
webgpu: Implement ShaderCompilationInfo (#32642)
* ShaderCompilationInfo

* expectations

* Handle CompilationInfo promise in GPUShaderModule

* Fix my english
2024-07-02 13:39:06 +00:00
Samson
bf99cf7f30
Proper GPUDevice cleanup (#32520)
* Make device cleanup right

* Use weakref for GPUDevice in globalscope

* No need to destroy device on drop

* DeviceReason early return

* make remove_gpu_device to be the only way to remove device
2024-06-20 05:56:59 +00:00
Ngo Iok Ui (Wu Yu Wei)
63889b732f
fix: codegen on callback (#32537)
* Fix codegen on callback

* Add test callbacks to testbinding.rs
2024-06-18 16:00:14 +00:00
Samson
cbc9304c20
webgpu: Implement device lost (#32354)
* device lost promise should be init at creation of device object

* device lost impl

* lock for device poll

workaround for wgpu deadlocks

* expect

* Less lost reason reasoning in script
2024-06-17 12:47:25 +00:00
Ngo Iok Ui (Wu Yu Wei)
8eed3b442b
Update WebIDL.py (#32495)
* 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
2024-06-15 04:22:42 +00:00
Samson
794110ebe5
webgpu: Move errorscopes to WGPU thread (#32304)
* 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
2024-05-22 16:47:35 +00:00
Samson
8bc49299c8
Revert "script: implement AbortController (#31361)" (#32243)
This reverts commit 7fce850cff.
2024-05-07 06:23:14 +00:00
Smitty
7fce850cff
script: implement AbortController (#31361)
* 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>
2024-05-04 15:00:01 +00:00
eri
9a76dd9325
clippy: Fix remaining warnings in generated code (#31844)
* clippy: fix warnings in generated code

* clippy: fix wrap_panic closure warnings
2024-03-25 11:12:36 +00:00
cathiechen
cb275e086c
Implement StaticRange (#31809)
* Add DOM interface for AbstractRange

* Add DOM interface for StaticRange

* Update WPT tests for StaticRange-constructor.html

* Fix formatting

* Add AbstractRange & StaticRange in interfaces.html

* rebased the code and fixed the failures

Signed-off-by: Cathie Chen <cathiechen@igalia.com>

* update the expected result in idlharness.window.js.ini file

* Addressed the code review comments

* updae the test result of legacy layout

---------

Signed-off-by: Cathie Chen <cathiechen@igalia.com>
Co-authored-by: Nipun Garg <nipung271@gmail.com>
2024-03-22 15:02:01 +00:00
eri
8c7e9a15e1
Remove repeated imports from generated code (#31711)
* feat: try to deduplicate imports in codegen

* feat: another attempt

* feat: start testing imports

* feat: clean all global imports

* feat: remove shared imports from CGDescriptor

* feat: remove redundant imports from CGDescriptor

* fix: formatting

* fix: remove libc (base level import)

* feat: roll back named path changes

* feat: last changes and tidy

* experiment: move imports into a separate file

* fix: extra parenthesis

* fix: remove repeated allow statement
2024-03-21 13:38:16 +00:00
Samson
c25069161d
Add pseudo async Create*PipelineAsync methods (#31695)
* Create fake CreatePipelineAsync

* Update WebGPU CTS

* Update expectations and disable some webgpu tests
2024-03-19 05:39:42 +00:00
eri
99ddab43e8
clippy: Fix warnings in generated code (#31721)
* clippy: remove extra static lifetimes in generated code

* clippy: fix return and cast in generated code

* clippy: fix more warnings in codegen

* clippy: fix all errors from generated files
2024-03-17 21:32:47 +00:00
Samson
099bb0fa19
Use get_desired_proto in htmlconstructor (#31600)
* Use get_desired_proto in htmlconstructor

* Update expectations
2024-03-10 14:44:25 +00:00
Josh Matthews
19f1f2a8f4
Extract generated finalizers into generic helper functions. (#31569) 2024-03-08 14:15:26 +00:00
Taym Haddadi
328c376ff1
WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings (#31317)
* WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* fmt

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* introduce new_initialized_heap_typed_array function

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Remove unsed unsafe_code

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use doc comments for ImageData

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use get_internal instead of acquire_data

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Handle JS errors in ImageData GetData and new_initialized_heap_typed_array

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Fix wrong assert that causes CRASH in test

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Early return for error

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Address review comments

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-02-16 16:40:45 +00:00
Taym Haddadi
c3e3e72cf2
WebIDL: Use ArrayBufferViewU8 instead of raw JSObject in bindings (#31325)
* WebIDL: Use ArrayBufferViewU8 instead of raw JSObject in bindings

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Remove unused imports

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Address review comments

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-02-16 11:22:16 +00:00
Taym Haddadi
9be989146d
WebIDL: Use ArrayBuffer instead of raw JSObject in bindings (#31202)
* WebIDL: Use ArrayBuffer instead of raw JSObject in bindings

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Convert GPUBufferMapInfo mapping to Arc<Mutex>

* Remove #[allow(unsafe_code)] from GPUBuffer

* Add doc comments

* Implement trace for Arc<Mutex<Vec<T>>>

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use #[no_trace] for GPUBufferMapInfo.mapping

* Make create_new_external_array_buffer generic

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Address review comments

* Remove HeapTypedArray::new and avoid cloning Arc

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use expect for GetMappedRange and ReadAsArrayBuffer

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use doc comments for FileReaderSyncMethods

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Return for Error::JsFailed GetMappedRange and ReadAsArrayBuffer

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Fix detached_internal implementation and comments

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* format code

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Update expectations

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-02-13 07:58:48 +00:00
Taym Haddadi
967925c119
webidlg: Handle Float64Array as a TypedArray rather than a raw JSObject (#31189)
* WebIDL use FLoat64Array

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Use to_vec to convert array to vec

* avoid allocating a new vec

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-30 08:45:29 +00:00
Taym Haddadi
bb04c97f15
Use Int8array, int16array, uint16array, int32array & uint32array in WebIDL (#31164)
<!-- Please describe your changes on the following line: -->

part #31064

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because there is no behavior
changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->

There types are not used we can migrate them, in next PR I will make
`HeapFloat32Array` generic and convert ArrayBufferView, ArrayBuffer,
Uint8ClampedArray and Float64Array.

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-25 14:28:43 +00:00
Taym Haddadi
890588945d
Use Uint8Array for TextEncoder (#31145)
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-23 12:15:42 +00:00
Olivier Tilloy
8dcf3dd0b0
Fix trivial typo in variable name (#31143) 2024-01-21 06:54:56 +00:00
Taym Haddadi
9d2c102fa0
Use FLoat32Array in GamepadPose (#31106)
* Use FLoat32Array in GamepadPose

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Remove unused create_typed_array

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-19 04:39:09 +00:00
Taym Haddadi
f76982e2e7
script: Use FLoat32Array in XRRay (#31087)
* use FLoat32Array in XRRay

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Apply suggestions from code review

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-01-17 10:38:01 +00:00
Taym Haddadi
6a7b450478
use FLoat32Array in XRRigidTransform (#31076)
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
2024-01-17 08:14:35 +00:00
tannal
8c53a8c745
use FLoat32Array in XRView (#31077)
* use FLoat32Array in XRView

* handle error when calling set_data

Yes, we should handle this.

Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>

* fix: error handling

* chore: error message

---------

Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
2024-01-16 15:56:32 +00:00
Gregory Terzian
e145c51234
WebIDL: use FLoat32Array (#30990)
* inital

* audiobuffer: return float 32 array as channel data

* add on heap float 32 array type

* fix warnings

* add list of webidl interfaces to ignore for float 32

* codegen: remove duplication of builtin return type handling

* bindings: derive default for float 32 array wrapper

* bindings: allow unsafe code in typedarrays module

* bindings: rename float 32 array wrapper

* bindings: rename HeapFloat32Array is_set method to is_initialized

* bindings: assert float 32 array is initialized before data can be acquired

* bindings: use let syntax for error handling in float 32 array wrapper

* bindings: use copy_from_slice where possible in float 32 array wrapper

* bindings: rename args in typedarray copy methods

* codegen: use idl type in builtin names for float 32 array

* bindings: add a util to create float 32 arrays, use in dom matrix readonly

* codegen: tidy

* bindings: box the heap inside heaped float 32 arrays
2024-01-11 09:43:36 +00:00
Samson
604979e367
Replace script_plugins with a clippy like rustc driver (named crown) (#30508)
* Remove script_plugins

* Use crown instead of script_plugins

* crown_is_not_used

* Use crown in command base

* bootstrap crown

* tidy happy

* disable sccache

* Bring crown in tree

* Install crown from tree

* fix windows ci

* fix warning

* fix mac

libscript_plugins.dylib is not available anymore

* Update components/script/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* Update for nightly-2023-03-18

Mostly just based off https://github.com/servo/servo/pull/30630

* Always install crown

it's slow only when there is new version

* Run crown test with `mach test-unit`

* Small fixups; better trace_in_no_trace tests

* Better doc

* crown in config.toml

* Fix tidy for real

* no sccache on rustc_wrapper

* document rustc overrides

* fixup of compiletest

* Make a few minor comment adjustments

* Fix a typo in python/servo/platform/base.py

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>

* Proper test types

* Ignore tidy on crown/tests

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-12-01 15:50:52 +00:00
Samson
8436002383
Support Namespace const in webidl (#30492)
* Add TestNS with const

* Implement namespace const in codegen
2023-10-04 11:29:54 +00:00
Samson
ddc47aa56b
Codegen support multiple interfaces in single webidl file & WebGPU single webidl (#30448)
* Codegen support multiple interfaces in single webidl file

* Merge GPU*.webidl into WebGPU.webidl

* Update gpu files to use WebGPUBinding module file
2023-09-30 12:30:12 +00:00
Samson
ebd41d4101
Use Foo_Binding instead of FooBinding for namespace modules (#30447)
* Update Codegen.py to emit Foo_Binding instead of FooBinding

* s/FooBinding/Foo_Binding/g
2023-09-30 00:52:04 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Martin Robinson
a1b83cac2a
Replace a method call now deprecated in mozjs (#30307) 2023-09-06 23:29:04 +00:00
Samson
e0a6281e73
Impl Setlike and Maplike (#30237)
* 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
2023-09-06 13:08:45 +00:00
Martin Robinson
e9281e2eda
build(deps): bump bitflags from 1.3.2 to 2.3.1 (#30273)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1.
 - [Release notes](https://github.com/bitflags/bitflags/releases)
 - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
 - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)
2023-09-01 09:58:48 +00:00
Martin Robinson
65138add46
Fix the 32-bit build (#30204)
Use the `libc::char` to represent a pointer to characters rather than
`i8`. This fixes the build for the Raspberry Pi and Android 32-bit.
2023-08-25 08:11:54 +00:00
Samson
71e0372ac1
Upgrade whole webgpu stack (#29795)
* Allow noidl files in script/dom/webidls

* Upgrade wgpu to 0.16 and refresh whole webgpu implementation

* Update WebGPU test expectations

* misc

* MutNullableDom -> DomRefCell<Option<Dom for GPUTexture

* Direct use of GPUTextureDescriptor

* Remove config from GPUCanvasContext

* misc

* finally blue color

* gpubuffer "handle" error

* GPU object have non-null label

* gpu limits and info

* use buffer_size

* fix warnings

* Cleanup

* device destroy

* fallback adapter

* mach update-webgpu write webgpu commit hash in file

* Mising deps in CI for webgpu tests

* Updated expectations

* Fixups

* early reject

* DomRefCell<Option<Dom -> MutNullableDom for GPUTexture
2023-08-20 23:16:46 +00:00