Files
ladybird/Tests/LibWeb/Text/input/HTML/canvas-set-stroke-style-without-layout-node.html
Andreas Kling 20cc055ec9 LibWeb: Don't require layout node when setting canvas 2D strokeStyle
Use update_style_if_needed_for_element() and resolve colors via
computed properties instead of forcing a full layout update.
2026-02-22 12:43:01 +01:00

14 lines
404 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
// Setting strokeStyle on a detached canvas (no layout node) should not crash.
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
ctx.strokeStyle = "red";
println(ctx.strokeStyle);
ctx.strokeStyle = "rgba(0, 128, 255, 0.5)";
println(ctx.strokeStyle);
});
</script>