1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:37:34 +00:00

LibWeb: Bounds-check parsed CSS types

This reintroduces bounds-checking for the CSS `<angle>`, `<frequency>`,
`<integer>`, `<length>`, `<number>`, `<percentage>`, `<resolution>`,
and `<time>` types.

I regressed this around 6b8f484114 when
changing how we parsed StyleValues.

This is an improvement from before though, since we now allow the bounds
of a dimension type to have units.

Added a test to make sure we don't regress this again. :^)
This commit is contained in:
Sam Atkins 2023-06-02 15:15:45 +01:00 committed by Andreas Kling
parent 51f75d7071
commit 1f2629f132
3 changed files with 37 additions and 14 deletions

View file

@ -0,0 +1,9 @@
<!doctype html><style>
* {
font: 16px SerenitySans;
}
div {
border: 1px solid black;
max-width: -90px;
}
</style><div>Well, hello friends!</div>