Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/smil/nsSMILTimeValueSpecParams.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef NS_SMILTIMEVALUESPECPARAMS_H_
8
#define NS_SMILTIMEVALUESPECPARAMS_H_
9
10
#include "nsSMILTimeValue.h"
11
#include "nsAtom.h"
12
13
//----------------------------------------------------------------------
14
// nsSMILTimeValueSpecParams
15
//
16
// A simple data type for storing the result of parsing a single begin or end
17
// value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s").
18
19
class nsSMILTimeValueSpecParams
20
{
21
public:
22
  nsSMILTimeValueSpecParams()
23
    : mType(INDEFINITE)
24
    , mSyncBegin(false)
25
    , mRepeatIteration(0)
26
0
  { }
27
28
  // The type of value this specification describes
29
  enum {
30
    OFFSET,
31
    SYNCBASE,
32
    EVENT,
33
    REPEAT,
34
    WALLCLOCK,
35
    INDEFINITE
36
  } mType;
37
38
  // A clock value that is added to:
39
  // - type OFFSET: the document begin
40
  // - type SYNCBASE: the timebase's begin or end time
41
  // - type EVENT: the event time
42
  // - type REPEAT: the repeat time
43
  // It is not used for WALLCLOCK or INDEFINITE times
44
  nsSMILTimeValue   mOffset;
45
46
  // The base element that this specification refers to.
47
  // For SYNCBASE types, this is the timebase
48
  // For EVENT and REPEAT types, this is the eventbase
49
  RefPtr<nsAtom> mDependentElemID;
50
51
  // The event to respond to.
52
  // Only used for EVENT types.
53
  RefPtr<nsAtom> mEventSymbol;
54
55
  // Indicates if this specification refers to the begin or end of the dependent
56
  // element.
57
  // Only used for SYNCBASE types.
58
  bool              mSyncBegin;
59
60
  // The repeat iteration to respond to.
61
  // Only used for mType=REPEAT.
62
  uint32_t mRepeatIteration;
63
};
64
65
#endif // NS_SMILTIMEVALUESPECPARAMS_H_