Fix transition toggle & cancellation & delay (#35978)

More details in Stylo PR: https://github.com/servo/stylo/pull/145

---
<!-- 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 
- fixes https://github.com/servo/servo/issues/35833
- fixes https://github.com/servo/servo/issues/35982

<!-- Either: -->
- [x] There are new passing test: `css/css-logical/animation-004.html:
Transitions from physical to logical update when the direction is
changed`

Created new test files as well: 

1. `css-transitions/transition-remove-and-change-immediate.html`
2.  `css-transitions/transition-zero-duration-with-delay.html`
3. `css-transitions/transitioncancel-003.html`

<!-- 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. -->

cc @Asun0204  @xiaochengh @stevennovaryo

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-04-07 22:51:32 +08:00 committed by GitHub
parent 4f41354349
commit 3242592f34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 220 additions and 19 deletions

30
Cargo.lock generated
View file

@ -1065,7 +1065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]
@ -6537,7 +6537,7 @@ dependencies = [
[[package]]
name = "selectors"
version = "0.27.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"bitflags 2.9.0",
"cssparser",
@ -6822,7 +6822,7 @@ dependencies = [
[[package]]
name = "servo_arc"
version = "0.4.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"serde",
"stable_deref_trait",
@ -7273,8 +7273,8 @@ dependencies = [
[[package]]
name = "stylo"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
version = "0.2.1"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"app_units",
"arrayvec",
@ -7332,7 +7332,7 @@ dependencies = [
[[package]]
name = "stylo_atoms"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"string_cache",
"string_cache_codegen",
@ -7341,12 +7341,12 @@ dependencies = [
[[package]]
name = "stylo_config"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
[[package]]
name = "stylo_derive"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"darling",
"proc-macro2",
@ -7358,7 +7358,7 @@ dependencies = [
[[package]]
name = "stylo_dom"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"bitflags 2.9.0",
"stylo_malloc_size_of",
@ -7367,7 +7367,7 @@ dependencies = [
[[package]]
name = "stylo_malloc_size_of"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"app_units",
"cssparser",
@ -7384,12 +7384,12 @@ dependencies = [
[[package]]
name = "stylo_static_prefs"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
[[package]]
name = "stylo_traits"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"app_units",
"bitflags 2.9.0",
@ -7772,7 +7772,7 @@ dependencies = [
[[package]]
name = "to_shmem"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"cssparser",
"servo_arc",
@ -7785,7 +7785,7 @@ dependencies = [
[[package]]
name = "to_shmem_derive"
version = "0.1.0"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#600b5c42970fdbe301f18c013a0f0ca4ed5f08db"
source = "git+https://github.com/servo/stylo?branch=2025-03-15#127952e9cc0d881c08ac5c41b626eb38674432e9"
dependencies = [
"darling",
"proc-macro2",
@ -8853,7 +8853,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]