Bug 1936278 - Prevent search mode chiclet from being dismissed when clicking in page...
[gecko.git] / dom / svg / SVGIntegerPairSMILType.h
blobc7c439c69216131115f00ae8abd3bb678048e04f
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_SVGINTEGERPAIRSMILTYPE_H_
8 #define DOM_SVG_SVGINTEGERPAIRSMILTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
13 namespace mozilla {
15 class SMILValue;
17 class SVGIntegerPairSMILType : public SMILType {
18 public:
19 // Singleton for SMILValue objects to hold onto.
20 static SVGIntegerPairSMILType* Singleton() {
21 static SVGIntegerPairSMILType sSingleton;
22 return &sSingleton;
25 protected:
26 // SMILType Methods
27 // -------------------
28 void Init(SMILValue& aValue) const override;
29 void Destroy(SMILValue&) const override;
30 nsresult Assign(SMILValue& aDest, const SMILValue& aSrc) const override;
31 bool IsEqual(const SMILValue& aLeft, const SMILValue& aRight) const override;
32 nsresult Add(SMILValue& aDest, const SMILValue& aValueToAdd,
33 uint32_t aCount) const override;
34 nsresult ComputeDistance(const SMILValue& aFrom, const SMILValue& aTo,
35 double& aDistance) const override;
36 nsresult Interpolate(const SMILValue& aStartVal, const SMILValue& aEndVal,
37 double aUnitDistance, SMILValue& aResult) const override;
39 private:
40 // Private constructor: prevent instances beyond my singleton.
41 constexpr SVGIntegerPairSMILType() = default;
44 } // namespace mozilla
46 #endif // DOM_SVG_SVGINTEGERPAIRSMILTYPE_H_