summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/Node.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-23 14:54:21 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-23 14:54:21 +0100
commit5118a4c1e7f7d74f85fdf5c18d0b685baf0727e7 (patch)
tree85385cdf18f07751d785aa5fb1be63c193aed603 /Userland/Libraries/LibWeb/Layout/Node.cpp
parent632928a11e23339bdc124535c3c8676ab0d8a4f0 (diff)
downloadserenity-5118a4c1e7f7d74f85fdf5c18d0b685baf0727e7.zip
LibWeb: Parse CSS "font-variant" as part of "font"
This allows us to parse CSS "font" values that contain e.g "small-caps" or "normal", as used on Acid3.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Node.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/Node.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Node.cpp b/Userland/Libraries/LibWeb/Layout/Node.cpp
index efcba78b36..2dcb2db966 100644
--- a/Userland/Libraries/LibWeb/Layout/Node.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Node.cpp
@@ -363,6 +363,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
computed_values.set_font_size(specified_style.property(CSS::PropertyID::FontSize).value()->to_length().to_px(*this));
computed_values.set_font_weight(specified_style.property(CSS::PropertyID::FontWeight).value()->to_integer());
+ if (auto maybe_font_variant = specified_style.font_variant(); maybe_font_variant.has_value())
+ computed_values.set_font_variant(maybe_font_variant.release_value());
+
// FIXME: BorderXRadius properties are now BorderRadiusStyleValues, so make use of that.
auto border_bottom_left_radius = specified_style.property(CSS::PropertyID::BorderBottomLeftRadius);
if (border_bottom_left_radius.has_value() && border_bottom_left_radius.value()->is_border_radius())