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

Side by Side Diff: Source/core/css/CSSKeyframesRule.h

Issue 719833002: Clean up virtual functions in css/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove some changes Created 6 years, 1 month 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
« no previous file with comments | « Source/core/css/CSSKeyframeRule.h ('k') | Source/core/css/CSSMediaRule.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class CSSKeyframesRule final : public CSSRule { 75 class CSSKeyframesRule final : public CSSRule {
76 DEFINE_WRAPPERTYPEINFO(); 76 DEFINE_WRAPPERTYPEINFO();
77 public: 77 public:
78 static PassRefPtrWillBeRawPtr<CSSKeyframesRule> create(StyleRuleKeyframes* r ule, CSSStyleSheet* sheet) 78 static PassRefPtrWillBeRawPtr<CSSKeyframesRule> create(StyleRuleKeyframes* r ule, CSSStyleSheet* sheet)
79 { 79 {
80 return adoptRefWillBeNoop(new CSSKeyframesRule(rule, sheet)); 80 return adoptRefWillBeNoop(new CSSKeyframesRule(rule, sheet));
81 } 81 }
82 82
83 virtual ~CSSKeyframesRule(); 83 virtual ~CSSKeyframesRule();
84 84
85 virtual CSSRule::Type type() const override { return KEYFRAMES_RULE; }
86 virtual String cssText() const override; 85 virtual String cssText() const override;
87 virtual void reattach(StyleRuleBase*) override; 86 virtual void reattach(StyleRuleBase*) override;
88 87
89 String name() const { return m_keyframesRule->name(); } 88 String name() const { return m_keyframesRule->name(); }
90 void setName(const String&); 89 void setName(const String&);
91 90
92 CSSRuleList* cssRules(); 91 CSSRuleList* cssRules();
93 92
94 void insertRule(const String& rule); 93 void insertRule(const String& rule);
95 void deleteRule(const String& key); 94 void deleteRule(const String& key);
96 CSSKeyframeRule* findRule(const String& key); 95 CSSKeyframeRule* findRule(const String& key);
97 96
98 // For IndexedGetter and CSSRuleList. 97 // For IndexedGetter and CSSRuleList.
99 unsigned length() const; 98 unsigned length() const;
100 CSSKeyframeRule* item(unsigned index) const; 99 CSSKeyframeRule* item(unsigned index) const;
101 100
102 bool isVendorPrefixed() const { return m_isPrefixed; } 101 bool isVendorPrefixed() const { return m_isPrefixed; }
103 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; } 102 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; }
104 103
105 virtual void trace(Visitor*) override; 104 virtual void trace(Visitor*) override;
106 105
107 private: 106 private:
108 CSSKeyframesRule(StyleRuleKeyframes*, CSSStyleSheet* parent); 107 CSSKeyframesRule(StyleRuleKeyframes*, CSSStyleSheet* parent);
109 108
109 virtual CSSRule::Type type() const override { return KEYFRAMES_RULE; }
110
110 RefPtrWillBeMember<StyleRuleKeyframes> m_keyframesRule; 111 RefPtrWillBeMember<StyleRuleKeyframes> m_keyframesRule;
111 mutable WillBeHeapVector<RefPtrWillBeMember<CSSKeyframeRule> > m_childRuleCS SOMWrappers; 112 mutable WillBeHeapVector<RefPtrWillBeMember<CSSKeyframeRule> > m_childRuleCS SOMWrappers;
112 mutable OwnPtrWillBeMember<CSSRuleList> m_ruleListCSSOMWrapper; 113 mutable OwnPtrWillBeMember<CSSRuleList> m_ruleListCSSOMWrapper;
113 bool m_isPrefixed; 114 bool m_isPrefixed;
114 }; 115 };
115 116
116 DEFINE_CSS_RULE_TYPE_CASTS(CSSKeyframesRule, KEYFRAMES_RULE); 117 DEFINE_CSS_RULE_TYPE_CASTS(CSSKeyframesRule, KEYFRAMES_RULE);
117 118
118 } // namespace blink 119 } // namespace blink
119 120
120 #endif // CSSKeyframesRule_h 121 #endif // CSSKeyframesRule_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSKeyframeRule.h ('k') | Source/core/css/CSSMediaRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698