servo/components
Simon Wülker 18de59dd63
Refactor devtools server (#35735)
Previously, the devtools code was structured like this (in pseudocode):
```rust
fn run() {
    let member_1;
    let member_2;

    fn foo(&member_1) {
        // ...
    }

    fn bar(&member_1, &member_2) {
        // ...
    }

    loop {
        match get_message() {
            Message1 => foo(&member_1),
            Message2 => bar(&member_1, &member_2),

        }
    }
}
```

This is not very idiomatic rust. And, more importantly, it makes it hard
to edit this code with an IDE, because "find all references" and similar
actions don't properly work. (member_1 inside "foo" is a different
variable than member_1 inside "bar" or "run").

Instead, the code is now structured (roughly) like this:

```rust
struct DevtoolsInstance {
    member_1,
    member_2,
}

impl DevtoolsInstance {
    fn foo(&self) {
        // ...
    }

    fn bar(&self) {
        // ...
    }

    fn run(&self) {
        loop {
            match get_message() {
                Message1 => self.foo(),
                Message2 => self.bar(),

            }
        }
    }
}
```

In my opinion, this is an improvement and should make future additions
to the devtools server easier. No behaviour change is intended.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-01 20:13:22 +00:00
..
allocator Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
background_hang_monitor Only compile platform samplers when cargo feature enabled (#35312) 2025-02-06 06:53:08 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas fonts: Remove the per-FontGroup cached fallback font (#35705) 2025-02-28 14:33:21 +00:00
compositing compositor Remove frame_tree_id member (#35702) 2025-02-27 14:06:57 +00:00
config compositing: Move image output and shutdown management out of the compositor (#35538) 2025-02-20 18:27:49 +00:00
constellation libservo: Clean up interfaces for alert()/confirm()/prompt() (#35579) 2025-02-27 02:49:08 +00:00
deny_public_fields Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
devtools Refactor devtools server (#35735) 2025-03-01 20:13:22 +00:00
dom_struct script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
domobject_derive Upgrade rustc to 1.83 (#34793) 2025-01-01 09:38:28 +00:00
fonts fonts: Remove the per-FontGroup cached fallback font (#35705) 2025-02-28 14:33:21 +00:00
geometry servoshell: Allow overriding screen resolution with a command-line argument (#34038) 2024-10-30 11:54:13 +00:00
hyper_serde Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
jstraceable_derive Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
layout fonts: Remove the per-FontGroup cached fallback font (#35705) 2025-02-28 14:33:21 +00:00
layout_2020 fonts: Remove the per-FontGroup cached fallback font (#35705) 2025-02-28 14:33:21 +00:00
layout_thread script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
layout_thread_2020 fonts: Remove the per-FontGroup cached fallback font (#35705) 2025-02-28 14:33:21 +00:00
malloc_size_of libservo: Convert intercept_web_resource_load into load_web_resource (#35564) 2025-02-21 14:36:42 +00:00
media libservo: Move GL acclerated media setup out of RenderingContext and simplify it (#35553) 2025-02-20 13:52:18 +00:00
metrics script_traits: Rename ConstellationControlMsg to ScriptThreadMessage (#35226) 2025-01-30 22:46:17 +00:00
net Don’t prompt user for credentials for non-Navigate request (#35664) 2025-02-26 03:52:00 +00:00
pixels pixels: Fix webp detection (#35474) 2025-02-19 11:09:16 +00:00
profile Improve scheduling of the memory profiler. (#35618) 2025-02-23 20:04:57 +00:00
rand crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
range Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
script Don't recurse in Node::GetRootNode (#35725) 2025-03-01 17:19:27 +00:00
script_bindings refactor: add CanGc as argument to methods in CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D (#35732) 2025-03-01 14:45:37 +00:00
servo libservo: Stop double-buffering OffscreenRenderingContext (#35638) 2025-02-28 11:41:56 +00:00
shared libservo: Stop double-buffering OffscreenRenderingContext (#35638) 2025-02-28 11:41:56 +00:00
timers deps: Remove some unused Cargo.toml (#35466) 2025-02-14 15:33:14 +00:00
url Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
webdriver_server libservo: Move WebDriver messages to the embedder crate (#35602) 2025-02-24 13:57:28 +00:00
webgpu chore: Update wgpu (#35639) 2025-02-24 20:27:36 +00:00
webxr script: Fix typo in ScriptThread::process_pending_input_events (#35627) 2025-02-24 15:58:05 +00:00