aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* rename compartment to realmKunal Mohan2020-01-241-3/+3
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-2/+3
|
* Add `track_list` member to AudioTrack, VideoTrack, TextTrack structsKunal Mohan2019-12-231-0/+1
| | | | | Add member to the track structs pointing at their associated tracklist and update it when the track is added or removed from a tracklist.
* Auto merge of #24885 - shnmorimoto:implement_mediasession_set_positon_state, ↵bors-servo2019-12-031-1/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=ferjm Implement mediasession set positon state <!-- Please describe your changes on the following line: --> fix #24808 > Bonus points if you want to tweak the existing UI by adding a progress bar, and the info about the current position and total duration. I haven't implemented this yet. --- <!-- 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 #24808 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR <!-- 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. -->
| * extended MediaSessionEvent with SetPositionStateShinichi Morimoto2019-12-031-1/+10
| |
| * implement MediaSession.setPositionState methodShinichi Morimoto2019-12-031-0/+12
| |
* | Use non-IPC webrender API over explicit IPC channels.Josh Matthews2019-11-271-5/+5
|/
* Fix metadata updateFernando Jiménez Moreno2019-11-201-7/+5
|
* Fallback to current url as metadata titleFernando Jiménez Moreno2019-11-201-2/+7
|
* Default media session actionsFernando Jiménez Moreno2019-11-201-0/+9
|
* Send MediaSessionAction from AndroidFernando Jiménez Moreno2019-11-201-6/+0
|
* MediaSession show media controls on AndroidFernando Jiménez Moreno2019-11-201-1/+7
|
* Send MediaSessionEvent::PlaybackStateChange when neededFernando Jiménez Moreno2019-11-201-8/+22
|
* Introduce embedder MediaSessionEvent and move active session to ServoFernando Jiménez Moreno2019-11-201-1/+9
|