canvas: Use strum::{Display, EnumString} for canvas enums (#37670)

This makes it easier to add variants, I also added some spec links and
reordered enum variants to match the spec.

Testing: Just refactor, but the code is covered by WPT tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-06-24 15:03:41 +02:00 committed by GitHub
parent 2dc62c504f
commit ef7be66c56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 82 additions and 202 deletions

1
Cargo.lock generated
View file

@ -825,6 +825,7 @@ dependencies = [
"serde_bytes",
"servo_config",
"servo_malloc_size_of",
"strum",
"stylo",
"webrender_api",
"webxr-api",