mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
Before this change, the layout tree for slots was only updated after
creating a layout node for the slot itself. This was not enough to
account for partial layout tree rebuilds when the slot content changed.
With this change, we always recurse into the slot content.
Fixes expanding and collapsing of nodes in DOM tree inspector broken in
9b26f7eb0f
38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<style>
|
|
details {
|
|
margin: 10px 0;
|
|
padding: 10px;
|
|
background-color: magenta;
|
|
}
|
|
|
|
details details {
|
|
background-color: mediumaquamarine;
|
|
margin-left: 20px;
|
|
}
|
|
</style>
|
|
<script src="../include.js"></script>
|
|
</head>
|
|
<body>
|
|
<details id="outer-details"><summary>outer title</summary>
|
|
<div>outer title</div>
|
|
<details id="inner-details">
|
|
<summary>inner title</summary>
|
|
<p id="nested-details-content">inner content</p>
|
|
</details>
|
|
</details>
|
|
</body>
|
|
<script>
|
|
test(() => {
|
|
const nestedDetailsContent = document.getElementById('nested-details-content');
|
|
println(nestedDetailsContent.getBoundingClientRect().width);
|
|
const outerDetails = document.getElementById('outer-details');
|
|
outerDetails.open = true;
|
|
println(nestedDetailsContent.getBoundingClientRect().width);
|
|
const innerDetails = document.getElementById('inner-details');
|
|
innerDetails.open = true;
|
|
println(nestedDetailsContent.getBoundingClientRect().width);
|
|
});
|
|
</script>
|
|
</html>
|