mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 04:59:23 +00:00
LibWeb: Clamp computed value for font-style oblique angle
Values outside [-90deg,90deg] are invalid and should be clamped
This commit is contained in:
parent
dc41d045d8
commit
e17d91780d
Notes:
github-actions[bot]
2025-09-19 09:07:38 +00:00
Author: https://github.com/Calme1709
Commit: e17d91780d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6072
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 13 additions and 8 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue