mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
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.
47 lines
907 B
JavaScript
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
|
|
];
|