1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:58:14 +00:00
serenity/Userland
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
..
Applets LibGUI: Rename CallOnChange => AllowCallback and implement elsewhere 2021-09-22 21:35:42 +02:00
Applications FontEditor: Allow editing new font header 2021-09-24 14:59:39 +02:00
Demos WidgetGallery: Crop animated cursors 2021-09-20 15:59:34 +02:00
DevTools LibGUI: Rename CallOnChange => AllowCallback and implement elsewhere 2021-09-22 21:35:42 +02:00
DynamicLoader Meta: Switch to a SuperBuild that splits host and target builds 2021-09-15 19:04:52 +04:30
Games Breakout: Tag fallthrough statement 2021-09-15 14:22:34 +00:00
Libraries LibWeb: Clarify StyleValue API with new naming scheme 2021-09-24 15:01:43 +02:00
Services WebContent: Pass an empty bitmap object if the pointer is null 2021-09-22 22:10:11 +02:00
Shell Shell: Make ArgsParser not exit on failure in builtin_exit() 2021-09-20 03:31:57 +04:30
Utilities diff: Only color output when stdout is a tty 2021-09-24 14:32:52 +02:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00