mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:27:35 +00:00
LibWeb: Add SVGDefsElement
* Similarly to clipPath, this doesn't need to get rendered, so return no LayoutNode.
This commit is contained in:
parent
55e9192886
commit
bd90498332
8 changed files with 62 additions and 0 deletions
25
Userland/Libraries/LibWeb/SVG/SVGDefsElement.cpp
Normal file
25
Userland/Libraries/LibWeb/SVG/SVGDefsElement.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Simon Danner <danner.simon@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/SVG/SVGDefsElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
SVGDefsElement::SVGDefsElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGGraphicsElement(document, move(qualified_name))
|
||||
{
|
||||
}
|
||||
|
||||
SVGDefsElement::~SVGDefsElement()
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<Layout::Node> SVGDefsElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties>)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
23
Userland/Libraries/LibWeb/SVG/SVGDefsElement.h
Normal file
23
Userland/Libraries/LibWeb/SVG/SVGDefsElement.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Simon Danner <danner.simon@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
class SVGDefsElement final : public SVGGraphicsElement {
|
||||
public:
|
||||
using WrapperType = Bindings::SVGDefsElementWrapper;
|
||||
|
||||
SVGDefsElement(DOM::Document&, DOM::QualifiedName);
|
||||
virtual ~SVGDefsElement();
|
||||
|
||||
virtual RefPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
};
|
||||
|
||||
}
|
3
Userland/Libraries/LibWeb/SVG/SVGDefsElement.idl
Normal file
3
Userland/Libraries/LibWeb/SVG/SVGDefsElement.idl
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Exposed=Window]
|
||||
interface SVGDefsElement : SVGGraphicsElement {
|
||||
};
|
|
@ -25,6 +25,7 @@ namespace Web::SVG::TagNames {
|
|||
#define ENUMERATE_SVG_TAGS \
|
||||
ENUMERATE_SVG_GRAPHICS_TAGS \
|
||||
__ENUMERATE_SVG_TAG(clipPath) \
|
||||
__ENUMERATE_SVG_TAG(defs) \
|
||||
__ENUMERATE_SVG_TAG(desc) \
|
||||
__ENUMERATE_SVG_TAG(foreignObject) \
|
||||
__ENUMERATE_SVG_TAG(script) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue