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_SMIL_SMILSETANIMATIONFUNCTION_H_
8 #define DOM_SMIL_SMILSETANIMATIONFUNCTION_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILAnimationFunction.h"
15 //----------------------------------------------------------------------
16 // SMILSetAnimationFunction
18 // Subclass of SMILAnimationFunction that limits the behaviour to that offered
19 // by a <set> element.
21 class SMILSetAnimationFunction
: public SMILAnimationFunction
{
23 bool IsDisallowedAttribute(const nsAtom
* aAttribute
) const override
;
25 // Although <set> animation might look like to-animation, unlike to-animation,
26 // it never interpolates values.
27 // Returning false here will mean this animation function gets treated as
28 // a single-valued function and no interpolation will be attempted.
29 bool IsToAnimation() const override
{ return false; }
31 // <set> applies the exact same value across the simple duration.
32 bool IsValueFixedForSimpleDuration() const override
{ return true; }
33 bool WillReplace() const override
{ return true; }
36 } // namespace mozilla
38 #endif // DOM_SMIL_SMILSETANIMATIONFUNCTION_H_