mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +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
|
@ -78,7 +78,7 @@ int LineBoxFragment::text_index_at(float x) const
|
|||
if (!is<TextNode>(layout_node()))
|
||||
return 0;
|
||||
auto& layout_text = downcast<TextNode>(layout_node());
|
||||
auto& font = layout_text.specified_style().font();
|
||||
auto& font = layout_text.font();
|
||||
Utf8View view(text());
|
||||
|
||||
float relative_x = x - absolute_x();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue