mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Use update_style_if_needed_for_element() and resolve colors via computed properties instead of forcing a full layout update.
14 lines
394 B
HTML
14 lines
394 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
// Setting fillStyle on a detached canvas (no layout node) should not crash.
|
|
const canvas = document.createElement("canvas");
|
|
const ctx = canvas.getContext("2d");
|
|
ctx.fillStyle = "red";
|
|
println(ctx.fillStyle);
|
|
ctx.fillStyle = "rgba(0, 128, 255, 0.5)";
|
|
println(ctx.fillStyle);
|
|
});
|
|
</script>
|