mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:37:35 +00:00
LibWeb: Implement SVGUseElement#href
Required by Ruffle.
b196c8d1bc/web/packages/core/src/shadow-template.ts (L601-L602)
This commit is contained in:
parent
968bec9844
commit
54972e3ceb
5 changed files with 178 additions and 2 deletions
|
@ -44,6 +44,7 @@ void SVGUseElement::initialize(JS::Realm& realm)
|
|||
void SVGUseElement::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
SVGURIReferenceMixin::visit_edges(visitor);
|
||||
visitor.visit(m_document_observer);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,13 @@
|
|||
#include <LibWeb/DOM/DocumentObserver.h>
|
||||
#include <LibWeb/SVG/SVGAnimatedLength.h>
|
||||
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
||||
#include <LibWeb/SVG/SVGURIReference.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
class SVGUseElement final : public SVGGraphicsElement {
|
||||
class SVGUseElement final
|
||||
: public SVGGraphicsElement
|
||||
, public SVGURIReferenceMixin<SupportsXLinkHref::Yes> {
|
||||
WEB_PLATFORM_OBJECT(SVGUseElement, SVGGraphicsElement);
|
||||
JS_DECLARE_ALLOCATOR(SVGUseElement);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#import <SVG/SVGAnimatedLength.idl>
|
||||
#import <SVG/SVGElement.idl>
|
||||
#import <SVG/SVGGraphicsElement.idl>
|
||||
#import <SVG/SVGURIReference.idl>
|
||||
|
||||
// https://svgwg.org/svg2-draft/struct.html#InterfaceSVGUseElement
|
||||
[Exposed=Window]
|
||||
|
@ -13,4 +14,4 @@ interface SVGUseElement : SVGGraphicsElement {
|
|||
[SameObject] readonly attribute SVGElement? animatedInstanceRoot;
|
||||
};
|
||||
|
||||
// FIXME: SVGUseElement includes SVGURIReference;
|
||||
SVGUseElement includes SVGURIReference;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue