diff options
author | Sam Atkins <atkinssj@gmail.com> | 2021-08-16 15:41:33 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-18 10:32:32 +0200 |
commit | b7aba70a28cd8277aff26aefd8e95ca8dc1d7e83 (patch) | |
tree | e3edac6f563155d1f5fc7fe44a6084f9c532bc2f /Userland/Libraries/LibWeb | |
parent | b64b97ef88ed826ec2e775b170a409e717fe033c (diff) | |
download | serenity-b7aba70a28cd8277aff26aefd8e95ca8dc1d7e83.zip |
LibWeb: Fix check for too many 'normal' values in font declaration
I had the values backwards, oops!
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 4d602c26eb..e76772186a 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2400,14 +2400,13 @@ RefPtr<StyleValue> Parser::parse_font_value(ParsingContext const& context, Vecto font_families = maybe_font_families.release_nonnull(); break; } - return nullptr; } // Since normal is the default value for all the properties that can have it, we don't have to actually // set anything to normal here. It'll be set when we create the FontStyleValue below. // We just need to make sure we were not given more normals than will fit. - int unset_value_count = (font_style ? 1 : 0) + (font_weight ? 1 : 0); + int unset_value_count = (font_style ? 0 : 1) + (font_weight ? 0 : 1); if (unset_value_count < normal_count) return nullptr; |