dom/smil/nsSMILTimeValueSpecParams.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef NS_SMILTIMEVALUESPECPARAMS_H_
michael@0 7 #define NS_SMILTIMEVALUESPECPARAMS_H_
michael@0 8
michael@0 9 #include "nsSMILTimeValue.h"
michael@0 10 #include "nsAutoPtr.h"
michael@0 11 #include "nsIAtom.h"
michael@0 12
michael@0 13 //----------------------------------------------------------------------
michael@0 14 // nsSMILTimeValueSpecParams
michael@0 15 //
michael@0 16 // A simple data type for storing the result of parsing a single begin or end
michael@0 17 // value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s").
michael@0 18
michael@0 19 class nsSMILTimeValueSpecParams
michael@0 20 {
michael@0 21 public:
michael@0 22 nsSMILTimeValueSpecParams()
michael@0 23 :
michael@0 24 mType(INDEFINITE),
michael@0 25 mSyncBegin(false),
michael@0 26 mRepeatIterationOrAccessKey(0)
michael@0 27 { }
michael@0 28
michael@0 29 // The type of value this specification describes
michael@0 30 enum {
michael@0 31 OFFSET,
michael@0 32 SYNCBASE,
michael@0 33 EVENT,
michael@0 34 REPEAT,
michael@0 35 ACCESSKEY,
michael@0 36 WALLCLOCK,
michael@0 37 INDEFINITE
michael@0 38 } mType;
michael@0 39
michael@0 40 // A clock value that is added to:
michael@0 41 // - type OFFSET: the document begin
michael@0 42 // - type SYNCBASE: the timebase's begin or end time
michael@0 43 // - type EVENT: the event time
michael@0 44 // - type REPEAT: the repeat time
michael@0 45 // - type ACCESSKEY: the keypress time
michael@0 46 // It is not used for WALLCLOCK or INDEFINITE times
michael@0 47 nsSMILTimeValue mOffset;
michael@0 48
michael@0 49 // The base element that this specification refers to.
michael@0 50 // For SYNCBASE types, this is the timebase
michael@0 51 // For EVENT and REPEAT types, this is the eventbase
michael@0 52 nsRefPtr<nsIAtom> mDependentElemID;
michael@0 53
michael@0 54 // The event to respond to.
michael@0 55 // Only used for EVENT types.
michael@0 56 nsRefPtr<nsIAtom> mEventSymbol;
michael@0 57
michael@0 58 // Indicates if this specification refers to the begin or end of the dependent
michael@0 59 // element.
michael@0 60 // Only used for SYNCBASE types.
michael@0 61 bool mSyncBegin;
michael@0 62
michael@0 63 // The repeat iteration (type=REPEAT) or access key (type=ACCESSKEY) to
michael@0 64 // respond to.
michael@0 65 uint32_t mRepeatIterationOrAccessKey;
michael@0 66 };
michael@0 67
michael@0 68 #endif // NS_SMILTIMEVALUESPECPARAMS_H_

mercurial