aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "compositor: Create a single cross-process compositor API (#33619)" ↵Martin Robinson2024-10-041-16/+16
| | | | | | | | | (#33645) This reverts commit f2f5614ad64927aa82aa8937ae14a6086df49d2b. This is causing intermittent crashes: https://github.com/servo/servo/actions/runs/11167043809/job/31044255019 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* compositor: Create a single cross-process compositor API (#33619)Martin Robinson2024-10-031-16/+16
| | | | | | | | | | | | | | | | | | | | | | Instead of exposing many different kinds of messages to the compositor that are routed through the constellation, expose a single message type which can be sent across IPC channels. In addition, this IPC channel and the route to the crossbeam channel with the compositor is created along with the `CompositorProxy`, simplifying what needs to be passed around during pipeline initialization. Previously, some image updates (from video) were sent over IPC with a special serialization routine and some were sent via crossbeam channels (canvas). Now all updates go over the IPC channel `IpcSharedMemory` is used to avoid serialization penalties. This should improve performance and reduce copies for video, but add a memory copy overhead for canvas. This will improve in the future when canvas renders directly into a texture. All-in-all this is a simplification which opens the path toward having a standard compositor API and reduces the number of duplicate messages and proxying that had to happen in libservo. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Create HttpStatus to safely deal with HTTP responses status. (#33581)webbeef2024-09-291-7/+9
| | | Signed-off-by: webbeef <me@webbeef.org>
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-161-1/+1
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Make CanGc derive Copy and Clone (#33407)Taym Haddadi2024-09-121-2/+2
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* Propagate `CanGc` from `Document::new()` (#33386)Andriy Sultanov2024-09-091-57/+58
| | | | | | | | | | | | | * 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>
* Remove media element state changes triggered by network responses (#32643)Josh Matthews2024-07-091-29/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Do not change media element ready state when network response is complete. * Do not fire multiple error events for the same media content. * Inform media backend when media response is complete. * Continue delaying the load event when a complete media response is received. * Only mark a media response as complete when the response is the active one. * Update expectations for imagebitmap tests using video element. * Update fetch ORB video test expectations. * Update media CSS selector test expectation for non-implemented feature. * Update expectations for media element tests that now work. * Updat expected result for failing reftest. * Update expected failure for test that loads an audio file in a video element. * Update media test expectation for unimplemented track feature. * Do not process media element ready state changes that are unchanged. * Reset media element ready state to Current when playback finishes. * Set media element ready state to Enough when appropriate player event is received. * Update test expectations.
* Fix more clippy (#32740)石蕊 (Pi-Cla)2024-07-091-1/+1
|
* compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)Mukilan Thiyagarajan2024-05-201-4/+4
| | | | | | | | | | | | | | | | | | | | * Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix `redundant_*` warnings (#32056)eri2024-04-111-1/+2
| | | | | | | * clippy: Fix `redundant_field_names` warnings * clippy: Fix other `redundant_*` warnings * docs: Update docstring comments
* Fixed some clippy warnings by replacing 'match' with 'if' (#32007)komuhangi2024-04-071-9/+6
|
* Clippy: Fix the error of variants having the same prefix. (#31953)Aarya Khandelwal2024-04-051-0/+1
| | | | | | | | | | | | | | | | | | | * fix error: all variants have same prefix * made the suggested changes * fixed errors caused by commit * silenced the clippy warning. * ran ./mach fmt * Update components/script/dom/htmlmediaelement.rs Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* Show poster over first video frame if available (#32001)eri2024-04-051-5/+22
|
* Fixed some clippy warning by adding default implementations (#31989)komuhangi2024-04-041-2/+2
| | | | | | | | | | | * Fixed some clippy warning by adding default implementations * Updated PR that adds default implementation of structs * Clean up and extend `Default` implementations --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* script: Reduce the use of `unsafe` in LayoutDom (#31979)Martin Robinson2024-04-031-3/+6
| | | | | | | | | | | | | Remove the use of unsafe code in the layout wrappers of the DOM. The main change here is that `unsafe_get()` no longer needs to be an unsafe method, which allows us to transitively remove or reduce unsafe blocks from callers. The function itself is not renamed, because it's still a bit dangerous to start removing the layers of abstraction from actual DOM nodes. In addition `init_style_and_opaque_layout_data` can be merged into `initialize_data`, which removes one more unsafe method. Finally, a "Safety" section is added to some unsafe methods.
* clippy: Fix manual_map warnings (#31922)Oluwatobi Sofela2024-03-281-12/+13
|
* clippy: Fix mem_replace_with_default warnings (#31921)Oluwatobi Sofela2024-03-281-2/+1
|
* clippy: Fix option_map_unit_fn warnings (#31906)Oluwatobi Sofela2024-03-271-7/+5
|
* dom: Abort media element load on decode errors (#31748)Frederik Reiter2024-03-261-0/+18
| | | Signed-off-by: Frederik Reiter <hi@frereit.de>
* fixes dereferencing on an immutable reference (#31864)Aarya Khandelwal2024-03-261-6/+6
|
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-4/+4
|
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-3/+3
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* clippy: Fix `unnecessary_cast` warnings in `components/script` (#31823)Oluwatobi Sofela2024-03-221-2/+2
| | | | | | | * clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
* Fixed the .clone() warnings. (#31819)Aarya Khandelwal2024-03-221-2/+2
|
* clippy: fix `result_unit_err` warnings (#31791)eri2024-03-211-6/+4
| | | | | | | | | | | | | | | | | * clippy: fix `result_unit_err` warnings * feat: fix result warnings in script * doc: document `generate_key` return type Co-authored-by: Martin Robinson <mrobinson@igalia.com> * feat: add back result to RangeRequestBounds::get_final Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix unneeded return statement warnings (#31776)Oluwatobi Sofela2024-03-201-1/+1
|
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-1/+1
|
* Fix crash when closing window containing video element (#31413)Josh Matthews2024-02-231-2/+2
| | | | | * Forbid casting DOM objects when JS runtime is shutting down. * Remove media controls from document when element is removed from the tree.
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-15/+15
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* script: Start replacing `time` with `std::time` and `chrono` (#30639)Auguste Baum2024-01-161-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace `time` with `chrono` in `script/animation_timeline` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/script_thread.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` and `chrono` in `script/script_thread.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/script_runtime.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/script_runtime.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/workerglobalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `chrono` in `script/dom/workerglobalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlmedialelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlmedialelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/globalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `chrono` in `script/dom/globalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlformelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlformelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Increase precision of animation timeline * Some fixes Use Instant a bit more and stop using chrono. Do not transition `navigation_start_precise` to Instant yet as we need to coordinate this across all crates. --------- Signed-off-by: Auguste Baum <auguste.apple@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-3/+3
| | | | | * Update Codegen.py to emit Foo_Binding instead of FooBinding * s/FooBinding/Foo_Binding/g
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-39/+44
| | | | | * strict imports formatting * Reformat all imports
* Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)Martin Robinson2023-09-101-5/+5
| | | | | | | | | | | | | | | | | | * Upgrade vendored version of WebRender * Patch WebRender: upgrade version of gleam * Restore hit testing implementation * Fix WebRender warnings * Adapt Servo to new WebRender * Update results * Add a workaround for #30313 This slightly expands text boundaries in order to take into account the fact that layout isn't measuring glyph boundaries.
* remove `extern crate` (#30311)Samson2023-09-081-1/+1
| | | | | | | | | | | * 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>
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-0/+2
|
* Enter realms more consistently during the script event loop.Josh Matthews2023-05-201-1/+10
|
* Remove global argument from Promise::new_in_current_realm.Josh Matthews2023-05-201-1/+1
|
* Fix intermittency when loading poster imagesMartin Robinson2023-01-111-15/+11
| | | | | | | | | | | | | | | | | Wait until a poster image is cached to in order to unblock document load. If not, the document may continue loading before the image is ready to use, leading to intermittency in test output. Now load is unblocked when getting the ImageResponse from the cache, which allows the code to properly unblock the load when the entire load fails or succeeds. This reveals several false passes in the `object-view-box` test suite which were very flaky. Fixes #29204. Fixes #29188. Fixes #29179. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update nightly rustc.Josh Matthews2021-11-011-1/+1
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-7/+12
|
* script: Don't panic when IPC WebRender APIs fail during shutdown.Josh Matthews2020-06-091-2/+8
|
* Convert all uses of UpdateResources api to use webrender transactions.Josh Matthews2020-05-111-11/+10
|
* Make LayoutHTMLMediaElementHelpers methods take selfAnthony Ramine2020-03-291-2/+2
|
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
|
* Remove syn 0.15 from our crate graph (fixes #24421)Anthony Ramine2020-03-051-3/+3
| | | | | | | | | | This required bumps of: * gleam * image * rust-webvr * webrender * webxr
* Avoid fetching node global from HTMLMediaElement's destructor.Josh Matthews2020-02-241-4/+6
|
* Remove unnecessary Option.Josh Matthews2020-02-241-3/+1
|
* Upgrade to rustc 1.43.0-nightly (5d04ce67f 2020-02-13)Simon Sapin2020-02-141-1/+1
|