| Index: third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp b/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
|
| index 9dbadee8a74fe5b3deb84c399a559a2ae3bfcb32..031348f4e76eda2fe7008df83de7b6079d49db97 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
|
| +++ b/third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp
|
| @@ -29,6 +29,8 @@
|
| #include "core/css/CSSRuleList.h"
|
| #include "core/css/CSSStyleSheet.h"
|
| #include "core/css/parser/CSSParser.h"
|
| +#include "core/css/serializer/CSSDeserializeStream.h"
|
| +#include "core/css/serializer/CSSSerializeStream.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| @@ -84,6 +86,35 @@ int StyleRuleKeyframes::findKeyframeIndex(const String& key) const
|
| return -1;
|
| }
|
|
|
| +void StyleRuleKeyframes::serializeAfterDispatch(CSSSerializeStream* stream) const
|
| +{
|
| + stream->writeUnsigned(m_keyframes.size());
|
| + for (const RefPtrWillBeMember<StyleRuleKeyframe>& keyframe : m_keyframes)
|
| + keyframe->serialize(stream);
|
| +
|
| + stream->writeAtomicString(m_name);
|
| + stream->writeUnsigned(m_version);
|
| + stream->writeBool(m_isPrefixed);
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<StyleRuleKeyframes> StyleRuleKeyframes::deserializeAfterDispatch(CSSDeserializeStream* stream)
|
| +{
|
| + RefPtrWillBeRawPtr<StyleRuleKeyframes> rule = adoptRefWillBeNoop(new StyleRuleKeyframes());
|
| +
|
| + unsigned size = stream->readUnsigned();
|
| + rule->m_keyframes.reserveCapacity(size);
|
| + for (unsigned i = 0; i < size; ++ i) {
|
| + RefPtrWillBeRawPtr<StyleRuleBase> keyframeRule = StyleRuleBase::deserialize(stream);
|
| + rule->m_keyframes.append(toStyleRuleKeyframe(keyframeRule.get()));
|
| + }
|
| +
|
| + rule->m_name = stream->readAtomicString();
|
| + rule->m_version = stream->readUnsigned();
|
| + rule->m_isPrefixed = stream->readBool();
|
| +
|
| + return rule.release();
|
| +}
|
| +
|
| DEFINE_TRACE_AFTER_DISPATCH(StyleRuleKeyframes)
|
| {
|
| visitor->trace(m_keyframes);
|
|
|