LibWeb: Check CanvasTextDrawingStyles.font assignment is valid

Checking that the string parsed for the `font` property is not enough,
the spec also wants to rule out CSS-wide keywords like `inherit`. The
simplest way to do so is to check if it's a ShorthandStyleValue, which
also rules out use of `var()`; this matches other browsers' behaviour.

The newly-added test would previously crash, and now doesn't. :^)
This commit is contained in:
Sam Atkins 2024-07-23 16:14:26 +01:00 committed by Andreas Kling
commit 64d45afd8a
Notes: github-actions[bot] 2024-07-23 16:01:08 +00:00
3 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,4 @@
normal normal 20px SerenitySans
normal normal 20px SerenitySans
normal normal 20px SerenitySans
normal normal 20px SerenitySans