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

Unified Diff: third_party/WebKit/Source/core/css/CSSColorValue.h

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/CSSColorValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSColorValue.h b/third_party/WebKit/Source/core/css/CSSColorValue.h
index 6b7ce222f668cb349965cc1d15c5c57c81a06680..5215848b32e5d43364f0be899d3b034c92daf084 100644
--- a/third_party/WebKit/Source/core/css/CSSColorValue.h
+++ b/third_party/WebKit/Source/core/css/CSSColorValue.h
@@ -6,6 +6,8 @@
#define CSSColorValue_h
#include "core/css/CSSValue.h"
+#include "core/css/serializer/CSSDeserializeStream.h"
+#include "core/css/serializer/CSSSerializeStream.h"
#include "platform/graphics/Color.h"
#include "wtf/PassRefPtr.h"
@@ -18,6 +20,10 @@ public:
{
return adoptRefWillBeNoop(new CSSColorValue(color));
}
+ static PassRefPtrWillBeRawPtr<CSSColorValue> deserializeAfterDispatch(CSSDeserializeStream* stream)
+ {
+ return create(stream->readColor());
+ }
String customCSSText() const
{
@@ -31,6 +37,11 @@ public:
return m_color == other.m_color;
}
+ void serializeAfterDispatch(CSSSerializeStream* stream) const
+ {
+ stream->writeColor(m_color);
+ }
+
DEFINE_INLINE_TRACE_AFTER_DISPATCH()
{
CSSValue::traceAfterDispatch(visitor);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSCalculationValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSCounterValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698