mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibWeb/SVG: Add FEBlendElement
This commit is contained in:
parent
d3684a36b0
commit
f8b12614df
Notes:
github-actions[bot]
2025-07-09 17:08:39 +00:00
Author: https://github.com/ananas-dev
Commit: f8b12614df
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5028
Reviewed-by: https://github.com/gmta ✅
10 changed files with 139 additions and 0 deletions
58
Libraries/LibWeb/SVG/SVGFEBlendElement.cpp
Normal file
58
Libraries/LibWeb/SVG/SVGFEBlendElement.cpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Lucien Fiorini <lucienfiorini@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/SVGFEBlendElementPrototype.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/SVG/SVGAnimatedEnumeration.h>
|
||||
#include <LibWeb/SVG/SVGFEBlendElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(SVGFEBlendElement);
|
||||
|
||||
SVGFEBlendElement::SVGFEBlendElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: SVGElement(document, qualified_name)
|
||||
{
|
||||
}
|
||||
|
||||
void SVGFEBlendElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGFEBlendElement);
|
||||
}
|
||||
|
||||
void SVGFEBlendElement::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
SVGFilterPrimitiveStandardAttributes::visit_edges(visitor);
|
||||
visitor.visit(m_in1);
|
||||
visitor.visit(m_in2);
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedString> SVGFEBlendElement::in1()
|
||||
{
|
||||
if (!m_in1)
|
||||
m_in1 = SVGAnimatedString::create(realm(), *this, AttributeNames::in);
|
||||
|
||||
return *m_in1;
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedString> SVGFEBlendElement::in2()
|
||||
{
|
||||
if (!m_in2)
|
||||
m_in2 = SVGAnimatedString::create(realm(), *this, AttributeNames::in2);
|
||||
|
||||
return *m_in2;
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedEnumeration> SVGFEBlendElement::mode() const
|
||||
{
|
||||
// FIXME: Resolve the actual value from AttributeName::mode.
|
||||
return SVGAnimatedEnumeration::create(realm(), 1);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue