mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibWeb: Implement the SVGAnimatedLength type
This commit is contained in:
parent
ebf3829f1c
commit
7a6b4e33ba
5 changed files with 71 additions and 0 deletions
24
Userland/Libraries/LibWeb/SVG/SVGAnimatedLength.cpp
Normal file
24
Userland/Libraries/LibWeb/SVG/SVGAnimatedLength.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/SVG/SVGAnimatedLength.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
NonnullRefPtr<SVGAnimatedLength> SVGAnimatedLength::create(NonnullRefPtr<SVGLength> base_val, NonnullRefPtr<SVGLength> anim_val)
|
||||
{
|
||||
return adopt_ref(*new SVGAnimatedLength(move(base_val), move(anim_val)));
|
||||
}
|
||||
|
||||
SVGAnimatedLength::SVGAnimatedLength(NonnullRefPtr<SVGLength> base_val, NonnullRefPtr<SVGLength> anim_val)
|
||||
: m_base_val(move(base_val))
|
||||
, m_anim_val(move(anim_val))
|
||||
{
|
||||
// The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.
|
||||
VERIFY(m_base_val.ptr() != m_anim_val.ptr());
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue