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

Unified Diff: third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.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/CSSUnicodeRangeValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.cpp b/third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.cpp
index 76cb95d7449d030f5592ea89c163bc142e2104dd..f1ed8918c52ecdf78a0c679940a6af96c8b80ddb 100644
--- a/third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.cpp
@@ -25,10 +25,19 @@
#include "core/css/CSSUnicodeRangeValue.h"
+#include "core/css/serializer/CSSDeserializeStream.h"
+#include "core/css/serializer/CSSSerializeStream.h"
#include "wtf/text/WTFString.h"
namespace blink {
+PassRefPtrWillBeRawPtr<CSSUnicodeRangeValue> CSSUnicodeRangeValue::deserializeAfterDispatch(CSSDeserializeStream* stream)
+{
+ UChar32 from = stream->readUChar32();
+ UChar32 to = stream->readUChar32();
+ return CSSUnicodeRangeValue::create(from, to);
+}
+
String CSSUnicodeRangeValue::customCSSText() const
{
if (m_from == m_to)
@@ -41,4 +50,10 @@ bool CSSUnicodeRangeValue::equals(const CSSUnicodeRangeValue& other) const
return m_from == other.m_from && m_to == other.m_to;
}
+void CSSUnicodeRangeValue::serializeAfterDispatch(CSSSerializeStream* stream) const
+{
+ stream->writeUChar32(m_from);
+ stream->writeUChar32(m_to);
+}
+
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSUnicodeRangeValue.h ('k') | third_party/WebKit/Source/core/css/CSSValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698