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

Unified Diff: third_party/WebKit/Source/core/css/CSSFunctionValue.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/CSSFunctionValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSFunctionValue.cpp b/third_party/WebKit/Source/core/css/CSSFunctionValue.cpp
index 9916583a71022ee78aface586ce26bb8f9669468..c3bdca78ea9be2c79958baefb4f605ef58532fcd 100644
--- a/third_party/WebKit/Source/core/css/CSSFunctionValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFunctionValue.cpp
@@ -4,10 +4,24 @@
#include "core/css/CSSFunctionValue.h"
+#include "core/css/serializer/CSSDeserializeStream.h"
+#include "core/css/serializer/CSSSerializeStream.h"
#include "wtf/text/StringBuilder.h"
namespace blink {
+PassRefPtrWillBeRawPtr<CSSFunctionValue> CSSFunctionValue::deserializeAfterDispatch(unsigned bitfields, CSSDeserializeStream* stream)
+{
+ CSSValueID valueID = static_cast<CSSValueID>(stream->readUnsigned());
+ return adoptRefWillBeNoop(new CSSFunctionValue(bitfields, valueID, stream));
+}
+
+CSSFunctionValue::CSSFunctionValue(unsigned bitfields, CSSValueID id, CSSDeserializeStream* stream)
+ : CSSValueList(FunctionClass, bitfields, stream)
+ , m_valueID(id)
+{
+}
+
String CSSFunctionValue::customCSSText() const
{
StringBuilder result;
@@ -18,4 +32,9 @@ String CSSFunctionValue::customCSSText() const
return result.toString();
}
+void CSSFunctionValue::serializeAfterDispatch(CSSSerializeStream* stream) const
+{
+ stream->writeUnsigned(m_valueID);
+ CSSValueList::serializeAfterDispatch(stream);
+}
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFunctionValue.h ('k') | third_party/WebKit/Source/core/css/CSSGradientValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698