forked from SerenityOS/serenity
-
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: Prevent transform interpolations from failing
Style computation should never fail. Instead, we just ignore the transformation that led to the invalid matrix.
- Loading branch information
1 parent
4d8bc16
commit 8bb635b
Showing
3 changed files
with
66 additions
and
32 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
Tests/LibWeb/Text/expected/invalid-transform-interpolation-does-not-crash.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 @@ | ||
no crash! |
14 changes: 14 additions & 0 deletions
14
Tests/LibWeb/Text/input/invalid-transform-interpolation-does-not-crash.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,14 @@ | ||
<div id="foo"></div> | ||
<script src="include.js"></script> | ||
<script> | ||
asyncTest(done => { | ||
document.getElementById("foo").animate( | ||
{ transform: ["scale(0)", "scale(0)"] }, | ||
{ duration: 1000 }, | ||
); | ||
requestAnimationFrame(() => { | ||
println("no crash!"); | ||
done(); | ||
}); | ||
}); | ||
</script> |
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