Home | History | Annotate | Download | only in animation

Lines Matching refs:SMILTime

35 class SMILTime {
37 SMILTime() : m_time(0) { }
38 SMILTime(double time) : m_time(time) { }
40 static SMILTime unresolved() { return std::numeric_limits<double>::quiet_NaN(); }
41 static SMILTime indefinite() { return std::numeric_limits<double>::infinity(); }
65 SMILTimeWithOrigin(const SMILTime& time, Origin origin)
71 const SMILTime& time() const { return m_time; }
75 SMILTime m_time;
81 SMILInterval(const SMILTime& begin, const SMILTime& end) : begin(begin), end(end) { }
83 SMILTime begin;
84 SMILTime end;
87 inline bool operator==(const SMILTime& a, const SMILTime& b) { return (a.isUnresolved() && b.isUnresolved()) || a.value() == b.value(); }
88 inline bool operator!(const SMILTime& a) { return !a.isFinite() || !a.value(); }
89 inline bool operator!=(const SMILTime& a, const SMILTime& b) { return !operator==(a, b); }
93 inline bool operator>(const SMILTime& a, const SMILTime& b) { return a.isUnresolved() || (a.value() > b.value()); }
94 inline bool operator<(const SMILTime& a, const SMILTime& b) { return operator>(b, a); }
95 inline bool operator>=(const SMILTime& a, const SMILTime& b) { return operator>(a, b) || operator==(a, b); }
96 inline bool operator<=(const SMILTime& a, const SMILTime& b) { return operator<(a, b) || operator==(a, b); }
99 inline SMILTime operator+(const SMILTime& a, const SMILTime& b) { return a.value() + b.value(); }
100 inline SMILTime operator-(const SMILTime& a, const SMILTime& b) { return a.value() - b.value(); }
102 SMILTime operator*(const SMILTime&, const SMILTime&);
106 // Compare the "raw" values since the operator!= for SMILTime always return
112 static unsigned hash(const SMILTime& key) { return WTF::FloatHash<double>::hash(key.value()); }
113 static bool equal(const SMILTime& a, const SMILTime& b) { return WTF::FloatHash<double>::equal(a.value(), b.value()); }
121 template<> struct DefaultHash<blink::SMILTime> {
125 template<> struct HashTraits<blink::SMILTime> : GenericHashTraits<blink::SMILTime> {
126 static blink::SMILTime emptyValue() { return blink::SMILTime::unresolved(); }
127 static void constructDeletedValue(blink::SMILTime& slot, bool) { slot = -std::numeric_limits<double>::infinity(); }
128 static bool isDeletedValue(blink::SMILTime value) { return value == -std::numeric_limits<double>::infinity(); }