mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +00:00
LibWeb: Make Layout::TextNode::text_for_rendering() lazily computed
As it turns out, Layout::TreeBuilder never managed to wrap text within table boxes in anonymous wrapper boxes, since it relied on checking text_for_rendering(), and that was never initialized during that early stage of tree building. This patch fixes the issue by making text_for_rendering() compute the (potentially collapsed) text lazily when called. Note that the test included with this patch is still totally wrong, but that is now a TFC problem rather than a TreeBuilder problem. :^)
This commit is contained in:
parent
5cdb394400
commit
b918ce4022
5 changed files with 69 additions and 7 deletions
|
@ -0,0 +1,24 @@
|
|||
<!doctype html><style>
|
||||
* {
|
||||
border: 1px solid black;
|
||||
}
|
||||
html {
|
||||
background: white;
|
||||
}
|
||||
.table {
|
||||
display: table;
|
||||
background: pink;
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
}
|
||||
.top {
|
||||
display: table-header-group;
|
||||
background: orange;
|
||||
height: 50px;
|
||||
}
|
||||
.bottom {
|
||||
display: table-footer-group;
|
||||
background: magenta;
|
||||
height: 50px;
|
||||
}
|
||||
</style><body class=table><div class=bottom>bottom</div><div class=top>top</div>
|
Loading…
Add table
Add a link
Reference in a new issue