Skip to content

Truly independent web browser

1.2 KB
Raw Blame
<!DOCTYPE html>
<script src="../include.js"></script>
<script src="../work-test.js"></script>
<style>
    body { margin: 0; }
    #scroller { overflow: hidden; width: 100px; height: 100px; }
    #slide { width: 50px; height: 50px; transform: translateX(0); }
    #other { height: 10px; }
</style>
<div id="scroller"><div id="slide"></div></div>
<div id="other"></div>
<script>
    visualContextTest({
        setup: async () => {
            internals.forceIncompatibleVisualContextTreeRebuild();
            while (internals.frameSchedulerState() !== "idle")
                await new Promise(resolve => setTimeout(resolve, 0));
        },
        steps: [
            {
                name: "a transformed child makes its parent scrollable during a full relayout",
                mutate: () => {
                    slide.style.transform = "translateX(200px)";
                    other.style.height = "20px";
                },
                expect: `
                    update DIRTY-PATH
                      div#scroller scroll ALLOCATED
                      div#slide transform REPURPOSED
                      epoch NEW
                      recording NEEDED
                `,
            },
        ],
    });
</script>