LibWeb/SVG: Add missing SVGGElement IDL file

This commit is contained in:
Jamie Mansfield 2024-08-16 16:30:06 +01:00 committed by Andreas Kling
parent e2f599ebee
commit ea61e189eb
Notes: github-actions[bot] 2024-08-17 05:44:44 +00:00
6 changed files with 19 additions and 0 deletions

View file

@ -282,6 +282,7 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/SVG/SVGElement.idl",
"//Userland/Libraries/LibWeb/SVG/SVGEllipseElement.idl",
"//Userland/Libraries/LibWeb/SVG/SVGForeignObjectElement.idl",
"//Userland/Libraries/LibWeb/SVG/SVGGElement.idl",
"//Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl",
"//Userland/Libraries/LibWeb/SVG/SVGGradientElement.idl",
"//Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.idl",

View file

@ -279,6 +279,7 @@ SVGDescElement
SVGElement
SVGEllipseElement
SVGForeignObjectElement
SVGGElement
SVGGeometryElement
SVGGradientElement
SVGGraphicsElement

View file

@ -5,6 +5,8 @@
*/
#include <AK/StringBuilder.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/SVGGElementPrototype.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/SVG/SVGGElement.h>
@ -18,6 +20,12 @@ SVGGElement::SVGGElement(DOM::Document& document, DOM::QualifiedName qualified_n
{
}
void SVGGElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGGElement);
}
JS::GCPtr<Layout::Node> SVGGElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
{
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));

View file

@ -21,6 +21,8 @@ public:
private:
SVGGElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
};
}

View file

@ -0,0 +1,6 @@
#import <SVG/SVGGraphicsElement.idl>
// https://svgwg.org/svg2-draft/struct.html#InterfaceSVGGElement
[Exposed=Window]
interface SVGGElement : SVGGraphicsElement {
};

View file

@ -268,6 +268,7 @@ libweb_js_bindings(SVG/SVGClipPathElement)
libweb_js_bindings(SVG/SVGDefsElement)
libweb_js_bindings(SVG/SVGDescElement)
libweb_js_bindings(SVG/SVGElement)
libweb_js_bindings(SVG/SVGGElement)
libweb_js_bindings(SVG/SVGGeometryElement)
libweb_js_bindings(SVG/SVGGradientElement)
libweb_js_bindings(SVG/SVGGraphicsElement)