1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

Everywhere: Rename to_{string => deprecated_string}() where applicable

This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
This commit is contained in:
Linus Groh 2022-12-06 01:12:49 +00:00 committed by Andreas Kling
parent 6e19ab2bbc
commit 57dc179b1f
597 changed files with 1973 additions and 1972 deletions

View file

@ -113,7 +113,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
builder.append('.');
builder.append(class_name);
}
identifier = builder.to_string();
identifier = builder.to_deprecated_string();
}
StringView nonbox_color_on = ""sv;
@ -264,7 +264,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
builder.appendff("start: {}, length: {}, rect: {}\n",
fragment.start(),
fragment.length(),
fragment.absolute_rect().to_string());
fragment.absolute_rect().to_deprecated_string());
if (is<Layout::TextNode>(fragment.layout_node())) {
for (size_t i = 0; i < indent; ++i)
builder.append(" "sv);
@ -283,7 +283,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
};
Vector<NameAndValue> properties;
verify_cast<DOM::Element>(*layout_node.dom_node()).computed_css_values()->for_each_property([&](auto property_id, auto& value) {
properties.append({ CSS::string_from_property_id(property_id), value.to_string() });
properties.append({ CSS::string_from_property_id(property_id), value.to_deprecated_string() });
});
quick_sort(properties, [](auto& a, auto& b) { return a.name < b.name; });
@ -602,7 +602,7 @@ void dump_font_face_rule(StringBuilder& builder, CSS::CSSFontFaceRule const& rul
builder.append("unicode-ranges:\n"sv);
for (auto const& unicode_range : font_face.unicode_ranges()) {
indent(builder, indent_levels + 2);
builder.appendff("{}\n", unicode_range.to_string());
builder.appendff("{}\n", unicode_range.to_deprecated_string());
}
}
@ -642,14 +642,14 @@ void dump_style_rule(StringBuilder& builder, CSS::CSSStyleRule const& rule, int
auto& style_declaration = verify_cast<CSS::PropertyOwningCSSStyleDeclaration>(rule.declaration());
for (auto& property : style_declaration.properties()) {
indent(builder, indent_levels);
builder.appendff(" {}: '{}'", CSS::string_from_property_id(property.property_id), property.value->to_string());
builder.appendff(" {}: '{}'", CSS::string_from_property_id(property.property_id), property.value->to_deprecated_string());
if (property.important == CSS::Important::Yes)
builder.append(" \033[31;1m!important\033[0m"sv);
builder.append('\n');
}
for (auto& property : style_declaration.custom_properties()) {
indent(builder, indent_levels);
builder.appendff(" {}: '{}'", property.key, property.value.value->to_string());
builder.appendff(" {}: '{}'", property.key, property.value.value->to_deprecated_string());
if (property.value.important == CSS::Important::Yes)
builder.append(" \033[31;1m!important\033[0m"sv);
builder.append('\n');