1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibWeb: Don't assume opacity values are CSS numbers

...since they can also be percentages. Better to resolve them to a pair
of absolute values, and then compare those. :^)

Regressed in 921aee8c66.
This commit is contained in:
Andreas Kling 2023-07-31 08:26:30 +02:00
parent cb8664e2e1
commit 9937fcc5e1
3 changed files with 15 additions and 2 deletions

View file

@ -0,0 +1,12 @@
<script src="../include.js"></script>
<script>
test(() => {
document.body.style.opacity = '0.5';
document.body.offsetWidth
document.body.style.opacity = '100.0%';
document.body.offsetWidth
document.body.style.opacity = '0.5';
document.body.offsetWidth
println("Didn't crash :^)");
});
</script>