mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:35:07 +00:00
LibWeb: Store the used font in Layout::NodeWithStyle
This is a step towards not having to carry the full set of specified values around with every layout node.
This commit is contained in:
parent
5721b2a3da
commit
e187a5365a
7 changed files with 22 additions and 10 deletions
|
@ -65,7 +65,7 @@ void LineBox::trim_trailing_whitespace()
|
|||
return;
|
||||
auto& last_fragment = m_fragments.last();
|
||||
|
||||
int space_width = last_fragment.layout_node().specified_style().font().glyph_width(' ');
|
||||
int space_width = last_fragment.layout_node().font().glyph_width(' ');
|
||||
while (last_fragment.length() && isspace(last_text[last_fragment.length() - 1])) {
|
||||
last_fragment.m_length -= 1;
|
||||
last_fragment.set_width(last_fragment.width() - space_width);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue