mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +00:00
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. |
||
---|---|---|
.. | ||
WrapperGenerator | ||
CMakeLists.txt | ||
Generate_CSS_MediaFeatureID_cpp.cpp | ||
Generate_CSS_MediaFeatureID_h.cpp | ||
Generate_CSS_PropertyID_cpp.cpp | ||
Generate_CSS_PropertyID_h.cpp | ||
Generate_CSS_ValueID_cpp.cpp | ||
Generate_CSS_ValueID_h.cpp | ||
GeneratorUtil.h |