mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWeb: Use the cached white-space from LayoutStyle in text_for_style()
This commit is contained in:
@@ -59,7 +59,7 @@ const String& LayoutText::text_for_style(const StyleProperties& style) const
|
||||
{
|
||||
static String one_space = " ";
|
||||
if (is_all_whitespace(node().data())) {
|
||||
if (style.string_or_fallback(CSS::PropertyID::WhiteSpace, "normal") == "normal")
|
||||
if (style.white_space().value_or(CSS::WhiteSpace::Normal) == CSS::WhiteSpace::Normal)
|
||||
return one_space;
|
||||
}
|
||||
return node().data();
|
||||
|
||||
Reference in New Issue
Block a user