mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
LibWeb: Use correct animation type for border-spacing
Some checks are pending
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This follows the `css-tables` specification rather than the older CSS2 specification.
This commit is contained in:
parent
4c91b42dd2
commit
f2682bb544
Notes:
github-actions[bot]
2025-08-01 13:19:34 +00:00
Author: https://github.com/tcl3
Commit: f2682bb544
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5667
Reviewed-by: https://github.com/gmta ✅
3 changed files with 244 additions and 1 deletions
|
@ -994,7 +994,8 @@
|
|||
]
|
||||
},
|
||||
"border-spacing": {
|
||||
"animation-type": "discrete",
|
||||
"_comment": "Follows the newer definition from: https://drafts.csswg.org/css-tables-3/#border-spacing-property",
|
||||
"animation-type": "by-computed-value",
|
||||
"inherited": true,
|
||||
"initial": "0",
|
||||
"max-values": 2,
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 120 tests
|
||||
|
||||
92 Pass
|
||||
28 Fail
|
||||
Pass CSS Transitions: property <border-spacing> from neutral to [20px] at (-0.3) should be [7px 7px]
|
||||
Pass CSS Transitions: property <border-spacing> from neutral to [20px] at (0) should be [10px 10px]
|
||||
Pass CSS Transitions: property <border-spacing> from neutral to [20px] at (0.3) should be [13px 13px]
|
||||
Pass CSS Transitions: property <border-spacing> from neutral to [20px] at (0.6) should be [16px 16px]
|
||||
Pass CSS Transitions: property <border-spacing> from neutral to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions: property <border-spacing> from neutral to [20px] at (1.5) should be [25px 25px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from neutral to [20px] at (-0.3) should be [7px 7px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from neutral to [20px] at (0) should be [10px 10px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from neutral to [20px] at (0.3) should be [13px 13px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from neutral to [20px] at (0.6) should be [16px 16px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from neutral to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from neutral to [20px] at (1.5) should be [25px 25px]
|
||||
Fail CSS Animations: property <border-spacing> from neutral to [20px] at (-0.3) should be [7px 7px]
|
||||
Fail CSS Animations: property <border-spacing> from neutral to [20px] at (0) should be [10px 10px]
|
||||
Fail CSS Animations: property <border-spacing> from neutral to [20px] at (0.3) should be [13px 13px]
|
||||
Fail CSS Animations: property <border-spacing> from neutral to [20px] at (0.6) should be [16px 16px]
|
||||
Pass CSS Animations: property <border-spacing> from neutral to [20px] at (1) should be [20px 20px]
|
||||
Fail CSS Animations: property <border-spacing> from neutral to [20px] at (1.5) should be [25px 25px]
|
||||
Fail Web Animations: property <border-spacing> from neutral to [20px] at (-0.3) should be [7px 7px]
|
||||
Fail Web Animations: property <border-spacing> from neutral to [20px] at (0) should be [10px 10px]
|
||||
Fail Web Animations: property <border-spacing> from neutral to [20px] at (0.3) should be [13px 13px]
|
||||
Fail Web Animations: property <border-spacing> from neutral to [20px] at (0.6) should be [16px 16px]
|
||||
Pass Web Animations: property <border-spacing> from neutral to [20px] at (1) should be [20px 20px]
|
||||
Fail Web Animations: property <border-spacing> from neutral to [20px] at (1.5) should be [25px 25px]
|
||||
Fail CSS Transitions: property <border-spacing> from [initial] to [20px] at (-0.3) should be [0px 0px]
|
||||
Pass CSS Transitions: property <border-spacing> from [initial] to [20px] at (0) should be [0px 0px]
|
||||
Pass CSS Transitions: property <border-spacing> from [initial] to [20px] at (0.3) should be [6px 6px]
|
||||
Pass CSS Transitions: property <border-spacing> from [initial] to [20px] at (0.6) should be [12px 12px]
|
||||
Pass CSS Transitions: property <border-spacing> from [initial] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions: property <border-spacing> from [initial] to [20px] at (1.5) should be [30px 30px]
|
||||
Fail CSS Transitions with transition: all: property <border-spacing> from [initial] to [20px] at (-0.3) should be [0px 0px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [initial] to [20px] at (0) should be [0px 0px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [initial] to [20px] at (0.3) should be [6px 6px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [initial] to [20px] at (0.6) should be [12px 12px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [initial] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [initial] to [20px] at (1.5) should be [30px 30px]
|
||||
Fail CSS Animations: property <border-spacing> from [initial] to [20px] at (-0.3) should be [0px 0px]
|
||||
Pass CSS Animations: property <border-spacing> from [initial] to [20px] at (0) should be [0px 0px]
|
||||
Pass CSS Animations: property <border-spacing> from [initial] to [20px] at (0.3) should be [6px 6px]
|
||||
Pass CSS Animations: property <border-spacing> from [initial] to [20px] at (0.6) should be [12px 12px]
|
||||
Pass CSS Animations: property <border-spacing> from [initial] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Animations: property <border-spacing> from [initial] to [20px] at (1.5) should be [30px 30px]
|
||||
Fail Web Animations: property <border-spacing> from [initial] to [20px] at (-0.3) should be [0px 0px]
|
||||
Pass Web Animations: property <border-spacing> from [initial] to [20px] at (0) should be [0px 0px]
|
||||
Pass Web Animations: property <border-spacing> from [initial] to [20px] at (0.3) should be [6px 6px]
|
||||
Pass Web Animations: property <border-spacing> from [initial] to [20px] at (0.6) should be [12px 12px]
|
||||
Pass Web Animations: property <border-spacing> from [initial] to [20px] at (1) should be [20px 20px]
|
||||
Pass Web Animations: property <border-spacing> from [initial] to [20px] at (1.5) should be [30px 30px]
|
||||
Pass CSS Transitions: property <border-spacing> from [inherit] to [20px] at (-0.3) should be [33px 33px]
|
||||
Pass CSS Transitions: property <border-spacing> from [inherit] to [20px] at (0) should be [30px 30px]
|
||||
Pass CSS Transitions: property <border-spacing> from [inherit] to [20px] at (0.3) should be [27px 27px]
|
||||
Pass CSS Transitions: property <border-spacing> from [inherit] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass CSS Transitions: property <border-spacing> from [inherit] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions: property <border-spacing> from [inherit] to [20px] at (1.5) should be [15px 15px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [inherit] to [20px] at (-0.3) should be [33px 33px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [inherit] to [20px] at (0) should be [30px 30px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [inherit] to [20px] at (0.3) should be [27px 27px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [inherit] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [inherit] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [inherit] to [20px] at (1.5) should be [15px 15px]
|
||||
Pass CSS Animations: property <border-spacing> from [inherit] to [20px] at (-0.3) should be [33px 33px]
|
||||
Pass CSS Animations: property <border-spacing> from [inherit] to [20px] at (0) should be [30px 30px]
|
||||
Pass CSS Animations: property <border-spacing> from [inherit] to [20px] at (0.3) should be [27px 27px]
|
||||
Pass CSS Animations: property <border-spacing> from [inherit] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass CSS Animations: property <border-spacing> from [inherit] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Animations: property <border-spacing> from [inherit] to [20px] at (1.5) should be [15px 15px]
|
||||
Pass Web Animations: property <border-spacing> from [inherit] to [20px] at (-0.3) should be [33px 33px]
|
||||
Pass Web Animations: property <border-spacing> from [inherit] to [20px] at (0) should be [30px 30px]
|
||||
Pass Web Animations: property <border-spacing> from [inherit] to [20px] at (0.3) should be [27px 27px]
|
||||
Pass Web Animations: property <border-spacing> from [inherit] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass Web Animations: property <border-spacing> from [inherit] to [20px] at (1) should be [20px 20px]
|
||||
Pass Web Animations: property <border-spacing> from [inherit] to [20px] at (1.5) should be [15px 15px]
|
||||
Pass CSS Transitions: property <border-spacing> from [unset] to [20px] at (-0.3) should be [33px 33px]
|
||||
Pass CSS Transitions: property <border-spacing> from [unset] to [20px] at (0) should be [30px 30px]
|
||||
Pass CSS Transitions: property <border-spacing> from [unset] to [20px] at (0.3) should be [27px 27px]
|
||||
Pass CSS Transitions: property <border-spacing> from [unset] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass CSS Transitions: property <border-spacing> from [unset] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions: property <border-spacing> from [unset] to [20px] at (1.5) should be [15px 15px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [unset] to [20px] at (-0.3) should be [33px 33px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [unset] to [20px] at (0) should be [30px 30px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [unset] to [20px] at (0.3) should be [27px 27px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [unset] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [unset] to [20px] at (1) should be [20px 20px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [unset] to [20px] at (1.5) should be [15px 15px]
|
||||
Fail CSS Animations: property <border-spacing> from [unset] to [20px] at (-0.3) should be [33px 33px]
|
||||
Fail CSS Animations: property <border-spacing> from [unset] to [20px] at (0) should be [30px 30px]
|
||||
Fail CSS Animations: property <border-spacing> from [unset] to [20px] at (0.3) should be [27px 27px]
|
||||
Fail CSS Animations: property <border-spacing> from [unset] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass CSS Animations: property <border-spacing> from [unset] to [20px] at (1) should be [20px 20px]
|
||||
Fail CSS Animations: property <border-spacing> from [unset] to [20px] at (1.5) should be [15px 15px]
|
||||
Fail Web Animations: property <border-spacing> from [unset] to [20px] at (-0.3) should be [33px 33px]
|
||||
Fail Web Animations: property <border-spacing> from [unset] to [20px] at (0) should be [30px 30px]
|
||||
Fail Web Animations: property <border-spacing> from [unset] to [20px] at (0.3) should be [27px 27px]
|
||||
Fail Web Animations: property <border-spacing> from [unset] to [20px] at (0.6) should be [24px 24px]
|
||||
Pass Web Animations: property <border-spacing> from [unset] to [20px] at (1) should be [20px 20px]
|
||||
Fail Web Animations: property <border-spacing> from [unset] to [20px] at (1.5) should be [15px 15px]
|
||||
Fail CSS Transitions: property <border-spacing> from [0px] to [10px] at (-0.3) should be [0px 0px]
|
||||
Pass CSS Transitions: property <border-spacing> from [0px] to [10px] at (0) should be [0px 0px]
|
||||
Pass CSS Transitions: property <border-spacing> from [0px] to [10px] at (0.3) should be [3px 3px]
|
||||
Pass CSS Transitions: property <border-spacing> from [0px] to [10px] at (0.6) should be [6px 6px]
|
||||
Pass CSS Transitions: property <border-spacing> from [0px] to [10px] at (1) should be [10px 10px]
|
||||
Pass CSS Transitions: property <border-spacing> from [0px] to [10px] at (1.5) should be [15px 15px]
|
||||
Fail CSS Transitions with transition: all: property <border-spacing> from [0px] to [10px] at (-0.3) should be [0px 0px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [0px] to [10px] at (0) should be [0px 0px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [0px] to [10px] at (0.3) should be [3px 3px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [0px] to [10px] at (0.6) should be [6px 6px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [0px] to [10px] at (1) should be [10px 10px]
|
||||
Pass CSS Transitions with transition: all: property <border-spacing> from [0px] to [10px] at (1.5) should be [15px 15px]
|
||||
Fail CSS Animations: property <border-spacing> from [0px] to [10px] at (-0.3) should be [0px 0px]
|
||||
Pass CSS Animations: property <border-spacing> from [0px] to [10px] at (0) should be [0px 0px]
|
||||
Pass CSS Animations: property <border-spacing> from [0px] to [10px] at (0.3) should be [3px 3px]
|
||||
Pass CSS Animations: property <border-spacing> from [0px] to [10px] at (0.6) should be [6px 6px]
|
||||
Pass CSS Animations: property <border-spacing> from [0px] to [10px] at (1) should be [10px 10px]
|
||||
Pass CSS Animations: property <border-spacing> from [0px] to [10px] at (1.5) should be [15px 15px]
|
||||
Fail Web Animations: property <border-spacing> from [0px] to [10px] at (-0.3) should be [0px 0px]
|
||||
Pass Web Animations: property <border-spacing> from [0px] to [10px] at (0) should be [0px 0px]
|
||||
Pass Web Animations: property <border-spacing> from [0px] to [10px] at (0.3) should be [3px 3px]
|
||||
Pass Web Animations: property <border-spacing> from [0px] to [10px] at (0.6) should be [6px 6px]
|
||||
Pass Web Animations: property <border-spacing> from [0px] to [10px] at (1) should be [10px 10px]
|
||||
Pass Web Animations: property <border-spacing> from [0px] to [10px] at (1.5) should be [15px 15px]
|
|
@ -0,0 +1,116 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<title>boder-spacing interpolation</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS2/tables.html#separated-borders">
|
||||
<meta name="assert" content="border-spacing supports animation">
|
||||
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/interpolation-testcommon.js"></script>
|
||||
|
||||
<style>
|
||||
.parent {
|
||||
border-spacing: 30px;
|
||||
}
|
||||
|
||||
.target {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: black;
|
||||
display: inline-block;
|
||||
margin: 18px;
|
||||
border-collapse: separate;
|
||||
border-spacing: 10px;
|
||||
}
|
||||
|
||||
.target td {
|
||||
background-color: white;
|
||||
border: 1px solid orange;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.expected {
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<template id="target-template">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
test_interpolation({
|
||||
property: 'border-spacing',
|
||||
from: neutralKeyframe,
|
||||
to: '20px',
|
||||
}, [
|
||||
{at: -0.3, expect: '7px 7px'},
|
||||
{at: 0, expect: '10px 10px'},
|
||||
{at: 0.3, expect: '13px 13px'},
|
||||
{at: 0.6, expect: '16px 16px'},
|
||||
{at: 1, expect: '20px 20px'},
|
||||
{at: 1.5, expect: '25px 25px'},
|
||||
]);
|
||||
|
||||
test_interpolation({
|
||||
property: 'border-spacing',
|
||||
from: 'initial',
|
||||
to: '20px',
|
||||
}, [
|
||||
{at: -0.3, expect: '0px 0px'},
|
||||
{at: 0, expect: '0px 0px'},
|
||||
{at: 0.3, expect: '6px 6px'},
|
||||
{at: 0.6, expect: '12px 12px'},
|
||||
{at: 1, expect: '20px 20px'},
|
||||
{at: 1.5, expect: '30px 30px'},
|
||||
]);
|
||||
|
||||
test_interpolation({
|
||||
property: 'border-spacing',
|
||||
from: 'inherit',
|
||||
to: '20px',
|
||||
}, [
|
||||
{at: -0.3, expect: '33px 33px'},
|
||||
{at: 0, expect: '30px 30px'},
|
||||
{at: 0.3, expect: '27px 27px'},
|
||||
{at: 0.6, expect: '24px 24px'},
|
||||
{at: 1, expect: '20px 20px'},
|
||||
{at: 1.5, expect: '15px 15px'},
|
||||
]);
|
||||
|
||||
test_interpolation({
|
||||
property: 'border-spacing',
|
||||
from: 'unset',
|
||||
to: '20px',
|
||||
}, [
|
||||
{at: -0.3, expect: '33px 33px'},
|
||||
{at: 0, expect: '30px 30px'},
|
||||
{at: 0.3, expect: '27px 27px'},
|
||||
{at: 0.6, expect: '24px 24px'},
|
||||
{at: 1, expect: '20px 20px'},
|
||||
{at: 1.5, expect: '15px 15px'},
|
||||
]);
|
||||
|
||||
test_interpolation({
|
||||
property: 'border-spacing',
|
||||
from: '0px',
|
||||
to: '10px'
|
||||
}, [
|
||||
{at: -0.3, expect: '0px 0px'}, // Can't be negative.
|
||||
{at: 0, expect: '0px 0px'},
|
||||
{at: 0.3, expect: '3px 3px'},
|
||||
{at: 0.6, expect: '6px 6px'},
|
||||
{at: 1, expect: '10px 10px'},
|
||||
{at: 1.5, expect: '15px 15px'}
|
||||
]);
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue