mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 20:17:34 +00:00
AK+Everywhere: Remove the null state of DeprecatedString
This commit removes DeprecatedString's "null" state, and replaces all its users with one of the following: - A normal, empty DeprecatedString - Optional<DeprecatedString> Note that null states of DeprecatedFlyString/StringView/etc are *not* affected by this commit. However, DeprecatedString::empty() is now considered equal to a null StringView.
This commit is contained in:
parent
daf6d8173c
commit
aeee98b3a1
189 changed files with 597 additions and 652 deletions
|
@ -45,18 +45,18 @@ void SVGUseElement::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_document_observer);
|
||||
}
|
||||
|
||||
void SVGUseElement::attribute_changed(FlyString const& name, DeprecatedString const& value)
|
||||
void SVGUseElement::attribute_changed(FlyString const& name, Optional<DeprecatedString> const& value)
|
||||
{
|
||||
Base::attribute_changed(name, value);
|
||||
|
||||
// https://svgwg.org/svg2-draft/struct.html#UseLayout
|
||||
if (name == SVG::AttributeNames::x) {
|
||||
m_x = AttributeParser::parse_coordinate(value);
|
||||
m_x = AttributeParser::parse_coordinate(value.value_or(""));
|
||||
} else if (name == SVG::AttributeNames::y) {
|
||||
m_y = AttributeParser::parse_coordinate(value);
|
||||
m_y = AttributeParser::parse_coordinate(value.value_or(""));
|
||||
} else if (name == SVG::AttributeNames::href) {
|
||||
// FIXME: Support the xlink:href attribute as a fallback
|
||||
m_referenced_id = parse_id_from_href(value);
|
||||
m_referenced_id = parse_id_from_href(value.value_or(""));
|
||||
|
||||
clone_element_tree_as_our_shadow_tree(referenced_element());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue