LibWeb: Use qualified names for SVG attribute reflectors

This commit is contained in:
Luke Wilde 2025-10-31 12:27:49 +00:00 committed by Tim Flynn
parent d211df8118
commit 60e1a136aa
Notes: github-actions[bot] 2025-11-06 16:46:15 +00:00
16 changed files with 51 additions and 44 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <LibWeb/Namespace.h>
#include <LibWeb/SVG/AttributeNames.h>
#include <LibWeb/SVG/SVGAnimatedString.h>
@ -31,7 +32,12 @@ public:
// deprecated attribute.
if (!m_href_animated_string) {
auto& this_svg_element = as<SVGElement>(*this);
m_href_animated_string = SVGAnimatedString::create(this_svg_element.realm(), this_svg_element, AttributeNames::href, supports_xlink_href == SupportsXLinkHref::Yes ? Optional<FlyString> { AttributeNames::xlink_href } : OptionalNone {});
m_href_animated_string = SVGAnimatedString::create(this_svg_element.realm(),
this_svg_element,
DOM::QualifiedName { AttributeNames::href, OptionalNone {}, OptionalNone {} },
supports_xlink_href == SupportsXLinkHref::Yes
? Optional<DOM::QualifiedName> { DOM::QualifiedName { AttributeNames::href, "xlink"_fly_string, Namespace::XLink } }
: OptionalNone {});
}
return *m_href_animated_string;
}