mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +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
|
@ -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_deprecated_string() });
|
||||
properties.append({ CSS::string_from_property_id(property_id), value.to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string() });
|
||||
});
|
||||
quick_sort(properties, [](auto& a, auto& b) { return a.name < b.name; });
|
||||
|
||||
|
@ -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_deprecated_string());
|
||||
builder.appendff(" {}: '{}'", CSS::string_from_property_id(property.property_id), property.value->to_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_deprecated_string());
|
||||
builder.appendff(" {}: '{}'", property.key, property.value.value->to_string());
|
||||
if (property.value.important == CSS::Important::Yes)
|
||||
builder.append(" \033[31;1m!important\033[0m"sv);
|
||||
builder.append('\n');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue