Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / svg / SVGNumberListSMILType.h
blob1ba803fc10c0d114a988a17f230cfa450dafe4bd
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_SVG_SVGNUMBERLISTSMILTYPE_H_
8 #define DOM_SVG_SVGNUMBERLISTSMILTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
13 namespace mozilla {
15 class SMILValue;
17 ////////////////////////////////////////////////////////////////////////
18 // SVGNumberListSMILType
20 // Operations for animating an SVGNumberList.
22 class SVGNumberListSMILType : public SMILType {
23 public:
24 // Singleton for SMILValue objects to hold onto.
25 static SVGNumberListSMILType sSingleton;
27 protected:
28 // SMILType Methods
29 // -------------------
31 void Init(SMILValue& aValue) const override;
33 void Destroy(SMILValue& aValue) const override;
34 nsresult Assign(SMILValue& aDest, const SMILValue& aSrc) const override;
35 bool IsEqual(const SMILValue& aLeft, const SMILValue& aRight) const override;
36 nsresult Add(SMILValue& aDest, const SMILValue& aValueToAdd,
37 uint32_t aCount) const override;
38 nsresult ComputeDistance(const SMILValue& aFrom, const SMILValue& aTo,
39 double& aDistance) const override;
40 nsresult Interpolate(const SMILValue& aStartVal, const SMILValue& aEndVal,
41 double aUnitDistance, SMILValue& aResult) const override;
43 private:
44 // Private constructor: prevent instances beyond my singleton.
45 constexpr SVGNumberListSMILType() = default;
48 } // namespace mozilla
50 #endif // DOM_SVG_SVGNUMBERLISTSMILTYPE_H_