ladybird/Meta/Lagom/Tools/CodeGenerators/LibWeb
Sam Atkins 7ce8a91341 Meta: Generate functions for validating media-query values
These work differently from how we validate StyleValues. There, we parse
a StyleValue from the CSS, and then see if it is allowed in the
property. That causes problems when the syntax is ambiguous - for
example, `0` can be a number or a Length.

Here instead, we ask what kinds of value are allowed for a
media-feature, and then only attempt to parse those kinds of value.
This makes the ambiguity problem go away. :^)

Each media-feature in the spec only accepts one type of value, and/or
some identifiers. This makes the switch statements for the type a bit
excessive, but the spec does not *require* that only one type is
allowed, so this is more future-proof.
2022-03-09 23:06:30 +01:00
..
WrapperGenerator LibWeb: Add basic support for DOM's NodeIterator and NodeFilter 2022-03-09 16:43:00 +01:00
CMakeLists.txt Meta: Generate CSS::MediaFeatureID enum 2022-03-09 23:06:30 +01:00
Generate_CSS_MediaFeatureID_cpp.cpp Meta: Generate functions for validating media-query values 2022-03-09 23:06:30 +01:00
Generate_CSS_MediaFeatureID_h.cpp Meta: Generate functions for validating media-query values 2022-03-09 23:06:30 +01:00
Generate_CSS_PropertyID_cpp.cpp Meta: Move title/camel_casify() functions into their own file 2022-03-09 23:06:30 +01:00
Generate_CSS_PropertyID_h.cpp Meta: Move title/camel_casify() functions into their own file 2022-03-09 23:06:30 +01:00
Generate_CSS_ValueID_cpp.cpp Meta: Move title/camel_casify() functions into their own file 2022-03-09 23:06:30 +01:00
Generate_CSS_ValueID_h.cpp Meta: Move title/camel_casify() functions into their own file 2022-03-09 23:06:30 +01:00
GeneratorUtil.h Meta: Generate CSS::MediaFeatureID enum 2022-03-09 23:06:30 +01:00