From 8960c6f8fe01f16869413139e2e405f74a50d08d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 24 Jun 2020 21:44:11 +0200 Subject: [PATCH] LibWeb: Use the cached white-space from LayoutStyle in text_for_style() --- Libraries/LibWeb/Layout/LayoutText.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Layout/LayoutText.cpp b/Libraries/LibWeb/Layout/LayoutText.cpp index bb26f24d78..027aaa9944 100644 --- a/Libraries/LibWeb/Layout/LayoutText.cpp +++ b/Libraries/LibWeb/Layout/LayoutText.cpp @@ -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();