mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Add SVGFEFunc{A,B,G,R}Element
This commit is contained in:
parent
db321cb74f
commit
70e98e72a8
Notes:
github-actions[bot]
2025-11-09 00:23:49 +00:00
Author: https://github.com/gmta
Commit: 70e98e72a8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6709
18 changed files with 268 additions and 0 deletions
25
Libraries/LibWeb/SVG/SVGFEFuncAElement.cpp
Normal file
25
Libraries/LibWeb/SVG/SVGFEFuncAElement.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/SVGFEFuncAElementPrototype.h>
|
||||
#include <LibWeb/SVG/SVGFEFuncAElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(SVGFEFuncAElement);
|
||||
|
||||
SVGFEFuncAElement::SVGFEFuncAElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGComponentTransferFunctionElement(document, qualified_name)
|
||||
{
|
||||
}
|
||||
|
||||
void SVGFEFuncAElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGFEFuncAElement);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
}
|
||||
28
Libraries/LibWeb/SVG/SVGFEFuncAElement.h
Normal file
28
Libraries/LibWeb/SVG/SVGFEFuncAElement.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGComponentTransferFunctionElement.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncAElement
|
||||
class SVGFEFuncAElement final : public SVGComponentTransferFunctionElement {
|
||||
WEB_PLATFORM_OBJECT(SVGFEFuncAElement, SVGComponentTransferFunctionElement);
|
||||
GC_DECLARE_ALLOCATOR(SVGFEFuncAElement);
|
||||
|
||||
public:
|
||||
virtual ~SVGFEFuncAElement() override = default;
|
||||
|
||||
private:
|
||||
SVGFEFuncAElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
6
Libraries/LibWeb/SVG/SVGFEFuncAElement.idl
Normal file
6
Libraries/LibWeb/SVG/SVGFEFuncAElement.idl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#import <SVG/SVGComponentTransferFunctionElement.idl>
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncAElement
|
||||
[Exposed=Window]
|
||||
interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {
|
||||
};
|
||||
25
Libraries/LibWeb/SVG/SVGFEFuncBElement.cpp
Normal file
25
Libraries/LibWeb/SVG/SVGFEFuncBElement.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/SVGFEFuncBElementPrototype.h>
|
||||
#include <LibWeb/SVG/SVGFEFuncBElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(SVGFEFuncBElement);
|
||||
|
||||
SVGFEFuncBElement::SVGFEFuncBElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGComponentTransferFunctionElement(document, qualified_name)
|
||||
{
|
||||
}
|
||||
|
||||
void SVGFEFuncBElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGFEFuncBElement);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
}
|
||||
28
Libraries/LibWeb/SVG/SVGFEFuncBElement.h
Normal file
28
Libraries/LibWeb/SVG/SVGFEFuncBElement.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGComponentTransferFunctionElement.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncBElement
|
||||
class SVGFEFuncBElement final : public SVGComponentTransferFunctionElement {
|
||||
WEB_PLATFORM_OBJECT(SVGFEFuncBElement, SVGComponentTransferFunctionElement);
|
||||
GC_DECLARE_ALLOCATOR(SVGFEFuncBElement);
|
||||
|
||||
public:
|
||||
virtual ~SVGFEFuncBElement() override = default;
|
||||
|
||||
private:
|
||||
SVGFEFuncBElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
6
Libraries/LibWeb/SVG/SVGFEFuncBElement.idl
Normal file
6
Libraries/LibWeb/SVG/SVGFEFuncBElement.idl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#import <SVG/SVGComponentTransferFunctionElement.idl>
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncBElement
|
||||
[Exposed=Window]
|
||||
interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {
|
||||
};
|
||||
25
Libraries/LibWeb/SVG/SVGFEFuncGElement.cpp
Normal file
25
Libraries/LibWeb/SVG/SVGFEFuncGElement.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/SVGFEFuncGElementPrototype.h>
|
||||
#include <LibWeb/SVG/SVGFEFuncGElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(SVGFEFuncGElement);
|
||||
|
||||
SVGFEFuncGElement::SVGFEFuncGElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGComponentTransferFunctionElement(document, qualified_name)
|
||||
{
|
||||
}
|
||||
|
||||
void SVGFEFuncGElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGFEFuncGElement);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
}
|
||||
28
Libraries/LibWeb/SVG/SVGFEFuncGElement.h
Normal file
28
Libraries/LibWeb/SVG/SVGFEFuncGElement.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGComponentTransferFunctionElement.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncGElement
|
||||
class SVGFEFuncGElement final : public SVGComponentTransferFunctionElement {
|
||||
WEB_PLATFORM_OBJECT(SVGFEFuncGElement, SVGComponentTransferFunctionElement);
|
||||
GC_DECLARE_ALLOCATOR(SVGFEFuncGElement);
|
||||
|
||||
public:
|
||||
virtual ~SVGFEFuncGElement() override = default;
|
||||
|
||||
private:
|
||||
SVGFEFuncGElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
6
Libraries/LibWeb/SVG/SVGFEFuncGElement.idl
Normal file
6
Libraries/LibWeb/SVG/SVGFEFuncGElement.idl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#import <SVG/SVGComponentTransferFunctionElement.idl>
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncGElement
|
||||
[Exposed=Window]
|
||||
interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {
|
||||
};
|
||||
25
Libraries/LibWeb/SVG/SVGFEFuncRElement.cpp
Normal file
25
Libraries/LibWeb/SVG/SVGFEFuncRElement.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/SVGFEFuncRElementPrototype.h>
|
||||
#include <LibWeb/SVG/SVGFEFuncRElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(SVGFEFuncRElement);
|
||||
|
||||
SVGFEFuncRElement::SVGFEFuncRElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGComponentTransferFunctionElement(document, qualified_name)
|
||||
{
|
||||
}
|
||||
|
||||
void SVGFEFuncRElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGFEFuncRElement);
|
||||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
}
|
||||
28
Libraries/LibWeb/SVG/SVGFEFuncRElement.h
Normal file
28
Libraries/LibWeb/SVG/SVGFEFuncRElement.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/SVG/SVGComponentTransferFunctionElement.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncRElement
|
||||
class SVGFEFuncRElement final : public SVGComponentTransferFunctionElement {
|
||||
WEB_PLATFORM_OBJECT(SVGFEFuncRElement, SVGComponentTransferFunctionElement);
|
||||
GC_DECLARE_ALLOCATOR(SVGFEFuncRElement);
|
||||
|
||||
public:
|
||||
virtual ~SVGFEFuncRElement() override = default;
|
||||
|
||||
private:
|
||||
SVGFEFuncRElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
6
Libraries/LibWeb/SVG/SVGFEFuncRElement.idl
Normal file
6
Libraries/LibWeb/SVG/SVGFEFuncRElement.idl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#import <SVG/SVGComponentTransferFunctionElement.idl>
|
||||
|
||||
// https://www.w3.org/TR/filter-effects-1/#InterfaceSVGFEFuncRElement
|
||||
[Exposed=Window]
|
||||
interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {
|
||||
};
|
||||
|
|
@ -22,6 +22,10 @@ namespace Web::SVG::TagNames {
|
|||
__ENUMERATE_SVG_TAG(feComponentTransfer) \
|
||||
__ENUMERATE_SVG_TAG(feComposite) \
|
||||
__ENUMERATE_SVG_TAG(feFlood) \
|
||||
__ENUMERATE_SVG_TAG(feFuncA) \
|
||||
__ENUMERATE_SVG_TAG(feFuncB) \
|
||||
__ENUMERATE_SVG_TAG(feFuncG) \
|
||||
__ENUMERATE_SVG_TAG(feFuncR) \
|
||||
__ENUMERATE_SVG_TAG(feGaussianBlur) \
|
||||
__ENUMERATE_SVG_TAG(feImage) \
|
||||
__ENUMERATE_SVG_TAG(feMerge) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue