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

Unified Diff: third_party/WebKit/Source/core/css/StylePropertySet.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/StylePropertySet.h
diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.h b/third_party/WebKit/Source/core/css/StylePropertySet.h
index 3f900840e7d0a238ebc156477b16972791734cfb..a9523ebf6ea7e62f88116280498178ed74dd17d0 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySet.h
+++ b/third_party/WebKit/Source/core/css/StylePropertySet.h
@@ -35,7 +35,9 @@
namespace blink {
+class CSSDeserializeStream;
class CSSStyleDeclaration;
+class CSSSerializeStream;
class ImmutableStylePropertySet;
class MutableStylePropertySet;
class StyleSheetContents;
@@ -125,6 +127,8 @@ public:
bool hasFailedOrCanceledSubresources() const;
+ void serialize(CSSSerializeStream*) const;
+
static unsigned averageSizeInBytes();
#ifndef NDEBUG
@@ -163,6 +167,7 @@ class CORE_EXPORT ImmutableStylePropertySet : public StylePropertySet {
public:
~ImmutableStylePropertySet();
static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> create(const CSSProperty* properties, unsigned count, CSSParserMode);
+ static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> deserialize(CSSDeserializeStream*);
unsigned propertyCount() const { return m_arraySize; }
@@ -172,6 +177,8 @@ public:
template<typename T> // CSSPropertyID or AtomicString
int findPropertyIndex(T property) const;
+ void serializeAfterDispatch(CSSSerializeStream*) const;
+
DECLARE_TRACE_AFTER_DISPATCH();
void* operator new(std::size_t, void* location)
@@ -183,6 +190,7 @@ public:
private:
ImmutableStylePropertySet(const CSSProperty*, unsigned count, CSSParserMode);
+ ImmutableStylePropertySet(CSSDeserializeStream*, unsigned count, CSSParserMode);
};
inline const RawPtrWillBeMember<CSSValue>* ImmutableStylePropertySet::valueArray() const
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryExp.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698