mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
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.
This commit is contained in:
parent
632928a11e
commit
5118a4c1e7
6 changed files with 37 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue