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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSKeyframesRule.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #ifndef CSSKeyframesRule_h 26 #ifndef CSSKeyframesRule_h
27 #define CSSKeyframesRule_h 27 #define CSSKeyframesRule_h
28 28
29 #include "core/css/CSSRule.h" 29 #include "core/css/CSSRule.h"
30 #include "core/css/StyleRule.h" 30 #include "core/css/StyleRule.h"
31 #include "wtf/Forward.h" 31 #include "wtf/Forward.h"
32 #include "wtf/text/AtomicString.h" 32 #include "wtf/text/AtomicString.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class CSSDeserializeStream;
37 class CSSKeyframeRule;
36 class CSSRuleList; 38 class CSSRuleList;
37 class CSSKeyframeRule; 39 class CSSSerializeStream;
38 class StyleRuleKeyframe; 40 class StyleRuleKeyframe;
39 41
40 class StyleRuleKeyframes final : public StyleRuleBase { 42 class StyleRuleKeyframes final : public StyleRuleBase {
41 public: 43 public:
42 static PassRefPtrWillBeRawPtr<StyleRuleKeyframes> create() { return adoptRef WillBeNoop(new StyleRuleKeyframes()); } 44 static PassRefPtrWillBeRawPtr<StyleRuleKeyframes> create() { return adoptRef WillBeNoop(new StyleRuleKeyframes()); }
45 static PassRefPtrWillBeRawPtr<StyleRuleKeyframes> deserializeAfterDispatch(C SSDeserializeStream*);
43 46
44 ~StyleRuleKeyframes(); 47 ~StyleRuleKeyframes();
45 48
46 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe>>& keyframes() c onst { return m_keyframes; } 49 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe>>& keyframes() c onst { return m_keyframes; }
47 50
48 void parserAppendKeyframe(PassRefPtrWillBeRawPtr<StyleRuleKeyframe>); 51 void parserAppendKeyframe(PassRefPtrWillBeRawPtr<StyleRuleKeyframe>);
49 void wrapperAppendKeyframe(PassRefPtrWillBeRawPtr<StyleRuleKeyframe>); 52 void wrapperAppendKeyframe(PassRefPtrWillBeRawPtr<StyleRuleKeyframe>);
50 void wrapperRemoveKeyframe(unsigned); 53 void wrapperRemoveKeyframe(unsigned);
51 54
52 String name() const { return m_name; } 55 String name() const { return m_name; }
53 void setName(const String& name) { m_name = AtomicString(name); } 56 void setName(const String& name) { m_name = AtomicString(name); }
54 57
55 bool isVendorPrefixed() const { return m_isPrefixed; } 58 bool isVendorPrefixed() const { return m_isPrefixed; }
56 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; } 59 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; }
57 60
58 int findKeyframeIndex(const String& key) const; 61 int findKeyframeIndex(const String& key) const;
59 62
60 PassRefPtrWillBeRawPtr<StyleRuleKeyframes> copy() const { return adoptRefWil lBeNoop(new StyleRuleKeyframes(*this)); } 63 PassRefPtrWillBeRawPtr<StyleRuleKeyframes> copy() const { return adoptRefWil lBeNoop(new StyleRuleKeyframes(*this)); }
61 64
65 void serializeAfterDispatch(CSSSerializeStream*) const;
66
62 DECLARE_TRACE_AFTER_DISPATCH(); 67 DECLARE_TRACE_AFTER_DISPATCH();
63 68
64 void styleChanged() { m_version++; } 69 void styleChanged() { m_version++; }
65 unsigned version() const { return m_version; } 70 unsigned version() const { return m_version; }
66 71
67 private: 72 private:
68 StyleRuleKeyframes(); 73 StyleRuleKeyframes();
69 explicit StyleRuleKeyframes(const StyleRuleKeyframes&); 74 explicit StyleRuleKeyframes(const StyleRuleKeyframes&);
70 75
71 WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe>> m_keyframes; 76 WillBeHeapVector<RefPtrWillBeMember<StyleRuleKeyframe>> m_keyframes;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 mutable WillBeHeapVector<RefPtrWillBeMember<CSSKeyframeRule>> m_childRuleCSS OMWrappers; 124 mutable WillBeHeapVector<RefPtrWillBeMember<CSSKeyframeRule>> m_childRuleCSS OMWrappers;
120 mutable OwnPtrWillBeMember<CSSRuleList> m_ruleListCSSOMWrapper; 125 mutable OwnPtrWillBeMember<CSSRuleList> m_ruleListCSSOMWrapper;
121 bool m_isPrefixed; 126 bool m_isPrefixed;
122 }; 127 };
123 128
124 DEFINE_CSS_RULE_TYPE_CASTS(CSSKeyframesRule, KEYFRAMES_RULE); 129 DEFINE_CSS_RULE_TYPE_CASTS(CSSKeyframesRule, KEYFRAMES_RULE);
125 130
126 } // namespace blink 131 } // namespace blink
127 132
128 #endif // CSSKeyframesRule_h 133 #endif // CSSKeyframesRule_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSInitialValue.cpp ('k') | third_party/WebKit/Source/core/css/CSSKeyframesRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698