1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:08:12 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators
Sam Atkins 6ea9edf84b LibWeb: Generate shorthand initial values after their longhands
When parsing shorthand values, we'd like to use
`property_initial_value()` to get their longhand property values,
instead of hard-coding them as we currently do. That involves
recursively calling that function while the `initial_values` map is
being initialized, which causes problems because the shorthands appear
alphabetically before their longhand components, so the longhands aren't
initialized yet!

The solution here is to perform 2 passes when generating the code,
outputting properties without "longhands" first, and the rest after.
This could potentially cause issues when shorthands have multiple
levels, in particular `border` -> `border-color` -> `border-left-color`.
But, we do not currently define a default value for `border`, and
`border-color` takes only a single value, so it's fine for now. :^)
2021-09-17 23:06:45 +02:00
..
IPCCompiler Meta: Define and use lagom_tool() CMake helper function for all Tools 2021-09-15 19:04:52 +04:30
LibUnicode Meta: Define and use lagom_tool() CMake helper function for all Tools 2021-09-15 19:04:52 +04:30
LibWeb LibWeb: Generate shorthand initial values after their longhands 2021-09-17 23:06:45 +02:00
StateMachineGenerator Meta: Define and use lagom_tool() CMake helper function for all Tools 2021-09-15 19:04:52 +04:30
CMakeLists.txt Everywhere: Move all host tools into the Lagom/Tools subdirectory 2021-08-28 08:44:17 +01:00