Bug 1302949 - Serialize specified keyframe values; r=heycam

MozReview-Commit-ID: 9BSkci1kqU6

--HG--
extra : rebase_source : b0532e144b3208d79e1e26ce3bff9a20c896abad
This commit is contained in:
Brian Birtles 2016-09-16 09:26:48 +09:00
parent 0f8222d843
commit a803b5ac49
2 changed files with 10 additions and 2 deletions

View File

@ -859,8 +859,13 @@ KeyframeEffectReadOnly::GetKeyframes(JSContext*& aCx,
: propertyValue.mProperty;
nsAutoString stringValue;
propertyValue.mValue.AppendToString(
propertyForSerializing, stringValue, nsCSSValue::eNormalized);
if (propertyValue.mServoDeclarationBlock) {
Servo_DeclarationBlock_SerializeOneValue(
propertyValue.mServoDeclarationBlock, &stringValue);
} else {
propertyValue.mValue.AppendToString(
propertyForSerializing, stringValue, nsCSSValue::eNormalized);
}
JS::Rooted<JS::Value> value(aCx);
if (!ToJSValue(aCx, stringValue, &value) ||

View File

@ -64,6 +64,9 @@ SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetImmutable, void,
ServoDeclarationBlockBorrowed declarations)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_ClearCachePointer, void,
ServoDeclarationBlockBorrowed declarations)
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SerializeOneValue, void,
ServoDeclarationBlockBorrowed declarations,
nsString* buffer)
// CSS supports()
SERVO_BINDING_FUNC(Servo_CSSSupports, bool,