Bug 1196114 - Part 2: Add AnimationPropertyStatus interface and KeyframeEffectReadOnly.runningStatus(). r=birtles,smaug

MozReview-Commit-ID: CPz3DtWxKll
This commit is contained in:
Hiroyuki Ikezoe
2016-03-04 06:36:41 +09:00
parent 4090b1e26c
commit e8f1308737
5 changed files with 165 additions and 0 deletions

View File

@@ -1877,6 +1877,30 @@ KeyframeEffectReadOnly::GetFrames(JSContext*& aCx,
}
}
void
KeyframeEffectReadOnly::GetPropertyState(
nsTArray<AnimationPropertyState>& aStates) const
{
for (const AnimationProperty& property : mProperties) {
// Bug 1252730: We should also expose this winsInCascade as well.
if (!property.mWinsInCascade) {
continue;
}
AnimationPropertyState state;
state.mProperty.Construct(
NS_ConvertASCIItoUTF16(nsCSSProps::GetStringValue(property.mProperty)));
state.mRunningOnCompositor.Construct(property.mIsRunningOnCompositor);
if (property.mPerformanceWarning.isSome()) {
state.mWarning.Construct(property.mPerformanceWarning.value());
}
aStates.AppendElement(state);
}
}
/* static */ const TimeDuration
KeyframeEffectReadOnly::OverflowRegionRefreshInterval()
{