Coverage Report

Created: 2026-09-26 06:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/SVG/SVGAnimatedNumber.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2023, MacDue <macdue@dueutil.tech>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <LibWeb/Bindings/PlatformObject.h>
10
#include <LibWeb/WebIDL/ExceptionOr.h>
11
12
namespace Web::SVG {
13
14
// https://www.w3.org/TR/SVG11/types.html#InterfaceSVGAnimatedNumber
15
class SVGAnimatedNumber final : public Bindings::PlatformObject {
16
    WEB_PLATFORM_OBJECT(SVGAnimatedNumber, Bindings::PlatformObject);
17
    JS_DECLARE_ALLOCATOR(SVGAnimatedNumber);
18
19
public:
20
    [[nodiscard]] static JS::NonnullGCPtr<SVGAnimatedNumber> create(JS::Realm&, float base_val, float anim_val);
21
    virtual ~SVGAnimatedNumber() override;
22
23
0
    float base_val() const { return m_base_val; }
24
0
    float anim_val() const { return m_anim_val; }
25
26
0
    void set_base_val(float base_val) { m_base_val = base_val; }
27
0
    void set_anim_val(float anim_val) { m_anim_val = anim_val; }
28
29
private:
30
    SVGAnimatedNumber(JS::Realm&, float base_val, float anim_val);
31
32
    virtual void initialize(JS::Realm&) override;
33
34
    float m_base_val;
35
    float m_anim_val;
36
};
37
38
}