LibWeb: Move and rename CSSStyleValue to StyleValues/StyleValue.{h,cpp}

This reverts 0e3487b9ab.

Back when I made that change, I thought we could make our StyleValue
classes match the typed-om definitions directly. However, they have
different requirements. Typed-om types need to be mutable and GCed,
whereas StyleValues are immutable and ideally wouldn't require a JS VM.

While I was already making such a cataclysmic change, I've moved it into
the StyleValues directory, because it *not* being there has bothered me
for a long time. 😅
This commit is contained in:
Sam Atkins 2025-08-08 10:11:51 +01:00 committed by Tim Ledbetter
commit c57975c9fd
Notes: github-actions[bot] 2025-08-08 14:20:54 +00:00
167 changed files with 989 additions and 990 deletions

View file

@ -1377,7 +1377,7 @@ Parser::PropertiesAndCustomProperties Parser::parse_as_property_declaration_bloc
Vector<StyleProperty> expanded_properties;
for (auto& property : properties) {
if (property_is_shorthand(property.property_id)) {
StyleComputer::for_each_property_expanding_shorthands(property.property_id, *property.value, [&](PropertyID longhand_property_id, CSSStyleValue const& longhand_value) {
StyleComputer::for_each_property_expanding_shorthands(property.property_id, *property.value, [&](PropertyID longhand_property_id, StyleValue const& longhand_value) {
expanded_properties.append(CSS::StyleProperty {
.important = property.important,
.property_id = longhand_property_id,
@ -1696,7 +1696,7 @@ Vector<ComponentValue> Parser::parse_as_list_of_component_values()
return parse_a_list_of_component_values(m_token_stream);
}
RefPtr<CSSStyleValue const> Parser::parse_as_css_value(PropertyID property_id)
RefPtr<StyleValue const> Parser::parse_as_css_value(PropertyID property_id)
{
auto component_values = parse_a_list_of_component_values(m_token_stream);
auto tokens = TokenStream(component_values);
@ -1706,7 +1706,7 @@ RefPtr<CSSStyleValue const> Parser::parse_as_css_value(PropertyID property_id)
return parsed_value.release_value();
}
RefPtr<CSSStyleValue const> Parser::parse_as_descriptor_value(AtRuleID at_rule_id, DescriptorID descriptor_id)
RefPtr<StyleValue const> Parser::parse_as_descriptor_value(AtRuleID at_rule_id, DescriptorID descriptor_id)
{
auto component_values = parse_a_list_of_component_values(m_token_stream);
auto tokens = TokenStream(component_values);