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