mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Use shortest serialization for shorthands with repeated values
For shorthands where all the values are repeated, we now only output the value once.
This commit is contained in:
parent
528af90cd4
commit
54351e7327
Notes:
github-actions[bot]
2025-03-20 13:32:03 +00:00
Author: https://github.com/tcl3
Commit: 54351e7327
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4016
Reviewed-by: https://github.com/gmta ✅
8 changed files with 81 additions and 30 deletions
|
@ -2,5 +2,5 @@ Harness status: OK
|
|||
|
||||
Found 1 tests
|
||||
|
||||
1 Fail
|
||||
Fail gap is interpolable
|
||||
1 Pass
|
||||
Pass gap is interpolable
|
|
@ -2,5 +2,5 @@ Harness status: OK
|
|||
|
||||
Found 1 tests
|
||||
|
||||
1 Fail
|
||||
Fail gap: normal is not interpolable
|
||||
1 Pass
|
||||
Pass gap: normal is not interpolable
|
|
@ -2,5 +2,5 @@ Harness status: OK
|
|||
|
||||
Found 1 tests
|
||||
|
||||
1 Fail
|
||||
Fail Default gap is not interpolable
|
||||
1 Pass
|
||||
Pass Default gap is not interpolable
|
|
@ -2,20 +2,20 @@ Harness status: OK
|
|||
|
||||
Found 16 tests
|
||||
|
||||
6 Pass
|
||||
10 Fail
|
||||
Fail e.style['gap'] = "normal" should set the property value
|
||||
Fail e.style['gap'] = "10px" should set the property value
|
||||
Fail e.style['gap'] = "normal normal" should set the property value
|
||||
Fail e.style['gap'] = "10px 10px" should set the property value
|
||||
12 Pass
|
||||
4 Fail
|
||||
Pass e.style['gap'] = "normal" should set the property value
|
||||
Pass e.style['gap'] = "10px" should set the property value
|
||||
Pass e.style['gap'] = "normal normal" should set the property value
|
||||
Pass e.style['gap'] = "10px 10px" should set the property value
|
||||
Pass e.style['column-gap'] = "normal" should set the property value
|
||||
Pass e.style['column-gap'] = "10px" should set the property value
|
||||
Pass e.style['row-gap'] = "normal" should set the property value
|
||||
Pass e.style['row-gap'] = "10px" should set the property value
|
||||
Fail 'row-gap: normal; column-gap: normal;' is serialized to 'gap: normal;'
|
||||
Fail getPropertyValue for 'row-gap: normal; column-gap: normal;' returns 'normal'
|
||||
Pass getPropertyValue for 'row-gap: normal; column-gap: normal;' returns 'normal'
|
||||
Fail 'row-gap: 10px; column-gap: 10px;' is serialized to 'gap: 10px;'
|
||||
Fail getPropertyValue for 'row-gap: 10px; column-gap: 10px;' returns '10px'
|
||||
Pass getPropertyValue for 'row-gap: 10px; column-gap: 10px;' returns '10px'
|
||||
Fail 'row-gap: 10px; column-gap: normal;' is serialized to 'gap: 10px normal;'
|
||||
Pass getPropertyValue for 'row-gap: 10px; column-gap: normal;' returns '10px normal'
|
||||
Fail 'column-gap: normal; row-gap: 10px;' is serialized to 'gap: 10px normal;'
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 9 tests
|
||||
|
||||
9 Pass
|
||||
Pass e.style['gap'] = "normal normal" should set the property value
|
||||
Pass e.style['gap'] = "10px 10px" should set the property value
|
||||
Pass e.style['gap'] = "20% 20%" should set the property value
|
||||
Pass e.style['gap'] = "calc(20% + 10px) calc(20% + 10px)" should set the property value
|
||||
Pass e.style['gap'] = "normal 10px" should set the property value
|
||||
Pass e.style['gap'] = "10px 20%" should set the property value
|
||||
Pass e.style['gap'] = "20% calc(20% + 10px)" should set the property value
|
||||
Pass e.style['gap'] = "calc(20% + 10px) 0px" should set the property value
|
||||
Pass e.style['gap'] = "0px normal" should set the property value
|
Loading…
Add table
Add a link
Reference in a new issue