Commit graph

281 commits

Author SHA1 Message Date
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
a8170966ec
Move convert_* functions into gpuconvert.rs (#31521)
* feat: unify convert_* functions across gpu*.rs files #31104

* chore: reorder and format
2024-03-06 16:48:34 +00:00
Oriol Brufau
06aeeeb1f3
Add CSSOM support for CSS layers (#31481)
Instead of just crashing.
2024-03-03 12:47:39 +00:00
Martin Robinson
9c0561536d
script: Do not run layout in a thread (#31346)
* script: Do not run layout in a thread

Instead of spawning a thread for layout that almost always runs
synchronously with script, simply run layout in the script thread.

This is a resurrection of #28708, taking just the bits that remove the
layout thread. It's a complex change and thus is just a first step
toward cleaning up the interface between script and layout. Messages are
still passed from script to layout via a `process()` method and script
proxies some messages to layout from other threads as well.

Big changes:

1. Layout is created in the script thread on Document load, thus every
   live document is guaranteed to have a layout. This isn't completely
   hidden in the interface, but we can safely `unwrap()` on a Document's
   layout.
2. Layout configuration is abstracted away into a LayoutConfig struct
   and the LayoutFactory is a struct passed around by the Constellation.
   This is to avoid having to monomorphize the entire script thread
   for each layout.
3. Instead of having the Constellation block on the layout thread to
   figure out the current epoch and whether there are pending web fonts
   loading, updates are sent synchronously to the Constellation when
   rendering to a screenshot. This practically only used by the WPT.

A couple tests start to fail, which is probably inevitable since removing
the layout thread has introduced timing changes in "exit after load" and
screenshot behavior.

Co-authored-by: Josh Matthews <josh@joshmatthews.net>

* Update test expectations

* Fix some issues found during review

* Clarify some comments

* Address review comments

---------

Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2024-02-23 08:14:10 +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
d22d97f8c8
Add GPUSupportedFeatures and update GPUSupportedLimits (#30359)
* GPUSupportedFeatures

* New supported limits

* Update expectations
2023-09-14 13:23:12 +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
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
Emilio Cobos Álvarez
349edff768
It was removed from the spec and it's disabled everywhere.
This also removes the meta viewport support (which was implemented on top), but that also had a single test and is disabled everywhere, so I'm not too concerned, it can be implemented again if / when needed.
2023-06-30 16:28:21 +02:00
Kunal Mohan
7f53339d78 Implement GPUUncapturedErrorEvent 2020-08-11 14:24:58 +05:30
Alan Jeffrey
c4dd171dfb Add XRLayerEvent 2020-08-05 18:07:54 -05:00
Alan Jeffrey
d255dc9f7b Add a dummy implementation of all the XR Layer types 2020-08-04 15:10:01 -05:00
Kunal Mohan
aff22db33f Implement GPURenderBundleEncoder and GPURenderBundle 2020-07-24 12:45:23 +05:30
bors-servo
086556e706
Auto merge of #27026 - CYBAI:dynamic-module, r=jdm
Introduce dynamic module

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25439
- [x] There are tests for these changes
2020-07-19 09:29:50 -04:00
CYBAI
0c7f08f743 Introduce DynamicModuleOwner dom struct 2020-07-18 00:43:32 +09:00
Kunal Mohan
0dc1514d57 Implement Async Error reporting for WebGPU and update wgpu-core 2020-07-16 23:21:09 +05:30
Josh Matthews
84efd56e57 dom: Add WebRTC transceiver stubs. 2020-07-14 12:48:45 -04:00
Fernando Jiménez Moreno
c0fb6c8d23 Implement MediaDevices.enumerateDevices() 2020-07-10 13:18:26 +02:00
Manish Goregaokar
6143173858 Add MediaStreamTrackAudioSourceNode 2020-07-02 13:26:55 -07:00
Manish Goregaokar
bc2267fb77 Add MediaStreamAudioSourceNode 2020-07-02 13:26:55 -07:00
Manish Goregaokar
6a001e7523 Add MediaStreamAudioDestinationNode 2020-07-02 13:26:55 -07:00
bors-servo
4b034ede46
Auto merge of #26752 - ferjm:datachannel, r=Manishearth
WebRTC data channels support

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #26212

This depends on https://github.com/servo/media/pull/350 and contains the basic pieces to make a  simple test like https://ferjm.github.io/samples/src/content/datachannel/basic/ work
2020-06-30 13:53:32 -04:00
Fernando Jiménez Moreno
f5c930087e Implement ondatachannel event 2020-06-29 16:53:48 +02:00
Fernando Jiménez Moreno
84598a5173 Introduce RTCError and RTCErrorEvent 2020-06-29 16:53:47 +02:00
Fernando Jiménez Moreno
4e6d3e7cec WebRTCDataChannel initial support 2020-06-29 16:53:47 +02:00
Kunal Mohan
b74cea3a46 Implement GPUBuffer.mapAsync and update wgpu-core 2020-06-27 20:27:17 +05:30
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
Kunal Mohan
1d4efb48ba Implement GPURenderPassEncoder
Add webidls for GPURenderPassEncoder and  GPURenderEncoderBase and
implement relevant methods.
2020-06-04 00:27:58 +05:30
Kunal Mohan
af95d92231 Implement GPUTexture and GPUTextureView 2020-06-01 23:28:12 +05:30
Kunal Mohan
130de8b8e6 Implement GPURenderPipeline
Add webidl for GPURenderPipeline and implement GPUDevice.createRenderPipeline()
2020-05-30 11:38:32 +05:30
Kunal Mohan
dd04716b85 Add GPUSampler to WebGPU implementation
Add dom_struct and webidl for GPUSampler, implement GPUDevice.createSampler() method.
2020-05-26 00:00:35 +05:30
Martin Robinson
3903c1fb98 Add support for animationend event
This is triggered when an animation finishes. This is a high priority
because it allows us to start rooting nodes with animations in the
script thread.

This doesn't yet cause a lot of tests to pass because they rely on the
existence of `Document.getAnimations()` and the presence of
`animationstart` and animationiteration` events.
2020-05-01 15:29:57 +02:00
Manish Goregaokar
c30ad6c422 Add XRJointPose 2020-04-27 17:35:48 -07:00
Manish Goregaokar
89fac8be5c Add XRJointSpace 2020-04-27 17:35:48 -07:00
Manish Goregaokar
c89dc821ba Add XRHand interface 2020-04-27 17:35:48 -07:00
Manish Goregaokar
c7b91523d0 Add XRHitTestResult 2020-04-19 20:29:14 -07:00
Manish Goregaokar
341d36a826 Add XRHitTestSource 2020-04-19 20:29:14 -07:00
Manish Goregaokar
b6a9e41bb8 Add stub XRRay 2020-04-19 20:29:14 -07:00
Alan Jeffrey
fda8da0e9d Added first-cut implementation of XR layers 2020-04-13 13:57:58 -05:00
Alan Jeffrey
c611e46381 Remove WebVR 2020-04-08 20:23:41 -05:00
santoshpavan
8c405546a2 Implement ImageBitmap interface
Implementation of ImageBitmap

ImageBitMap webidl file added

Implementation of ImageBitmap

mentioned the correct origin link

basic new and new_inherited

updated the mod.rs file to include imagebitmap

imagebitmap implemented

changed according to Serialization

implemented serializable

get methods for width and height

basic imagebitmap

added missing crates

added Vec and missing crates

Syntax fixes

Reformatting and minor error fixes

Implementation of  ImageBitmap

tidy-test runs

Took out extra parameters in reflect_dom_object call

added comments with specification links for webidl functions

changing the code based on review comments

adding resolved changes form the pull request

Changes based on pr review

Changes based on pr review

ran test-tidy and fmt

removed the duplicate crate

removed unnecessary crates

Kept only the relevant crate import

Updated test expectations, exposed interface list, and manifest
2020-03-30 15:52:15 -04:00
Istvan Miklos
1b4a3d8987 Add VertexArrayObject support for WebGL2
The implementation was already in place for OpenGL ES.
My approach with this patch is to add support for WebGL2 by
sharing the implementation between the WebGL2 and GLES.
2020-03-13 11:38:28 -04:00
Iulian Gabriel Radu
911b1306ca Add base of VTTCue DOM interface 2020-03-08 00:15:20 +02:00
Iulian Gabriel Radu
30b148c90f Add VTTRegion DOM interface 2020-03-05 00:45:52 +02:00
Gregory Terzian
eb21d5f738 implement broadcastchannel 2020-02-25 14:17:48 +08:00
JavaScript Joe
30f474312f refactor: rename XR to XRSystem
chore: fix formatting
refactor: change filename and ref to xrsystem
refactor: change filename XRSystem.webidl
refactor: update crate in navigator
refactor: use XRSystem instead of XR in navigator
refactor: update Bindings.conf
refactor: use XRSystemMethods

fix: update assertions for XRSystem

fix: update manifest json
2020-02-23 14:34:42 -08:00
bors-servo
993a5f6bec
Auto merge of #25744 - szeged:wgpu_queue, r=jdm
Initial implementation of GPUQueue

Added WebIDL bindings for `GPUQueue`.
Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] These changes addresses a part of #24706

<!-- Either: -->
cc @kvark @jdm @zakorgy

<!-- 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. -->
2020-02-14 15:48:40 -05:00
Patrick Shaughnessy
5ef3358951 Selection interface working for synthetic operations 2020-02-13 20:09:27 -05:00
Zakor
a3c6810b18 Initial implementation of GPUQueue
Added WebIDL bindings for `GPUQueue`.
Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.
2020-02-13 14:37:25 +01:00