mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Port ComputedValues to new Strings
This commit is contained in:
parent
9e735cc02e
commit
e338ef4914
Notes:
sideshowbarker
2024-07-17 00:23:40 +09:00
Author: https://github.com/AtkinsSJ
Commit: e338ef4914
Pull-request: https://github.com/SerenityOS/serenity/pull/17478
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 5 additions and 5 deletions
|
@ -133,8 +133,8 @@ struct ContentData {
|
|||
} type { Type::Normal };
|
||||
|
||||
// FIXME: Data is a list of identifiers, strings and image values.
|
||||
DeprecatedString data {};
|
||||
DeprecatedString alt_text {};
|
||||
String data {};
|
||||
String alt_text {};
|
||||
};
|
||||
|
||||
struct BorderRadiusData {
|
||||
|
|
|
@ -494,7 +494,7 @@ CSS::ContentData StyleProperties::content() const
|
|||
}
|
||||
}
|
||||
content_data.type = ContentData::Type::String;
|
||||
content_data.data = builder.to_deprecated_string();
|
||||
content_data.data = builder.to_string().release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
if (content_style_value.has_alt_text()) {
|
||||
StringBuilder alt_text_builder;
|
||||
|
@ -505,7 +505,7 @@ CSS::ContentData StyleProperties::content() const
|
|||
// TODO: Implement counters
|
||||
}
|
||||
}
|
||||
content_data.alt_text = alt_text_builder.to_deprecated_string();
|
||||
content_data.alt_text = alt_text_builder.to_string().release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
return content_data;
|
||||
|
|
|
@ -171,7 +171,7 @@ ErrorOr<void> TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element
|
|||
pseudo_element_node->set_generated(true);
|
||||
// FIXME: Handle images, and multiple values
|
||||
if (pseudo_element_content.type == CSS::ContentData::Type::String) {
|
||||
auto text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
auto text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data.to_deprecated_string()).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
auto text_node = document.heap().allocate_without_realm<Layout::TextNode>(document, *text);
|
||||
text_node->set_generated(true);
|
||||
push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue