зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1311257 - getKeyframes() returns base computed values in missing keyframes. r=birtles
MozReview-Commit-ID: K8btLtALEfK --HG-- extra : rebase_source : 1709e9a153790f90e26da7170273474a4a1d2dfd
This commit is contained in:
Родитель
2614ef2eac
Коммит
e432173483
|
@ -1248,6 +1248,8 @@ KeyframeEffectReadOnly::GetKeyframes(JSContext*& aCx,
|
|||
return;
|
||||
}
|
||||
|
||||
bool isServo = mDocument->IsStyledByServo();
|
||||
|
||||
for (const Keyframe& keyframe : mKeyframes) {
|
||||
// Set up a dictionary object for the explicit members
|
||||
BaseComputedKeyframe keyframeDict;
|
||||
|
@ -1275,10 +1277,21 @@ KeyframeEffectReadOnly::GetKeyframes(JSContext*& aCx,
|
|||
JS::Rooted<JSObject*> keyframeObject(aCx, &keyframeJSValue.toObject());
|
||||
for (const PropertyValuePair& propertyValue : keyframe.mPropertyValues) {
|
||||
nsAutoString stringValue;
|
||||
if (propertyValue.mServoDeclarationBlock) {
|
||||
Servo_DeclarationBlock_SerializeOneValue(
|
||||
propertyValue.mServoDeclarationBlock,
|
||||
propertyValue.mProperty, &stringValue);
|
||||
if (isServo) {
|
||||
if (propertyValue.mServoDeclarationBlock) {
|
||||
Servo_DeclarationBlock_SerializeOneValue(
|
||||
propertyValue.mServoDeclarationBlock,
|
||||
propertyValue.mProperty, &stringValue);
|
||||
} else {
|
||||
RawServoAnimationValue* value =
|
||||
mBaseStyleValuesForServo.GetWeak(propertyValue.mProperty);
|
||||
|
||||
if (value) {
|
||||
Servo_AnimationValue_Serialize(value,
|
||||
propertyValue.mProperty,
|
||||
&stringValue);
|
||||
}
|
||||
}
|
||||
} else if (nsCSSProps::IsShorthand(propertyValue.mProperty)) {
|
||||
// nsCSSValue::AppendToString does not accept shorthands properties but
|
||||
// works with token stream values if we pass eCSSProperty_UNKNOWN as
|
||||
|
|
Загрузка…
Ссылка в новой задаче