Files
ladybird/Tests/LibWeb/Text/input/wpt-import/web-animations/resources/timing-tests.js
Callum Law a1c9b86ad3 LibWeb: Account for non-shorthand sub-properties when serializing border
When parsing values in `process_a_keyframes_argument` we don't expand
properties using `StyleComputer::for_each_property_expanding_shorthands`
unlike most other places - this means that if we parse a `border` we end
up with the `border`'s sub-properties (`border-width`, `border-style`,
`border-color`) still in their unexpanded forms (`CSSKeywordValue`,
`LengthStyleValue`, `StyleValueList`, etc) rather than
`ShorthandStyleValue`s which causes a crash when serializing the
`border` value in `KeyframeEffect::get_keyframes`.

The proper fix here is to parse `border`'s sub-properties directly to
`ShorthandStyleValue`s instead of relying on
`StyleComputer::for_each_property_expanding_shorthand` to do this
conversion for us but this may be a while off.

This commit also imports the previously crashing tests.
2025-07-16 06:49:38 +01:00

47 lines
907 B
JavaScript

'use strict';
// =================================
//
// Common timing parameter test data
//
// =================================
// ------------------------------
// Delay values
// ------------------------------
const gBadDelayValues = [
NaN, Infinity, -Infinity
];
// ------------------------------
// Duration values
// ------------------------------
const gGoodDurationValues = [
{ specified: 123.45, computed: 123.45 },
{ specified: 'auto', computed: 0 },
{ specified: Infinity, computed: Infinity },
];
const gBadDurationValues = [
-1, NaN, -Infinity, 'abc', '100'
];
// ------------------------------
// iterationStart values
// ------------------------------
const gBadIterationStartValues = [
-1, NaN, Infinity, -Infinity
];
// ------------------------------
// iterations values
// ------------------------------
const gBadIterationsValues = [
-1, -Infinity, NaN
];