Skip to content

Commit

Permalink
Bug 1073379, part 1 - Add an AnimationUtils::DoubleToTimeDuration hel…
Browse files Browse the repository at this point in the history
…per. r=birtles
  • Loading branch information
rmottola committed Aug 17, 2019
1 parent 30dc41e commit aa1ad82
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dom/animation/AnimationUtils.h
Expand Up @@ -26,6 +26,18 @@ class AnimationUtils

return result;
}

static Nullable<TimeDuration>
DoubleToTimeDuration(const Nullable<double>& aTime)
{
Nullable<TimeDuration> result;

if (!aTime.IsNull()) {
result.SetValue(TimeDuration::FromMilliseconds(aTime.Value()));
}

return result;
}
};

} // namespace dom
Expand Down

0 comments on commit aa1ad82

Please sign in to comment.