forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Support interpolation of mixed percentage dimension units
- Loading branch information
1 parent
ef766b0
commit e2cb25e
Showing
3 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
Tests/LibWeb/Text/expected/WebAnimations/misc/animate-with-mixed-percentages.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
box is moving in the correct direction: true |
34 changes: 34 additions & 0 deletions
34
Tests/LibWeb/Text/input/WebAnimations/misc/animate-with-mixed-percentages.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
div { | ||
position: absolute; | ||
animation: moveRight 2s linear; | ||
} | ||
|
||
@keyframes moveRight { | ||
from { | ||
left: 0; | ||
} | ||
to { | ||
left: 100%; | ||
transform: translateX(-100%); | ||
} | ||
} | ||
</style> | ||
<body> | ||
<div id="foo"></div> | ||
<script src="../../include.js"></script> | ||
<script> | ||
promiseTest(async () => { | ||
const foo = document.getElementById("foo"); | ||
const timeline = internals.createInternalAnimationTimeline(); | ||
const anim = foo.getAnimations()[0]; | ||
anim.timeline = timeline; | ||
timeline.setTime(1000); | ||
|
||
await animationFrame(); | ||
const bounds = foo.getBoundingClientRect(); | ||
println(`box is moving in the correct direction: ${bounds.left > 0}`); | ||
}); | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters