mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1073379, part 1 - Add an AnimationUtils::DoubleToTimeDuration helper. r=birtles
This commit is contained in:
parent
a7f6ea8515
commit
69ac7e7f6d
@ -26,6 +26,18 @@ public:
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user