aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/worklet.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* clippy: Allow `too_many_arguments` for all functions (#31962)komuhangi2024-04-011-0/+2
| | | | | This is the start of preventing this in the future. Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix option_map_unit_fn warnings (#31906)Oluwatobi Sofela2024-03-271-2/+2
|
* 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
* Fixed the .clone() warnings. (#31819)Aarya Khandelwal2024-03-221-1/+1
|
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-2/+2
|
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-1/+1
|
* clippy: Fix many warnings in `components/script` (#31717)Richard Dushime2024-03-191-2/+2
| | | | | | | | | | | | | | | | | * Fix Several clippy warnings * Fix Build errors * Fix Unused import * Fix requested changes * Fix rustfmt * Minor fixes --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix some warnings in the `script` crate (#31719)Rosemary Ajayi2024-03-181-15/+15
| | | | | | | | | | | | | | | | | | | | | * Fix InlineFormatting error * BoxFrament * fix clippy error * clippy:fix clipy errors * fix clippy errors * fix clippy errors * fix clippy errors * Remove changes to `layout_2020` --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* fix: missing thread name when spawning (#31656)Ngo Iok Ui (Wu Yu Wei)2024-03-141-28/+34
| | | | | * Add missing thread name when spawning * Update namings
* script: Do not run layout in a thread (#31346)Martin Robinson2024-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fix intermittent crashes in paint worklets (#30671)Martin Robinson2023-11-021-19/+34
| | | | | | | | | | Garbage collection means that the worklets might drop after the script head has been cleaned up. The worklet now caches the thread pool in the DOM object itself which should prevent it from needing to access script thread TLS when being cleaned up. The value is stored as a OnceCell to maintain the same lazy thread pool creation pattern as before. Fixes #25838. Fixes #25258.
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-1/+1
| | | | | * 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-40/+26
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+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-1/+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
* Remove global argument from Promise::new_in_current_realm.Josh Matthews2023-05-201-2/+1
|
* 26488 Move worklet drop implementation into single droppable memberBenjamin Freist2023-02-131-11/+18
| | | | Signed-off-by: Benjamin Freist <bfreist@soundhound.com>
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-5/+8
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* rename compartment to realmKunal Mohan2020-01-241-3/+3
|
* Bind runnable dispatching in script_runtimeAkash-Pateria2019-11-191-1/+1
|
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Use the newly added inCompartments option everywhere it can beBastien Orivel2019-05-251-7/+8
|
* Update to SpiderMonkey 66.Josh Matthews2019-05-101-2/+2
|
* Create resource timing entry for sync network fetchpylbrecht2019-05-081-4/+8
|
* Pass InCompartment by valueAron Zwaan2019-04-251-1/+1
|
* Add proof parameter to Promise::new_in_current_compartmentAron Zwaan2019-04-241-2/+7
|
* Implementing the builder pattern for RequestInitLucas Fantacuci2019-04-101-9/+7
|
* Rename Promise::new to Promise::new_in_current_compartmentAron Zwaan2019-04-031-1/+2
|
* Reintroduce parent runtimes for worker threads.Josh Matthews2019-01-151-1/+1
|
* Remove now-unnecessary must_root and allow(unrooted_must_root) annotationsManish Goregaokar2019-01-041-1/+0
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Update crossbeam-channel to 0.3Bastien Orivel2018-11-181-6/+6
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* Reorder importsPyfisch2018-11-061-8/+8
|
* Format remaining filesPyfisch2018-11-061-1/+5
|
* Sort `use` statementsSimon Sapin2018-11-061-7/+7
|
* `cargo fix --edition`Simon Sapin2018-11-061-29/+29
|
* Auto merge of #21647 - AgustinCB:fix-space-leak-when-pipeline-is-closed, ↵bors-servo2018-09-201-4/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=asajeffrey Fix space leak when pipeline is closed Add a new control message to drop remove worklets. Implement `Drop` for `Worklet` and get the worklet thread pool. Use that pool to send `ExitWorklet` to all the threads with the id of the `Worklet` that it's dropping. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #17442 - [ ] There are tests for these changes OR - [x] These changes do not require tests because I don't know how to add a test for this :( If you consider this needs a test, could you point me out on how to write (and run!) one in this project? I gave this a couple tries, but I wasn't very successful. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21647) <!-- Reviewable:end -->
| * Fix space leak when pipeline is closedAgustin Chiappe Berrini2018-09-081-4/+26
| | | | | | | | | | | | | | | | Add a new control message to drop remove worklets. Implement `Drop` for `Worklet` and get the worklet thread pool. Use that pool to send `ExitWorklet` to all the threads with the id of the `Worklet` that it's dropping.
* | Format script componentchansuke2018-09-191-70/+117
| |
* | Replace mpsc with crossbeam/servo channel, update ipc-channelSimon Sapin2018-09-121-8/+6
|/ | | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Add the TaskSourceName to CommonScriptMsg::TaskAgustin Chiappe Berrini2018-09-041-1/+9
| | | | Update QueuedTaskConversion and the TaskQueue to use it
* Upgraded to SM 60Alan Jeffrey2018-08-201-2/+2
|
* Bump ipc-channel and bincodeBastien Orivel2018-03-211-1/+1
| | | | This required bumping uuid too which unfortunately duplicated rand.
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-2/+2
|
* Auto merge of #18670 - avadacatavra:interactive-metrics, r=jdmbors-servo2017-10-251-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added time to interactive metrics <!-- Please describe your changes on the following line: --> Added time to interactive metrics and refactored metrics/lib I need to write tests, but wanted to submit the PR for review --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18670) <!-- Reviewable:end -->
| * added time to interactive metrics, refactored metrics to use traitsddh2017-10-241-1/+1
| | | | | | | | changed task macro to take pipeline info