mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Implement SVGAnimatedLengthList
This commit is contained in:
parent
797e6dd4eb
commit
527a293047
Notes:
github-actions[bot]
2025-11-20 22:16:33 +00:00
Author: https://github.com/gmta
Commit: 527a293047
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6878
8 changed files with 98 additions and 10 deletions
38
Libraries/LibWeb/SVG/SVGAnimatedLengthList.h
Normal file
38
Libraries/LibWeb/SVG/SVGAnimatedLengthList.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/SVG/SVGLengthList.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
// https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedLengthList
|
||||
class SVGAnimatedLengthList final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(SVGAnimatedLengthList, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(SVGAnimatedLengthList);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static GC::Ref<SVGAnimatedLengthList> create(JS::Realm&, GC::Ref<SVGLengthList>);
|
||||
virtual ~SVGAnimatedLengthList() override = default;
|
||||
|
||||
// https://svgwg.org/svg2-draft/types.html#__svg__SVGAnimatedLengthList__baseVal
|
||||
GC::Ref<SVGLengthList> base_val() const { return m_base_val; }
|
||||
|
||||
// https://svgwg.org/svg2-draft/types.html#__svg__SVGAnimatedLengthList__animVal
|
||||
GC::Ref<SVGLengthList> anim_val() const { return m_base_val; }
|
||||
|
||||
private:
|
||||
SVGAnimatedLengthList(JS::Realm&, GC::Ref<SVGLengthList>);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
GC::Ref<SVGLengthList> m_base_val;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue