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

Unified Diff: third_party/WebKit/Source/core/css/CSSGradientValue.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/CSSGradientValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSGradientValue.h b/third_party/WebKit/Source/core/css/CSSGradientValue.h
index 48b543630fb7b5b2a24eec5df54c1a04ac47d76e..9bcc0b7956215d92322b16771e1c8243709cbba9 100644
--- a/third_party/WebKit/Source/core/css/CSSGradientValue.h
+++ b/third_party/WebKit/Source/core/css/CSSGradientValue.h
@@ -58,6 +58,7 @@ struct CSSGradientColorStop {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
public:
CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { }
+
RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length
RefPtrWillBeMember<CSSValue> m_color;
bool m_colorIsDerivedFromElement;
@@ -72,6 +73,8 @@ public:
return !m_color;
}
+ void serialize(CSSSerializeStream*) const;
+ void deserialize(CSSDeserializeStream*);
DECLARE_TRACE();
};
@@ -113,6 +116,9 @@ public:
void getStopColors(WillBeHeapVector<Color>& stopColors, const LayoutObject*) const;
+ void deserializeAfterDispatch(CSSDeserializeStream*);
+ void serializeAfterDispatch(CSSSerializeStream*) const;
+
DECLARE_TRACE_AFTER_DISPATCH();
protected:
@@ -150,11 +156,11 @@ DEFINE_CSS_VALUE_TYPE_CASTS(CSSGradientValue, isGradientValue());
class CSSLinearGradientValue final : public CSSGradientValue {
public:
-
static PassRefPtrWillBeRawPtr<CSSLinearGradientValue> create(CSSGradientRepeat repeat, CSSGradientType gradientType = CSSLinearGradient)
{
return adoptRefWillBeNoop(new CSSLinearGradientValue(repeat, gradientType));
}
+ static PassRefPtrWillBeRawPtr<CSSLinearGradientValue> deserializeAfterDispatch(CSSDeserializeStream*);
void setAngle(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_angle = val; }
@@ -165,6 +171,8 @@ public:
bool equals(const CSSLinearGradientValue&) const;
+ void serializeAfterDispatch(CSSSerializeStream*) const;
+
DECLARE_TRACE_AFTER_DISPATCH();
private:
@@ -184,6 +192,7 @@ public:
{
return adoptRefWillBeNoop(new CSSRadialGradientValue(repeat, gradientType));
}
+ static PassRefPtrWillBeRawPtr<CSSRadialGradientValue> deserializeAfterDispatch(CSSDeserializeStream*);
String customCSSText() const;
@@ -201,6 +210,8 @@ public:
bool equals(const CSSRadialGradientValue&) const;
+ void serializeAfterDispatch(CSSSerializeStream*) const;
+
DECLARE_TRACE_AFTER_DISPATCH();
private:
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFunctionValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698