mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
This test verifies that modifying clip-path via JavaScript properly
invalidates the accumulated visual context. Currently fails because the
clip-path in the display list remains unchanged after the style update.
Regression from 98afd82491.
27 lines
951 B
HTML
27 lines
951 B
HTML
<!doctype html>
|
|
<script src="../include.js"></script>
|
|
<style>
|
|
.box {
|
|
width: 100px;
|
|
height: 100px;
|
|
background: lightblue;
|
|
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
|
|
}
|
|
</style>
|
|
<div class="box" id="box">Box</div>
|
|
<script>
|
|
test(() => {
|
|
// NOTE: Display lists are captured first and printed later because println() modifies
|
|
// the DOM tree, causing layout updates that invalidate the accumulated visual context
|
|
// tree, which would affect the captured display lists.
|
|
const displayListBefore = internals.dumpDisplayList();
|
|
document.getElementById("box").style.clipPath = "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)";
|
|
const displayListAfter = internals.dumpDisplayList();
|
|
|
|
println("Before clip-path change:");
|
|
println(displayListBefore);
|
|
println("After clip-path change:");
|
|
println(displayListAfter);
|
|
});
|
|
</script>
|