Bumping manifests a=b2g-bump
[gecko.git] / dom / smil / nsSMILNullType.cpp
blob7f1fc3b018e96bc21dcc459d020bcd7e91158b6e
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"
8 #include "nsDebug.h"
10 nsresult
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");
15 aDest.mU = aSrc.mU;
16 aDest.mType = Singleton();
17 return NS_OK;
20 bool
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.
30 nsresult
31 nsSMILNullType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
32 uint32_t aCount) const
34 NS_NOTREACHED("Adding NULL type");
35 return NS_ERROR_FAILURE;
38 nsresult
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;
47 nsresult
48 nsSMILNullType::Interpolate(const nsSMILValue& aStartVal,
49 const nsSMILValue& aEndVal,
50 double aUnitDistance,
51 nsSMILValue& aResult) const
53 NS_NOTREACHED("Interpolating NULL type");
54 return NS_ERROR_FAILURE;