| Index: third_party/WebKit/Source/core/css/StyleRuleKeyframe.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/StyleRuleKeyframe.cpp b/third_party/WebKit/Source/core/css/StyleRuleKeyframe.cpp
|
| index c49fdd6fca11d34cd65cb7d8ac1f8c0f81ec3b1f..53ed3ebf9246bcb2b491416d689bdcb17e80c3d6 100644
|
| --- a/third_party/WebKit/Source/core/css/StyleRuleKeyframe.cpp
|
| +++ b/third_party/WebKit/Source/core/css/StyleRuleKeyframe.cpp
|
| @@ -6,14 +6,16 @@
|
|
|
| #include "core/css/StylePropertySet.h"
|
| #include "core/css/parser/CSSParser.h"
|
| +#include "core/css/serializer/CSSDeserializeStream.h"
|
| +#include "core/css/serializer/CSSSerializeStream.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| namespace blink {
|
|
|
| StyleRuleKeyframe::StyleRuleKeyframe(PassOwnPtr<Vector<double>> keys, PassRefPtrWillBeRawPtr<StylePropertySet> properties)
|
| -: StyleRuleBase(Keyframe)
|
| -, m_properties(properties)
|
| -, m_keys(*keys)
|
| + : StyleRuleBase(Keyframe)
|
| + , m_properties(properties)
|
| + , m_keys(*keys)
|
| {
|
| }
|
|
|
| @@ -69,6 +71,27 @@ String StyleRuleKeyframe::cssText() const
|
| return result.toString();
|
| }
|
|
|
| +void StyleRuleKeyframe::serializeAfterDispatch(CSSSerializeStream* stream) const
|
| +{
|
| + m_properties->serialize(stream);
|
| + stream->writeUnsigned(m_keys.size());
|
| + for (double key : m_keys)
|
| + stream->writeDouble(key);
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<StyleRuleKeyframe> StyleRuleKeyframe::deserializeAfterDispatch(CSSDeserializeStream* stream)
|
| +{
|
| + RefPtrWillBeRawPtr<StylePropertySet> properties = ImmutableStylePropertySet::deserialize(stream);
|
| +
|
| + unsigned size = stream->readUnsigned();
|
| + OwnPtr<Vector<double>> keys = adoptPtr(new Vector<double>());
|
| + keys->reserveCapacity(size);
|
| + for (unsigned i = 0; i < size; ++ i)
|
| + keys->append(stream->readDouble());
|
| +
|
| + return create(keys.release(), properties);
|
| +}
|
| +
|
| DEFINE_TRACE_AFTER_DISPATCH(StyleRuleKeyframe)
|
| {
|
| visitor->trace(m_properties);
|
|
|