LibWeb/SVG: SVGScriptElement includes SVGURIReference

This commit is contained in:
Jamie Mansfield 2024-07-16 13:49:28 +01:00 committed by Andreas Kling
parent 796de74956
commit fbb5bc471d
Notes: sideshowbarker 2024-07-17 07:14:09 +09:00
3 changed files with 7 additions and 2 deletions

View file

@ -28,6 +28,7 @@ void SVGScriptElement::initialize(JS::Realm& realm)
void SVGScriptElement::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
SVGURIReferenceMixin::visit_edges(visitor);
visitor.visit(m_script);
}

View file

@ -7,11 +7,14 @@
#pragma once
#include <LibWeb/SVG/SVGElement.h>
#include <LibWeb/SVG/SVGURIReference.h>
namespace Web::SVG {
// https://www.w3.org/TR/SVG/interact.html#InterfaceSVGScriptElement
class SVGScriptElement : public SVGElement {
class SVGScriptElement
: public SVGElement
, public SVGURIReferenceMixin<SupportsXLinkHref::Yes> {
WEB_PLATFORM_OBJECT(SVGScriptElement, SVGElement);
JS_DECLARE_ALLOCATOR(SVGScriptElement);

View file

@ -1,5 +1,6 @@
#import <HTML/Scripting/Fetching.idl>
#import <SVG/SVGElement.idl>
#import <SVG/SVGURIReference.idl>
// https://www.w3.org/TR/SVG/interact.html#InterfaceSVGScriptElement
[Exposed=Window]
@ -8,4 +9,4 @@ interface SVGScriptElement : SVGElement {
[Reflect=crossorigin, Enumerated=CORSSettingsAttribute] attribute DOMString? crossOrigin;
};
// FIXME: SVGScriptElement includes SVGURIReference;
SVGScriptElement includes SVGURIReference;