mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881512 - Add start (and rename end) time helper to TimeRanges. r=cajbir
This commit is contained in:
parent
065c46bd6f
commit
d5e8d28fdf
@ -80,13 +80,21 @@ TimeRanges::Add(double aStart, double aEnd)
|
||||
}
|
||||
|
||||
double
|
||||
TimeRanges::GetFinalEndTime()
|
||||
TimeRanges::GetStartTime()
|
||||
{
|
||||
if (mRanges.IsEmpty()) {
|
||||
return -1.0;
|
||||
}
|
||||
uint32_t finalIndex = mRanges.Length() - 1;
|
||||
return mRanges[finalIndex].mEnd;
|
||||
return mRanges[0].mStart;
|
||||
}
|
||||
|
||||
double
|
||||
TimeRanges::GetEndTime()
|
||||
{
|
||||
if (mRanges.IsEmpty()) {
|
||||
return -1.0;
|
||||
}
|
||||
return mRanges[mRanges.Length() - 1].mEnd;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -30,8 +30,11 @@ public:
|
||||
|
||||
void Add(double aStart, double aEnd);
|
||||
|
||||
// Returns the end time of the last range, or -1 if no ranges added.
|
||||
double GetFinalEndTime();
|
||||
// Returns the start time of the first range, or -1 if no ranges exist.
|
||||
double GetStartTime();
|
||||
|
||||
// Returns the end time of the last range, or -1 if no ranges exist.
|
||||
double GetEndTime();
|
||||
|
||||
// See http://www.whatwg.org/html/#normalized-timeranges-object
|
||||
void Normalize();
|
||||
|
Loading…
Reference in New Issue
Block a user