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