1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators/LibWeb
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
..
CMakeLists.txt Meta: Define and use lagom_tool() CMake helper function for all Tools 2021-09-15 19:04:52 +04:30
Generate_CSS_PropertyID_cpp.cpp LibWeb: Generate shorthand initial values after their longhands 2021-09-17 23:06:45 +02:00
Generate_CSS_PropertyID_h.cpp LibWeb: Generate CSS::{first,last}_property_id constants 2021-09-13 22:21:57 +02:00
Generate_CSS_ValueID_cpp.cpp Everywhere: Move all host tools into the Lagom/Tools subdirectory 2021-08-28 08:44:17 +01:00
Generate_CSS_ValueID_h.cpp Everywhere: Move all host tools into the Lagom/Tools subdirectory 2021-08-28 08:44:17 +01:00
WrapperGenerator.cpp LibWeb: Add the IdleDeadline interface from the RequestIdleCallback spec 2021-09-17 13:20:18 +02:00