mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibWeb: Handle animating 'initial' property values
This commit is contained in:
parent
2adb4c460d
commit
64ec66e209
Notes:
sideshowbarker
2024-07-17 07:08:37 +09:00
Author: https://github.com/mattco98
Commit: 64ec66e209
Pull-request: https://github.com/SerenityOS/serenity/pull/24514
1 changed files with 5 additions and 1 deletions
|
@ -504,10 +504,14 @@ static WebIDL::ExceptionOr<Vector<BaseKeyframe>> process_a_keyframes_argument(JS
|
||||||
if (maybe_parser.is_error())
|
if (maybe_parser.is_error())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (auto style_value = maybe_parser.release_value().parse_as_css_value(*property))
|
if (auto style_value = maybe_parser.release_value().parse_as_css_value(*property)) {
|
||||||
|
// Handle 'initial' here so we don't have to get the default value of the property every frame in StyleComputer
|
||||||
|
if (style_value->is_initial())
|
||||||
|
style_value = CSS::property_initial_value(realm, *property);
|
||||||
parsed_properties.set(*property, *style_value);
|
parsed_properties.set(*property, *style_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
keyframe.properties.set(move(parsed_properties));
|
keyframe.properties.set(move(parsed_properties));
|
||||||
|
|
||||||
// 2. Let the timing function of frame be the result of parsing the "easing" property on frame using the CSS
|
// 2. Let the timing function of frame be the result of parsing the "easing" property on frame using the CSS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue