aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/rtcdatachannel.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move `ScriptToConstellationMsg` to `constellation_traits` (#36364)Martin Robinson2025-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last big change necessary to create the `constellation_traits` crate. This moves the data structure for messages that originate from the `ScriptThread` and are sent to the `Contellation` to `constellation_traits`, effectively splitting `script_traits` in half. Before, `script_traits` was responsible for exposing the API of both the `ScriptThread` and the `Constellation` to the rest of Servo. - Data structures that are used by `ScriptToConstellationMsg` are moved to `constellation_traits`. The dependency graph looks a bit like this: `script_layout_interface` depends on `script_traits` depends on `constellation_traits` depends on `embedder_traits`. - Data structures that are used in the embedding layer (`UntrustedNodeAddress`, `CompositorHitTestResult`, `TouchEventResult` and `AnimationState`) are moved to embedder_traits, to avoid a dependency cycle between `webrender_traits` and `constellation_traits`. - Types dealing with MessagePorts and serialization are moved to `constellation_traits::message_port`. Testing: This is covered by existing tests as it just moves types around. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Use Window in new methods instead of GlobalScope for interfaces with … ↵Richard Dushime2025-04-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#36133) …Window-only constructors <!-- 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 fix #36118 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. --> --------- Signed-off-by: richarddushime <mudaherarich@gmail.com> Signed-off-by: Richard Dushime <45734838+richarddushime@users.noreply.github.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-7/+9
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Propagate `CanGc` arguments through callers in constructors (#35541)Auguste Baum2025-02-201-1/+2
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Move various reflector types and traits to script_bindings (#35279)Josh Matthews2025-02-041-1/+1
| | | | | | | | | | | | | * script: Move Reflector to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Extract global() helper from DomObject into new trait. Move DomObject and related traits to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-1/+1
| | | | | | | | | | | | | * script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Add CanGc argument to reflect_dom_object (#34606)Domenico Rizzo2024-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | * applied mach fmt Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Refinements Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Modified reflect_dom_object signature and all its calls Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * fix function calls when parameter is passed up Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
* Rewrite From/TryFrom conversions on generated types to avoid future orphan ↵Josh Matthews2024-12-111-13/+14
| | | | | | | | | | | | | | | rule violations (#34554) * script: Add traits to allow converting between types that are not defined in the script crate. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Rewrite all From/TryFrom implementations on generated WebIDL types to use new Convert/TryConvert traits. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Update trait implementations with new generic type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* cangc fixes in several files + event.rs + rtcpeerconnection.rs (#34002)chickenleaf2024-10-251-4/+4
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* More files with CanGc fixes (#33892)chickenleaf2024-10-181-0/+1
| | | | | | | | | | | | | * More files with CanGc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the can_gc inside !task Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Various CanGc fixes (#33800)webbeef2024-10-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CanGc fix for pagetransitionevent Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/node Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gamepad Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gpu Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/element Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for xhr Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/worker Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcerror Signed-off-by: webbeef <me@webbeef.org> * Address review comments Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* More CanGc fixes: Range, Event, gpu error, Header (#33774)webbeef2024-10-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Propagate CanGc parameter in Range Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in gpu code and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in Header and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in Event and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in servoparser Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* Various CanGc fixes in components/script/dom (#33706)webbeef2024-10-081-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * Propagate 'can_gc' in IFrame DOM code Signed-off-by: webbeef <me@webbeef.org> * Propagate 'can_gc' in HTML video and image elements Signed-off-by: webbeef <me@webbeef.org> * Propagate 'can_gc' in Blob and dependencies Signed-off-by: webbeef <me@webbeef.org> * Leftover can_gc fixes for HTMLMediaElement Signed-off-by: webbeef <me@webbeef.org> * Address comment Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* clippy: Fix let_and_return warnings (#31964)Oluwatobi Sofela2024-04-011-4/+2
|
* clippy: Fix single_match warnings (#31876)Oluwatobi Sofela2024-03-261-11/+8
|
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-1/+1
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-1/+1
|
* Upgrade media / GStreamer / GLib (#30750)Martin Robinson2024-01-051-3/+3
| | | | | | | | | | | | | | | | | | - Upgrade the version of GStreamer for Windows This upgrades the Windows build to use the most recent version of GStreamer. This is necessary to upgrade our GStreamer dependency. - Stop shipping GStreamer binaries on Linux The binary bundle of GStreamer that we package is not used to compile -- only to run layout tests. It's too old for the APIs that we are using (as evidenced by needed 1.18 for WebRTC) and nowadays Linux distributions carry a new version so it's unecessary for our build machines. No longer using this binary bundle will allow us to upgrade our GStreamer dependency -- which now has stricter checks that we are using at least version 1.18. - Upgrade media to use newer versions of GStreamer / GLib dependencies
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-15/+17
| | | | | * strict imports formatting * Reformat all imports
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-2/+2
|
* Fix rooting issueFernando Jiménez Moreno2020-06-291-2/+2
|
* Fix data channels borrowing errorsFernando Jiménez Moreno2020-06-291-5/+6
|
* Set data channels as closed on peer connection closeFernando Jiménez Moreno2020-06-291-2/+6
|
* Allow receiving binary data channel messagesFernando Jiménez Moreno2020-06-291-24/+59
|
* Allow sending binary messagesFernando Jiménez Moreno2020-06-291-9/+45
|
* RTCDataChannel.readyState getterFernando Jiménez Moreno2020-06-291-2/+43
|
* Use data channel idsFernando Jiménez Moreno2020-06-291-125/+76
|
* Cleanups and tidy fixesFernando Jiménez Moreno2020-06-291-5/+5
|
* Fix rooting issues with data channels callbacksFernando Jiménez Moreno2020-06-291-46/+53
|
* Implement ondatachannel eventFernando Jiménez Moreno2020-06-291-2/+9
|
* Allow sending strings through data channelsFernando Jiménez Moreno2020-06-291-1/+5
|
* On data channel message handlerFernando Jiménez Moreno2020-06-291-1/+24
|
* Trigger RTCErrorEvent on data channel errorFernando Jiménez Moreno2020-06-291-2/+20
|
* WebRTCDataChannel initial supportFernando Jiménez Moreno2020-06-291-0/+260