LibWeb: Add internals.dumpLayoutTree(node) API

This new testing API dumps the layout subtree rooted at a given DOM
node. It will be useful for testing partial layout tree rebuilds, where
we need to verify the layout tree structure for specific subtrees rather
than the entire document.
This commit is contained in:
Aliaksandr Kalenik
2026-02-09 20:23:05 +01:00
committed by Jelle Raaijmakers
parent aa24da8a93
commit 5be98aaa07
Notes: github-actions[bot] 2026-02-09 20:06:59 +00:00
5 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<div id="target" style="width: 100px; height: 50px;">
<span>Hello</span>
</div>
<script>
test(() => {
const el = document.getElementById("target");
println(internals.dumpLayoutTree(el));
});
</script>