mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibWeb+WebContent: Use new String class in CSS::StyleValue
Converts uses of DeprecatedString to String in StyleValue, and patches surrounding files that depend on these functions.
This commit is contained in:
parent
1c2e7b1e47
commit
ce0f41b9fb
37 changed files with 335 additions and 330 deletions
|
@ -81,7 +81,7 @@ CSS::Size StyleProperties::size_value(CSS::PropertyID id) const
|
|||
}
|
||||
|
||||
// FIXME: Support `fit-content(<length>)`
|
||||
dbgln("FIXME: Unsupported size value: `{}`, treating as `auto`", value->to_deprecated_string());
|
||||
dbgln("FIXME: Unsupported size value: `{}`, treating as `auto`", value->to_string());
|
||||
return CSS::Size::make_auto();
|
||||
}
|
||||
|
||||
|
@ -191,13 +191,13 @@ float StyleProperties::opacity() const
|
|||
if (maybe_percentage.has_value())
|
||||
unclamped_opacity = maybe_percentage->as_fraction();
|
||||
else
|
||||
dbgln("Unable to resolve calc() as opacity (percentage): {}", value->to_deprecated_string());
|
||||
dbgln("Unable to resolve calc() as opacity (percentage): {}", value->to_string());
|
||||
} else {
|
||||
auto maybe_number = value->as_calculated().resolve_number();
|
||||
if (maybe_number.has_value())
|
||||
unclamped_opacity = maybe_number.value();
|
||||
else
|
||||
dbgln("Unable to resolve calc() as opacity (number): {}", value->to_deprecated_string());
|
||||
dbgln("Unable to resolve calc() as opacity (number): {}", value->to_string());
|
||||
}
|
||||
} else if (value->is_percentage()) {
|
||||
unclamped_opacity = value->as_percentage().percentage().as_fraction();
|
||||
|
@ -488,7 +488,7 @@ CSS::ContentData StyleProperties::content() const
|
|||
StringBuilder builder;
|
||||
for (auto const& item : content_style_value.content().values()) {
|
||||
if (item.is_string()) {
|
||||
builder.append(item.to_deprecated_string());
|
||||
builder.append(item.to_string().release_value_but_fixme_should_propagate_errors());
|
||||
} else {
|
||||
// TODO: Implement quotes, counters, images, and other things.
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ CSS::ContentData StyleProperties::content() const
|
|||
StringBuilder alt_text_builder;
|
||||
for (auto const& item : content_style_value.alt_text()->values()) {
|
||||
if (item.is_string()) {
|
||||
alt_text_builder.append(item.to_deprecated_string());
|
||||
alt_text_builder.append(item.to_string().release_value_but_fixme_should_propagate_errors());
|
||||
} else {
|
||||
// TODO: Implement counters
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ Vector<CSS::TextDecorationLine> StyleProperties::text_decoration_line() const
|
|||
if (value->is_identifier() && value->to_identifier() == ValueID::None)
|
||||
return {};
|
||||
|
||||
dbgln("FIXME: Unsupported value for text-decoration-line: {}", value->to_deprecated_string());
|
||||
dbgln("FIXME: Unsupported value for text-decoration-line: {}", value->to_string());
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue