1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:38:12 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators/LibWeb
Sam Atkins 4b554ba92a LibWeb: Clarify StyleValue API with new naming scheme
This does a few things, that are hard to separate. For a while now, it's
been confuzing what `StyleValue::is_foo()` actually means. It sometimes
was used to check the type, and sometimes to see if it could return a
certain value type. The new naming scheme is:

- `is_length()` - is it a LengthStyleValue?
- `as_length()` - casts it to LengthStyleValue
- `has_length()` - can it return a Length?
- `to_length()` - gets the internal value out (eg, Length)

This also means, no more `static_cast<LengthStyleValue const&>(*this)`
stuff when dealing with StyleValues. :^)

Hopefully this will be a bit clearer going forward. There are lots of
places using the original methods, so I'll be going through them to
hopefully catch any issues.
2021-09-24 15:01:43 +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: Clarify StyleValue API with new naming scheme 2021-09-24 15:01:43 +02:00
Generate_CSS_PropertyID_h.cpp LibWeb: Generate property_accepts_value() function :^) 2021-09-23 17:47:40 +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: Return undefined from generated setters, not an empty value 2021-09-24 12:57:04 +02:00