mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Don't crash when resolving style of grid template properties
Previously, attempting to get the computed value for a grid-template-rows or grid-template-columns property would cause a crash if the element had no associated paintable.
This commit is contained in:
committed by
Tim Ledbetter
parent
fa907029ee
commit
779de840af
@@ -0,0 +1 @@
|
||||
PASS (didn't crash)
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const noPaintableElement = document.createElement("br");
|
||||
document.body.appendChild(noPaintableElement);
|
||||
const style = getComputedStyle(noPaintableElement);
|
||||
let values = [];
|
||||
for (const propertyName of style) {
|
||||
values.push(style[propertyName]);
|
||||
}
|
||||
noPaintableElement.remove();
|
||||
println("PASS (didn't crash)");
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user