ladybird/Userland/Libraries/LibWeb/CSS
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
..
Parser LibWeb: Use property_accepts_value() for parsing text-decoration 2021-09-23 17:47:40 +02:00
.gitignore
ComputedCSSStyleDeclaration.cpp LibWeb: Simplify ComputedCSSStyleDeclaration property lookup 2021-09-18 13:14:40 +02:00
ComputedCSSStyleDeclaration.h LibWeb: Simplify ComputedCSSStyleDeclaration property lookup 2021-09-18 13:14:40 +02:00
ComputedValues.h LibWeb: Add transform property to the system 2021-09-18 21:53:37 +02:00
CSSImportRule.cpp LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
CSSImportRule.h LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
CSSRule.cpp
CSSRule.h
CSSStyleDeclaration.cpp LibWeb: Implement CSSStyleDeclaration.getPropertyValue(property) 2021-09-12 20:44:50 +02:00
CSSStyleDeclaration.h LibWeb: Implement CSSStyleDeclaration.getPropertyValue(property) 2021-09-12 20:44:50 +02:00
CSSStyleDeclaration.idl LibWeb: Implement CSSStyleDeclaration.getPropertyValue(property) 2021-09-12 20:44:50 +02:00
CSSStyleRule.cpp LibWeb: Make CSS::Selector reference counted 2021-07-14 13:31:00 +02:00
CSSStyleRule.h LibWeb: Make CSS::Selector reference counted 2021-07-14 13:31:00 +02:00
CSSStyleSheet.cpp
CSSStyleSheet.h
CSSStyleSheet.idl
Default.css
Identifiers.json LibWeb: Add several CSS identifiers to the list 2021-09-23 17:47:40 +02:00
Length.cpp LibWeb: Handle CSS "ch" length unit (mostly) 2021-08-25 17:55:53 +02:00
Length.h LibWeb: Make CSS::Length::m_calculated_style a RefPtr 2021-09-21 12:33:15 +02:00
LengthBox.h
MediaQueryList.cpp LibWeb: Implement MediaQueryList.{addListener,removeListener} 2021-09-13 01:43:03 +02:00
MediaQueryList.h LibWeb: Implement MediaQueryList.{addListener,removeListener} 2021-09-13 01:43:03 +02:00
MediaQueryList.idl LibWeb: Implement MediaQueryList.{addListener,removeListener} 2021-09-13 01:43:03 +02:00
Properties.json LibWeb: Add range-checking to property_accepts_value() 2021-09-23 17:47:40 +02:00
QuirksMode.css
Screen.cpp LibWeb: Add DOM::Window::page() 2021-09-09 21:25:10 +02:00
Screen.h
Screen.idl
Selector.cpp AK: Move FormatParser definition from header to implementation file 2021-08-19 23:49:25 +02:00
Selector.h Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
SelectorEngine.cpp Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
SelectorEngine.h LibWeb: Convert CSS Dump, Selector, & SelectorEngine to east const 2021-07-14 13:31:00 +02:00
StyleInvalidator.cpp
StyleInvalidator.h
StyleProperties.cpp LibWeb: Clarify StyleValue API with new naming scheme 2021-09-24 15:01:43 +02:00
StyleProperties.h LibWeb: Start implementing the CSS cascade 2021-09-21 12:49:28 +02:00
StyleResolver.cpp LibWeb: Remove type checking from set_property_expanding_shorthands() 2021-09-23 17:47:40 +02:00
StyleResolver.h LibWeb: Start implementing the CSS cascade 2021-09-21 12:49:28 +02:00
StyleSheet.cpp
StyleSheet.h
StyleSheet.idl
StyleSheetList.cpp
StyleSheetList.h
StyleSheetList.idl
StyleValue.cpp LibWeb: Clarify StyleValue API with new naming scheme 2021-09-24 15:01:43 +02:00
StyleValue.h LibWeb: Clarify StyleValue API with new naming scheme 2021-09-24 15:01:43 +02:00