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

Unified Diff: third_party/WebKit/Source/core/css/MediaQueryExp.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/MediaQueryExp.h
diff --git a/third_party/WebKit/Source/core/css/MediaQueryExp.h b/third_party/WebKit/Source/core/css/MediaQueryExp.h
index 98d83338be00776b65fe8fa7f66a3e5083fae64a..3dd66cb820c60092493736b885b568473959d136 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryExp.h
+++ b/third_party/WebKit/Source/core/css/MediaQueryExp.h
@@ -40,7 +40,9 @@
namespace blink {
+class CSSDeserializeStream;
class CSSParserToken;
+class CSSSerializeStream;
struct MediaQueryExpValue {
DISALLOW_NEW();
@@ -78,12 +80,16 @@ struct MediaQueryExpValue {
return (numerator == expValue.numerator && denominator == expValue.denominator);
return !expValue.isValid();
}
+
+ void serialize(CSSSerializeStream*) const;
+ static MediaQueryExpValue deserialize(CSSDeserializeStream*);
};
-class CORE_EXPORT MediaQueryExp : public NoBaseWillBeGarbageCollectedFinalized<MediaQueryExp> {
+class CORE_EXPORT MediaQueryExp final : public NoBaseWillBeGarbageCollectedFinalized<MediaQueryExp> {
USING_FAST_MALLOC_WILL_BE_REMOVED(MediaQueryExp);
public:
static PassOwnPtrWillBeRawPtr<MediaQueryExp> createIfValid(const String& mediaFeature, const Vector<CSSParserToken, 4>&);
+ static PassOwnPtrWillBeRawPtr<MediaQueryExp> deserialize(CSSDeserializeStream*);
~MediaQueryExp();
const String& mediaFeature() const { return m_mediaFeature; }
@@ -100,6 +106,8 @@ public:
MediaQueryExp(const MediaQueryExp& other);
+ void serialize(CSSSerializeStream*) const;
+
DEFINE_INLINE_TRACE() { }
private:
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQuery.cpp ('k') | third_party/WebKit/Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698