Files
ladybird/Meta/Lagom/Tools/CodeGenerators/LibWeb/CMakeLists.txt
Sam Atkins 82f5be871a LibWeb: Generate the "Numeric Factory" OM methods on the CSS namespace
Generating boilerplate is nice! This also has the bonus that we're more
correct: I included all the units listed in the spec before,
(see https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory )
but we're supposed to exactly include ones for the units we support:

> If an implementation supports additional CSS units that do not have a
  corresponding method in the above list, but that do correspond to one
  of the existing CSSNumericType values, it must additionally support
  such a method, named after the unit in its defined canonical casing,
  using the generic behavior defined above.

> If an implementation does not support a given unit, it must not
  implement its corresponding method from the list above.

Now, our factory functions will exactly match the units we support.

The changed test result is partly the order being different, and partly
that the container-query units are no longer included as we don't
actually support them.
2025-09-11 17:06:44 +01:00

21 lines
1.6 KiB
CMake

set(SOURCES "") # avoid pulling SOURCES from parent scope
lagom_tool(GenerateCSSDescriptors SOURCES GenerateCSSDescriptors.cpp LIBS LibMain)
lagom_tool(GenerateCSSEnums SOURCES GenerateCSSEnums.cpp LIBS LibMain)
lagom_tool(GenerateCSSEnvironmentVariable SOURCES GenerateCSSEnvironmentVariable.cpp LIBS LibMain)
lagom_tool(GenerateCSSKeyword SOURCES GenerateCSSKeyword.cpp LIBS LibMain)
lagom_tool(GenerateCSSMathFunctions SOURCES GenerateCSSMathFunctions.cpp LIBS LibMain)
lagom_tool(GenerateCSSMediaFeatureID SOURCES GenerateCSSMediaFeatureID.cpp LIBS LibMain)
lagom_tool(GenerateCSSNumericFactoryMethods SOURCES GenerateCSSNumericFactoryMethods.cpp LIBS LibMain)
lagom_tool(GenerateCSSPropertyID SOURCES GenerateCSSPropertyID.cpp LIBS LibMain)
lagom_tool(GenerateCSSPseudoClass SOURCES GenerateCSSPseudoClass.cpp LIBS LibMain)
lagom_tool(GenerateCSSPseudoElement SOURCES GenerateCSSPseudoElement.cpp LIBS LibMain)
lagom_tool(GenerateCSSStyleProperties SOURCES GenerateCSSStyleProperties.cpp LIBS LibMain)
lagom_tool(GenerateCSSTransformFunctions SOURCES GenerateCSSTransformFunctions.cpp LIBS LibMain)
lagom_tool(GenerateCSSUnits SOURCES GenerateCSSUnits.cpp LIBS LibMain)
lagom_tool(GenerateWindowOrWorkerInterfaces SOURCES GenerateWindowOrWorkerInterfaces.cpp LIBS LibMain LibIDL)
lagom_tool(GenerateAriaRoles SOURCES GenerateAriaRoles.cpp LIBS LibMain)
lagom_tool(GenerateNamedCharacterReferences SOURCES GenerateNamedCharacterReferences.cpp LIBS LibMain)
add_subdirectory(BindingsGenerator)