mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Use qualified names for SVG attribute reflectors
This commit is contained in:
parent
d211df8118
commit
60e1a136aa
Notes:
github-actions[bot]
2025-11-06 16:46:15 +00:00
Author: https://github.com/Lubrsi
Commit: 60e1a136aa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6632
Reviewed-by: https://github.com/AtkinsSJ
16 changed files with 51 additions and 44 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue