summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-11-15 17:39:04 +0000
committerAndreas Kling <kling@serenityos.org>2021-11-17 22:20:01 +0100
commit16d9ae0f88d3b906120263590721a805a8495e7a (patch)
tree1cd7af6c815116970330afc024973d8e04433458 /Userland/Libraries/LibWeb
parent7089681f6811a0f81270a665f1ba1849c54d7a01 (diff)
downloadserenity-16d9ae0f88d3b906120263590721a805a8495e7a.zip
LibWeb: Stop consuming too many tokens when parsing background-position
This was causing inputs like `0% 0%` to think only one value was provided.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index a009ed42c7..97188ede9b 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -2647,7 +2647,7 @@ RefPtr<StyleValue> Parser::parse_single_background_position_value(TokenStream<St
if (seen_items == 2)
break;
- auto& token = tokens.next_token();
+ auto& token = tokens.peek_token();
auto maybe_value = parse_css_value(token);
if (!maybe_value || !property_accepts_value(PropertyID::BackgroundPosition, *maybe_value))
break;