no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / svg / SVGLengthSMILType.h
blobbf2cd08e81b96e1b60a307f7e4152e5fc6a32873
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_SVGLENGTHSMILTYPE_H_
8 #define DOM_SVG_SVGLENGTHSMILTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
13 namespace mozilla {
15 class SVGLengthSMILType final : public SMILType {
16 public:
17 // Singleton for SMILValue objects to hold onto.
18 static SVGLengthSMILType* Singleton() {
19 static SVGLengthSMILType sSingleton;
20 return &sSingleton;
23 protected:
24 // SMILType Methods
25 // -------------------
26 void Init(SMILValue& aValue) const override;
27 void Destroy(SMILValue& aValue) const override;
28 nsresult Assign(SMILValue& aDest, const SMILValue& aSrc) const override;
29 bool IsEqual(const SMILValue& aLeft, const SMILValue& aRight) const override;
30 nsresult Add(SMILValue& aDest, const SMILValue& aValueToAdd,
31 uint32_t aCount) const override;
32 nsresult ComputeDistance(const SMILValue& aFrom, const SMILValue& aTo,
33 double& aDistance) const override;
34 nsresult Interpolate(const SMILValue& aStartVal, const SMILValue& aEndVal,
35 double aUnitDistance, SMILValue& aResult) const override;
37 private:
38 // Private constructor: prevent instances beyond my singleton.
39 constexpr SVGLengthSMILType() = default;
42 } // namespace mozilla
44 #endif // DOM_SVG_SVGLENGTHSMILTYPE_H_