--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -411,20 +411,20 @@ ResolvedStyleCache::Get(nsPresContext *a
RefPtr<nsStyleContext> resultStrong = aPresContext->StyleSet()->AsGecko()->
ResolveStyleByAddingRules(aParentStyleContext, rules);
mCache.Put(aKeyframeDeclaration, resultStrong);
result = resultStrong;
}
return result;
}
-class MOZ_STACK_CLASS CSSAnimationBuilder final {
+class MOZ_STACK_CLASS GeckoCSSAnimationBuilder final {
public:
- CSSAnimationBuilder(nsStyleContext* aStyleContext,
- const NonOwningAnimationTarget& aTarget)
+ GeckoCSSAnimationBuilder(nsStyleContext* aStyleContext,
+ const NonOwningAnimationTarget& aTarget)
: mStyleContext(aStyleContext)
, mTarget(aTarget)
{
MOZ_ASSERT(aStyleContext);
MOZ_ASSERT(aTarget.mElement);
}
bool BuildKeyframes(nsPresContext* aPresContext,
@@ -595,19 +595,19 @@ BuildAnimation(nsPresContext* aPresConte
} else {
animation->PlayFromStyle();
}
return animation.forget();
}
bool
-CSSAnimationBuilder::BuildKeyframes(nsPresContext* aPresContext,
- const StyleAnimation& aSrc,
- nsTArray<Keyframe>& aKeyframes)
+GeckoCSSAnimationBuilder::BuildKeyframes(nsPresContext* aPresContext,
+ const StyleAnimation& aSrc,
+ nsTArray<Keyframe>& aKeyframes)
{
MOZ_ASSERT(aPresContext);
if (aPresContext->StyleSet()->IsServo()) {
ServoStyleSet* styleSet = aPresContext->StyleSet()->AsServo();
MOZ_ASSERT(styleSet);
const ServoComputedValues* computedValues =
mStyleContext->StyleSource().AsServoComputedValues();
@@ -626,19 +626,19 @@ CSSAnimationBuilder::BuildKeyframes(nsPr
}
aKeyframes = BuildAnimationFrames(aPresContext, aSrc, rule);
}
return true;
}
nsTArray<Keyframe>
-CSSAnimationBuilder::BuildAnimationFrames(nsPresContext* aPresContext,
- const StyleAnimation& aSrc,
- const nsCSSKeyframesRule* aRule)
+GeckoCSSAnimationBuilder::BuildAnimationFrames(nsPresContext* aPresContext,
+ const StyleAnimation& aSrc,
+ const nsCSSKeyframesRule* aRule)
{
// Ideally we'd like to build up a set of Keyframe objects that more-or-less
// reflect the keyframes as-specified in the @keyframes rule(s) so that
// authors get something intuitive when they call anim.effect.getKeyframes().
//
// That, however, proves to be difficult because the way CSS declarations are
// processed differs from how we are able to represent keyframes as
// JavaScript objects in the Web Animations API.
@@ -799,17 +799,17 @@ CSSAnimationBuilder::BuildAnimationFrame
FillInMissingKeyframeValues(aPresContext, animatedProperties,
propertiesSetAtStart, propertiesSetAtEnd,
inheritedTimingFunction, keyframes);
return keyframes;
}
Maybe<ComputedTimingFunction>
-CSSAnimationBuilder::GetKeyframeTimingFunction(
+GeckoCSSAnimationBuilder::GetKeyframeTimingFunction(
nsPresContext* aPresContext,
nsCSSKeyframeRule* aKeyframeRule,
const Maybe<ComputedTimingFunction>& aInheritedTimingFunction)
{
Maybe<ComputedTimingFunction> result;
if (aKeyframeRule->Declaration() &&
aKeyframeRule->Declaration()->HasProperty(
@@ -836,17 +836,17 @@ ConvertTimingFunction(const nsTimingFunc
result.emplace();
result->Init(aTimingFunction);
}
return result;
}
nsTArray<PropertyValuePair>
-CSSAnimationBuilder::GetKeyframePropertyValues(
+GeckoCSSAnimationBuilder::GetKeyframePropertyValues(
nsPresContext* aPresContext,
nsCSSKeyframeRule* aKeyframeRule,
nsCSSPropertyIDSet& aAnimatedProperties)
{
nsTArray<PropertyValuePair> result;
RefPtr<nsStyleContext> styleContext =
mResolvedStyles.Get(aPresContext, mStyleContext,
aKeyframeRule->Declaration());
@@ -912,17 +912,17 @@ FindMatchingKeyframe(
return true;
}
++aIndex;
}
return false;
}
void
-CSSAnimationBuilder::FillInMissingKeyframeValues(
+GeckoCSSAnimationBuilder::FillInMissingKeyframeValues(
nsPresContext* aPresContext,
nsCSSPropertyIDSet aAnimatedProperties,
nsCSSPropertyIDSet aPropertiesSetAtStart,
nsCSSPropertyIDSet aPropertiesSetAtEnd,
const Maybe<ComputedTimingFunction>& aInheritedTimingFunction,
nsTArray<Keyframe>& aKeyframes)
{
static const size_t kNotSet = static_cast<size_t>(-1);
@@ -979,31 +979,31 @@ CSSAnimationBuilder::FillInMissingKeyfra
}
if (endKeyframe && !aPropertiesSetAtEnd.HasProperty(prop)) {
AppendProperty(aPresContext, prop, endKeyframe->mPropertyValues);
}
}
}
void
-CSSAnimationBuilder::AppendProperty(
+GeckoCSSAnimationBuilder::AppendProperty(
nsPresContext* aPresContext,
nsCSSPropertyID aProperty,
nsTArray<PropertyValuePair>& aPropertyValues)
{
PropertyValuePair propertyValue;
propertyValue.mProperty = aProperty;
propertyValue.mValue = GetComputedValue(aPresContext, aProperty);
aPropertyValues.AppendElement(Move(propertyValue));
}
nsCSSValue
-CSSAnimationBuilder::GetComputedValue(nsPresContext* aPresContext,
- nsCSSPropertyID aProperty)
+GeckoCSSAnimationBuilder::GetComputedValue(nsPresContext* aPresContext,
+ nsCSSPropertyID aProperty)
{
nsCSSValue result;
StyleAnimationValue computedValue;
if (!mStyleWithoutAnimation) {
MOZ_ASSERT(aPresContext->StyleSet()->IsGecko(),
"ServoStyleSet should not use nsAnimationManager for "
"animations");
@@ -1079,17 +1079,17 @@ nsAnimationManager::UpdateAnimations(nsS
"document tree");
if (aStyleContext->IsInDisplayNoneSubtree()) {
StopAnimationsForElement(aElement, aStyleContext->GetPseudoType());
return;
}
NonOwningAnimationTarget target(aElement, aStyleContext->GetPseudoType());
- CSSAnimationBuilder builder(aStyleContext, target);
+ GeckoCSSAnimationBuilder builder(aStyleContext, target);
const nsStyleDisplay* disp = aStyleContext->StyleDisplay();
DoUpdateAnimations(target, *disp, builder);
}
template<class BuilderType>
void
nsAnimationManager::DoUpdateAnimations(