mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-27 10:29:23 +00:00
LibWeb: Clamp and censor top-level calc results
We now clamp the values returned from calc into the allowed range (where we know it) and censor any `NaN`s to `0` both when we resolve and when we serialize. Gains us 76 WPT passes.
This commit is contained in:
parent
bc2ca96f50
commit
778da0175e
Notes:
github-actions[bot]
2025-08-11 16:11:10 +00:00
Author: https://github.com/Calme1709
Commit: 778da0175e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5734
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/tcl3
15 changed files with 361 additions and 74 deletions
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 12 tests
|
||||
|
||||
10 Pass
|
||||
2 Fail
|
||||
11 Pass
|
||||
1 Fail
|
||||
Pass Property flex-basis value '1px'
|
||||
Pass Property flex-basis value '400%'
|
||||
Pass Property flex-basis value 'auto'
|
||||
|
|
@ -12,7 +12,7 @@ Pass Property flex-basis value 'fit-content'
|
|||
Pass Property flex-basis value 'min-content'
|
||||
Pass Property flex-basis value 'max-content'
|
||||
Pass Property flex-basis value 'calc(10px + 0.5em)'
|
||||
Fail Property flex-basis value 'calc(10px - 0.5em)'
|
||||
Pass Property flex-basis value 'calc(10px - 0.5em)'
|
||||
Pass Property flex-basis value 'calc(10%)'
|
||||
Pass Property flex-basis value 'calc(0% + 10px)'
|
||||
Fail Property flex-basis value 'calc(10% + 0px)'
|
||||
|
|
@ -2,8 +2,7 @@ Harness status: OK
|
|||
|
||||
Found 8 tests
|
||||
|
||||
7 Pass
|
||||
1 Fail
|
||||
8 Pass
|
||||
Pass Property flex value 'none'
|
||||
Pass Property flex value '1'
|
||||
Pass Property flex value '2 3'
|
||||
|
|
@ -11,4 +10,4 @@ Pass Property flex value '4 5 6px'
|
|||
Pass Property flex value '7% 8'
|
||||
Pass Property flex value '8 auto'
|
||||
Pass Property flex value 'calc(10px + 0.5em)'
|
||||
Fail Property flex value 'calc(10px - 0.5em)'
|
||||
Pass Property flex value 'calc(10px - 0.5em)'
|
||||
Loading…
Add table
Add a link
Reference in a new issue