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

LibWeb: Move length-unit-from-string code into Length

This means the units are defined in a single place instead of two.

Also removed the verify that we didn't produce a bogus % dimension token
in the Tokenizer, since this has never happened and the parser is not a
tokenizer test suite. :^)
This commit is contained in:
Sam Atkins 2022-02-22 12:10:48 +00:00 committed by Andreas Kling
parent 608bfac2a9
commit f76a541819
3 changed files with 41 additions and 38 deletions

View file

@ -34,6 +34,8 @@ public:
Vmin,
};
static Optional<Type> unit_from_name(StringView);
// We have a RefPtr<CalculatedStyleValue> member, but can't include the header StyleValue.h as it includes
// this file already. To break the cyclic dependency, we must move all method definitions out.
Length(int value, Type type);