SVGAnimatedLength.cpp 760 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/SVG/SVGAnimatedLength.h>
  7. namespace Web::SVG {
  8. NonnullRefPtr<SVGAnimatedLength> SVGAnimatedLength::create(NonnullRefPtr<SVGLength> base_val, NonnullRefPtr<SVGLength> anim_val)
  9. {
  10. return adopt_ref(*new SVGAnimatedLength(move(base_val), move(anim_val)));
  11. }
  12. SVGAnimatedLength::SVGAnimatedLength(NonnullRefPtr<SVGLength> base_val, NonnullRefPtr<SVGLength> anim_val)
  13. : m_base_val(move(base_val))
  14. , m_anim_val(move(anim_val))
  15. {
  16. // The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the attribute is not animated.
  17. VERIFY(m_base_val.ptr() != m_anim_val.ptr());
  18. }
  19. }