mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1371518 - Use Servo backend to determine if a property is transitionable; r=hiro
This allows Gecko to use the same criteria as Servo for evaluating if a property should be transitioned and will cause Gecko to exclude discretely animated properties, including, in future, the 'display' property. MozReview-Commit-ID: H2wWVo5isKS --HG-- extra : rebase_source : 34798306aa5f485b0583d3640caf24d123922584
This commit is contained in:
parent
7a76319c9a
commit
f94eed9781
@ -228,6 +228,8 @@ SERVO_BINDING_FUNC(Servo_ComputedValues_ExtractAnimationValue,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_Property_IsAnimatable, bool,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_Property_IsTransitionable, bool,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_Property_IsDiscreteAnimatable, bool,
|
||||
nsCSSPropertyID property)
|
||||
SERVO_BINDING_FUNC(Servo_GetProperties_Overriding_Animation, void,
|
||||
|
@ -828,12 +828,13 @@ GetTransitionKeyframes(nsCSSPropertyID aProperty,
|
||||
}
|
||||
|
||||
static bool
|
||||
IsAnimatable(nsCSSPropertyID aProperty, bool aIsServo)
|
||||
IsTransitionable(nsCSSPropertyID aProperty, bool aIsServo)
|
||||
{
|
||||
if (aIsServo) {
|
||||
return Servo_Property_IsAnimatable(aProperty);
|
||||
return Servo_Property_IsTransitionable(aProperty);
|
||||
}
|
||||
|
||||
// FIXME: This should also exclude discretely-animated properties.
|
||||
return nsCSSProps::kAnimTypeTable[aProperty] != eStyleAnimType_None;
|
||||
}
|
||||
|
||||
@ -871,7 +872,7 @@ nsTransitionManager::ConsiderInitiatingTransition(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsAnimatable(aProperty, aElement->IsStyledByServo())) {
|
||||
if (!IsTransitionable(aProperty, aElement->IsStyledByServo())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user