mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
bf16ddfbb0
Passing a value of a type different than number or length-percentage to transform-origin returned a null pointer, and we didn't take care of that path before. This patch fixes a crash caused by an incorrect CSS declaration, such as `transform-origin: "center"`. Fixes #21609
23 lines
627 B
HTML
23 lines
627 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
function serialize(input) {
|
|
const e = document.createElement("div");
|
|
e.style.transformOrigin = input;
|
|
const serialized = e.style.transformOrigin;
|
|
println(input + " => " + (serialized === '' ? '(invalid)' : serialized));
|
|
}
|
|
|
|
for (transformOrigin of [
|
|
'center',
|
|
'10px',
|
|
'25%',
|
|
'left 20%',
|
|
'20px bottom',
|
|
'top right',
|
|
'"center"',
|
|
]) {
|
|
serialize(transformOrigin);
|
|
}
|
|
});
|
|
</script>
|