Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1366)

Unified Diff: third_party/WebKit/Source/core/css/CSSShadowValue.cpp

Issue 1481383002: [Experimental] CSSSerializer Proof-of-concept Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: snapshot: top_25 sites ser/dser now works Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSShadowValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSShadowValue.cpp b/third_party/WebKit/Source/core/css/CSSShadowValue.cpp
index 19e899ff4543ee5dcb89832843a17bb566d627c8..e508fc2e0afa8e75da11c769065726df5ead66f0 100644
--- a/third_party/WebKit/Source/core/css/CSSShadowValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSShadowValue.cpp
@@ -20,6 +20,8 @@
#include "core/css/CSSShadowValue.h"
#include "core/css/CSSPrimitiveValue.h"
+#include "core/css/serializer/CSSDeserializeStream.h"
+#include "core/css/serializer/CSSSerializeStream.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
@@ -42,6 +44,24 @@ CSSShadowValue::CSSShadowValue(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> x,
{
}
+PassRefPtrWillBeRawPtr<CSSShadowValue> CSSShadowValue::deserializeAfterDispatch(CSSDeserializeStream* stream)
+{
+ RefPtrWillBeRawPtr<CSSValue> x = CSSValue::deserialize(stream);
+ RefPtrWillBeRawPtr<CSSValue> y = CSSValue::deserialize(stream);
+ RefPtrWillBeRawPtr<CSSValue> blur = CSSValue::deserialize(stream);
+ RefPtrWillBeRawPtr<CSSValue> spread = CSSValue::deserialize(stream);
+ RefPtrWillBeRawPtr<CSSValue> style = CSSValue::deserialize(stream);
+ RefPtrWillBeRawPtr<CSSValue> color = CSSValue::deserialize(stream);
+
+ return create(
+ toCSSPrimitiveValue(x.get()),
+ toCSSPrimitiveValue(y.get()),
+ toCSSPrimitiveValue(blur.get()),
+ toCSSPrimitiveValue(spread.get()),
+ toCSSPrimitiveValue(style.get()),
+ color.release());
+}
+
String CSSShadowValue::customCSSText() const
{
StringBuilder text;
@@ -87,6 +107,16 @@ bool CSSShadowValue::equals(const CSSShadowValue& other) const
&& compareCSSValuePtr(style, other.style);
}
+void CSSShadowValue::serializeAfterDispatch(CSSSerializeStream* stream) const
+{
+ x->serialize(stream);
+ y->serialize(stream);
+ blur->serialize(stream);
+ spread->serialize(stream);
+ style->serialize(stream);
+ color->serialize(stream);
+}
+
DEFINE_TRACE_AFTER_DISPATCH(CSSShadowValue)
{
visitor->trace(x);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSShadowValue.h ('k') | third_party/WebKit/Source/core/css/CSSStringValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698