LibWeb: Allow calc() values in steps() easing functions

This commit is contained in:
Tim Ledbetter 2025-06-17 09:46:51 +01:00 committed by Jelle Raaijmakers
commit c5a3eaaf45
Notes: github-actions[bot] 2025-06-18 06:58:22 +00:00
8 changed files with 177 additions and 27 deletions

View file

@ -0,0 +1,27 @@
Harness status: OK
Found 21 tests
18 Pass
3 Fail
Pass Property animation-timing-function value 'linear'
Pass Property animation-timing-function value 'ease'
Pass Property animation-timing-function value 'ease-in'
Pass Property animation-timing-function value 'ease-out'
Pass Property animation-timing-function value 'ease-in-out'
Pass Property animation-timing-function value 'cubic-bezier(0.1, 0.2, 0.8, 0.9)'
Pass Property animation-timing-function value 'cubic-bezier(0, -2, 1, 3)'
Pass Property animation-timing-function value 'cubic-bezier(0, 0.7, 1, 1.3)'
Fail Property animation-timing-function value 'cubic-bezier(calc(-2), calc(0.7 / 2), calc(1.5), calc(0))'
Pass Property animation-timing-function value 'steps(4, start)'
Pass Property animation-timing-function value 'steps(2, end)'
Pass Property animation-timing-function value 'steps( 2, end )'
Pass Property animation-timing-function value 'steps(2, jump-start)'
Pass Property animation-timing-function value 'steps(2, jump-end)'
Pass Property animation-timing-function value 'steps(2, jump-both)'
Pass Property animation-timing-function value 'steps(2, jump-none)'
Pass Property animation-timing-function value 'steps(calc(-10), start)'
Pass Property animation-timing-function value 'steps(calc(5 / 2), start)'
Pass Property animation-timing-function value 'steps(calc(1), jump-none)'
Fail Property animation-timing-function value 'linear, ease, linear'
Fail Property animation-timing-function value 'steps(calc(2 + sign(100em - 1px)), end)'

View file

@ -0,0 +1,28 @@
Harness status: OK
Found 22 tests
19 Pass
3 Fail
Pass e.style['animation-timing-function'] = "linear" should set the property value
Pass e.style['animation-timing-function'] = "ease" should set the property value
Pass e.style['animation-timing-function'] = "ease-in" should set the property value
Pass e.style['animation-timing-function'] = "ease-out" should set the property value
Pass e.style['animation-timing-function'] = "ease-in-out" should set the property value
Pass e.style['animation-timing-function'] = "cubic-bezier(0.1, 0.2, 0.8, 0.9)" should set the property value
Pass e.style['animation-timing-function'] = "cubic-bezier(0, -2, 1, 3)" should set the property value
Pass e.style['animation-timing-function'] = "cubic-bezier(0, 0.7, 1, 1.3)" should set the property value
Fail e.style['animation-timing-function'] = "cubic-bezier(calc(-2), calc(0.7 / 2), calc(1.5), calc(0))" should set the property value
Fail e.style['animation-timing-function'] = "cubic-bezier(0, sibling-index(), 1, sign(2em - 20px))" should set the property value
Pass e.style['animation-timing-function'] = "steps(4, start)" should set the property value
Pass e.style['animation-timing-function'] = "steps(2, end)" should set the property value
Pass e.style['animation-timing-function'] = "steps( 2, end )" should set the property value
Pass e.style['animation-timing-function'] = "steps(2, jump-start)" should set the property value
Pass e.style['animation-timing-function'] = "steps(2, jump-end)" should set the property value
Pass e.style['animation-timing-function'] = "steps(2, jump-both)" should set the property value
Pass e.style['animation-timing-function'] = "steps(2, jump-none)" should set the property value
Pass e.style['animation-timing-function'] = "steps(calc(-10), start)" should set the property value
Pass e.style['animation-timing-function'] = "steps(calc(5 / 2), start)" should set the property value
Pass e.style['animation-timing-function'] = "steps(calc(1), jump-none)" should set the property value
Fail e.style['animation-timing-function'] = "linear, ease, linear" should set the property value
Pass e.style['animation-timing-function'] = "steps(calc(2 + sign(100em - 1px)))" should set the property value