mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibWeb: Use the cached white-space from LayoutStyle in text_for_style()
This commit is contained in:
parent
440b4ece22
commit
8960c6f8fe
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue