1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsSMILNullType.h"
7 #include "nsSMILValue.h"
11 nsSMILNullType::Assign(nsSMILValue
& aDest
, const nsSMILValue
& aSrc
) const
13 NS_PRECONDITION(aDest
.mType
== aSrc
.mType
, "Incompatible SMIL types");
14 NS_PRECONDITION(aSrc
.mType
== this, "Unexpected source type");
16 aDest
.mType
= Singleton();
21 nsSMILNullType::IsEqual(const nsSMILValue
& aLeft
,
22 const nsSMILValue
& aRight
) const
24 NS_PRECONDITION(aLeft
.mType
== aRight
.mType
, "Incompatible SMIL types");
25 NS_PRECONDITION(aLeft
.mType
== this, "Unexpected type for SMIL value");
27 return true; // All null-typed values are equivalent.
31 nsSMILNullType::Add(nsSMILValue
& aDest
, const nsSMILValue
& aValueToAdd
,
32 uint32_t aCount
) const
34 NS_NOTREACHED("Adding NULL type");
35 return NS_ERROR_FAILURE
;
39 nsSMILNullType::ComputeDistance(const nsSMILValue
& aFrom
,
40 const nsSMILValue
& aTo
,
41 double& aDistance
) const
43 NS_NOTREACHED("Computing distance for NULL type");
44 return NS_ERROR_FAILURE
;
48 nsSMILNullType::Interpolate(const nsSMILValue
& aStartVal
,
49 const nsSMILValue
& aEndVal
,
51 nsSMILValue
& aResult
) const
53 NS_NOTREACHED("Interpolating NULL type");
54 return NS_ERROR_FAILURE
;