Bug 1436659 - Add Animation::GetCurrentTimeForHoldTime helper; r=hiro
We will use this to calculate the unconstrained current time when we implement pending playback rate changes. MozReview-Commit-ID: 7GlmHiGeXF6
This commit is contained in:
@@ -298,11 +298,12 @@ Animation::SetStartTime(const Nullable<TimeDuration>& aNewStartTime)
|
||||
|
||||
// https://drafts.csswg.org/web-animations/#current-time
|
||||
Nullable<TimeDuration>
|
||||
Animation::GetCurrentTime() const
|
||||
Animation::GetCurrentTimeForHoldTime(
|
||||
const Nullable<TimeDuration>& aHoldTime) const
|
||||
{
|
||||
Nullable<TimeDuration> result;
|
||||
if (!mHoldTime.IsNull()) {
|
||||
result = mHoldTime;
|
||||
if (!aHoldTime.IsNull()) {
|
||||
result = aHoldTime;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user