mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Implement SVGAnimatedNumber
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
ffcf91cd30
commit
97fa0be16e
Notes:
github-actions[bot]
2025-07-11 10:27:20 +00:00
Author: https://github.com/gmta
Commit: 97fa0be16e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5389
Reviewed-by: https://github.com/tcl3 ✅
11 changed files with 235 additions and 47 deletions
|
@ -4,11 +4,10 @@
|
|||
* 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/SVGAnimatedEnumeration.h>
|
||||
#include <LibWeb/SVG/SVGFEGaussianBlurElement.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
@ -31,6 +30,8 @@ void SVGFEGaussianBlurElement::visit_edges(Cell::Visitor& visitor)
|
|||
Base::visit_edges(visitor);
|
||||
SVGFilterPrimitiveStandardAttributes::visit_edges(visitor);
|
||||
visitor.visit(m_in1);
|
||||
visitor.visit(m_std_deviation_x);
|
||||
visitor.visit(m_std_deviation_y);
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedString> SVGFEGaussianBlurElement::in1()
|
||||
|
@ -41,16 +42,24 @@ GC::Ref<SVGAnimatedString> SVGFEGaussianBlurElement::in1()
|
|||
return *m_in1;
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedNumber> SVGFEGaussianBlurElement::std_deviation_x() const
|
||||
// https://drafts.fxtf.org/filter-effects/#element-attrdef-fegaussianblur-stddeviation
|
||||
GC::Ref<SVGAnimatedNumber> SVGFEGaussianBlurElement::std_deviation_x()
|
||||
{
|
||||
// FIXME: Resolve the actual value from AttributeNames::stdDeviationX.
|
||||
return SVGAnimatedNumber::create(realm(), 125.0f, 125.0f);
|
||||
if (!m_std_deviation_x) {
|
||||
m_std_deviation_x = SVGAnimatedNumber::create(realm(), *this, AttributeNames::stdDeviation, 0.f,
|
||||
SVGAnimatedNumber::SupportsSecondValue::Yes, SVGAnimatedNumber::ValueRepresented::First);
|
||||
}
|
||||
return *m_std_deviation_x;
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedNumber> SVGFEGaussianBlurElement::std_deviation_y() const
|
||||
// https://drafts.fxtf.org/filter-effects/#element-attrdef-fegaussianblur-stddeviation
|
||||
GC::Ref<SVGAnimatedNumber> SVGFEGaussianBlurElement::std_deviation_y()
|
||||
{
|
||||
// FIXME: Resolve the actual value from AttributeNames::stdDeviationY.
|
||||
return SVGAnimatedNumber::create(realm(), 125.0f, 125.0f);
|
||||
if (!m_std_deviation_y) {
|
||||
m_std_deviation_y = SVGAnimatedNumber::create(realm(), *this, AttributeNames::stdDeviation, 0.f,
|
||||
SVGAnimatedNumber::SupportsSecondValue::Yes, SVGAnimatedNumber::ValueRepresented::Second);
|
||||
}
|
||||
return *m_std_deviation_y;
|
||||
}
|
||||
|
||||
GC::Ref<SVGAnimatedEnumeration> SVGFEGaussianBlurElement::edge_mode() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue