LibWeb: Use the cached white-space from LayoutStyle in text_for_style()
This commit is contained in:
parent
440b4ece22
commit
8960c6f8fe
Notes:
sideshowbarker
2024-07-19 05:24:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8960c6f8fe0
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
Reference in a new issue