mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb: Use LengthPercentage for calc values in Transformation matrix
This commit is contained in:
parent
e2b2b2439c
commit
a8ef84f8c3
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/a8ef84f8c3 Pull-request: https://github.com/SerenityOS/serenity/pull/24443 Issue: https://github.com/SerenityOS/serenity/issues/23633 Issue: https://github.com/SerenityOS/serenity/issues/24375
@ -0,0 +1 @@
|
||||
PASS! (Didn't crash)
|
@ -0,0 +1,21 @@
|
||||
<!-- https://github.com/SerenityOS/serenity/issues/23633 -->
|
||||
<style>
|
||||
div {
|
||||
--some-var: -100px;
|
||||
animation: anim 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes anim {
|
||||
to {
|
||||
transform: translateX(calc(var(--some-var) * -1));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
promiseTest(async () => {
|
||||
await animationFrame();
|
||||
println("PASS! (Didn't crash)");
|
||||
});
|
||||
</script>
|
@ -870,7 +870,7 @@ static RefPtr<StyleValue const> interpolate_transform(DOM::Element& element, Sty
|
||||
values.append(AngleOrCalculated { value->as_angle().angle() });
|
||||
break;
|
||||
case StyleValue::Type::Calculated:
|
||||
values.append(AngleOrCalculated { value->as_calculated() });
|
||||
values.append(LengthPercentage { value->as_calculated() });
|
||||
break;
|
||||
case StyleValue::Type::Length:
|
||||
values.append(LengthPercentage { value->as_length().length() });
|
||||
|
Loading…
Reference in New Issue
Block a user