LibWeb/SVG: SVGGradientElement includes SVGURIReference
This commit is contained in:
parent
fbb5bc471d
commit
c8e6a95988
Notes:
sideshowbarker
2024-07-17 07:14:07 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/LadybirdBrowser/ladybird/commit/c8e6a95988 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/666
3 changed files with 13 additions and 2 deletions
|
@ -140,4 +140,10 @@ void SVGGradientElement::initialize(JS::Realm& realm)
|
|||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGGradientElement);
|
||||
}
|
||||
|
||||
void SVGGradientElement::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
SVGURIReferenceMixin::visit_edges(visitor);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <LibWeb/SVG/AttributeParser.h>
|
||||
#include <LibWeb/SVG/SVGElement.h>
|
||||
#include <LibWeb/SVG/SVGStopElement.h>
|
||||
#include <LibWeb/SVG/SVGURIReference.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
|
@ -35,7 +36,9 @@ inline Painting::SVGGradientPaintStyle::SpreadMethod to_painting_spread_method(S
|
|||
}
|
||||
}
|
||||
|
||||
class SVGGradientElement : public SVGElement {
|
||||
class SVGGradientElement
|
||||
: public SVGElement
|
||||
, public SVGURIReferenceMixin<SupportsXLinkHref::Yes> {
|
||||
WEB_PLATFORM_OBJECT(SVGGradientElement, SVGElement);
|
||||
|
||||
public:
|
||||
|
@ -55,6 +58,7 @@ protected:
|
|||
SVGGradientElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
JS::GCPtr<SVGGradientElement const> linked_gradient(HashTable<SVGGradientElement const*>& seen_gradients) const;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#import <SVG/SVGElement.idl>
|
||||
#import <SVG/SVGURIReference.idl>
|
||||
|
||||
// https://svgwg.org/svg2-draft/single-page.html#pservers-InterfaceSVGGradientElement
|
||||
[Exposed=Window]
|
||||
|
@ -16,4 +17,4 @@ interface SVGGradientElement : SVGElement {
|
|||
|
||||
};
|
||||
|
||||
// FIXME: SVGGradientElement includes SVGURIReference;
|
||||
SVGGradientElement includes SVGURIReference;
|
||||
|
|
Loading…
Add table
Reference in a new issue