diff options
author | sagudev <16504129+sagudev@users.noreply.github.com> | 2025-05-01 06:16:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-01 04:16:23 +0000 |
commit | be0f4470c7c759003110b1c93c57cb796f4be3dc (patch) | |
tree | a03fe7ba8b2a107497a6aaa329f760483681354a /components/script/dom/bindings/codegen/ply/example/ansic/cparse.py | |
parent | 8c318af30787dc00997bf22b6403be2126901bf1 (diff) | |
download | servo-main.tar.gz servo-main.zip |
Current abstraction was leaky and very hard to understand/impl because
it was so intervened with actual implementation.
Now we generalize both `CanvasState` and `CanvasData` over `B: Beckend`,
meaning that every type/method must be part of trait interface (that
lives in `beckend.rs`). Using associated trait types instead of `Box<dyn
>` allows us too remove the need for wrapper types (and `to_raquote()`
methods) as we can implement helper traits on (foreign) raquote types.
The only time we actually do dispatch (by enum) is at `Canvas` methods.
Implementation now only need to implement all backend traits and
helpers. I tried to restrain myself from actually cleaning abstraction
(where possible), to keep this change as much mechanical as possible,
but we should absolutely do that as a follow up.
Testing: Rust as we only do refactor, but there are also WPT tests
try run: https://github.com/sagudev/servo/actions/runs/14760658522
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/script/dom/bindings/codegen/ply/example/ansic/cparse.py')
0 files changed, 0 insertions, 0 deletions