LibWeb: Clamp computed value for font-style oblique angle

Values outside [-90deg,90deg] are invalid and should be clamped
This commit is contained in:
Callum Law 2025-09-03 19:30:32 +12:00 committed by Sam Atkins
commit e17d91780d
Notes: github-actions[bot] 2025-09-19 09:07:38 +00:00
5 changed files with 13 additions and 8 deletions

View file

@ -2979,6 +2979,7 @@ RefPtr<StyleValue const> Parser::parse_font_style_value(TokenStream<ComponentVal
auto font_style = keyword_to_font_style(keyword_value->to_keyword());
VERIFY(font_style.has_value());
if (tokens.has_next_token() && keyword_value->to_keyword() == Keyword::Oblique) {
auto context_guard = push_temporary_value_parsing_context(SpecialContext::FontStyleObliqueAngle);
if (auto angle_value = parse_angle_value(tokens)) {
if (angle_value->is_angle()) {
auto angle = angle_value->as_angle().angle();