mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +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
|
@ -112,13 +112,13 @@ CSSPixels Length::to_px(Layout::Node const& layout_node) const
|
|||
return to_px(viewport_rect, layout_node.font().pixel_metrics(), layout_node.computed_values().font_size(), root_element->layout_node()->computed_values().font_size());
|
||||
}
|
||||
|
||||
DeprecatedString Length::to_deprecated_string() const
|
||||
ErrorOr<String> Length::to_string() const
|
||||
{
|
||||
if (is_calculated())
|
||||
return m_calculated_style->to_deprecated_string();
|
||||
return m_calculated_style->to_string();
|
||||
if (is_auto())
|
||||
return "auto";
|
||||
return DeprecatedString::formatted("{}{}", m_value, unit_name());
|
||||
return String::from_utf8("auto"sv);
|
||||
return String::formatted("{}{}", m_value, unit_name());
|
||||
}
|
||||
|
||||
char const* Length::unit_name() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue