| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef SKY_ENGINE_CORE_CSS_STYLERULEKEYFRAMES_H_ | 26 #ifndef SKY_ENGINE_CORE_CSS_STYLERULEKEYFRAMES_H_ |
| 27 #define SKY_ENGINE_CORE_CSS_STYLERULEKEYFRAMES_H_ | 27 #define SKY_ENGINE_CORE_CSS_STYLERULEKEYFRAMES_H_ |
| 28 | 28 |
| 29 #include "sky/engine/core/css/StyleRule.h" | 29 #include "sky/engine/core/css/StyleRule.h" |
| 30 #include "sky/engine/wtf/Forward.h" | 30 #include "sky/engine/wtf/Forward.h" |
| 31 #include "sky/engine/wtf/Noncopyable.h" |
| 31 #include "sky/engine/wtf/text/AtomicString.h" | 32 #include "sky/engine/wtf/text/AtomicString.h" |
| 32 | 33 |
| 33 namespace blink { | 34 namespace blink { |
| 34 | 35 |
| 35 class StyleKeyframe; | 36 class StyleKeyframe; |
| 36 | 37 |
| 37 class StyleRuleKeyframes final : public StyleRuleBase { | 38 class StyleRuleKeyframes final : public StyleRuleBase { |
| 39 WTF_MAKE_NONCOPYABLE(StyleRuleKeyframes); |
| 38 public: | 40 public: |
| 39 static PassRefPtr<StyleRuleKeyframes> create() { return adoptRef(new StyleRu
leKeyframes()); } | 41 static PassRefPtr<StyleRuleKeyframes> create() { return adoptRef(new StyleRu
leKeyframes()); } |
| 40 | 42 |
| 41 ~StyleRuleKeyframes(); | 43 ~StyleRuleKeyframes(); |
| 42 | 44 |
| 43 const Vector<RefPtr<StyleKeyframe> >& keyframes() const { return m_keyframes
; } | 45 const Vector<RefPtr<StyleKeyframe> >& keyframes() const { return m_keyframes
; } |
| 44 | 46 |
| 45 void parserAppendKeyframe(PassRefPtr<StyleKeyframe>); | 47 void parserAppendKeyframe(PassRefPtr<StyleKeyframe>); |
| 46 void wrapperAppendKeyframe(PassRefPtr<StyleKeyframe>); | |
| 47 void wrapperRemoveKeyframe(unsigned); | |
| 48 | 48 |
| 49 String name() const { return m_name; } | 49 String name() const { return m_name; } |
| 50 void setName(const String& name) { m_name = AtomicString(name); } | 50 void setName(const String& name) { m_name = AtomicString(name); } |
| 51 | 51 |
| 52 bool isVendorPrefixed() const { return m_isPrefixed; } | 52 bool isVendorPrefixed() const { return m_isPrefixed; } |
| 53 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; } | 53 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; } |
| 54 | 54 |
| 55 int findKeyframeIndex(const String& key) const; | |
| 56 | |
| 57 PassRefPtr<StyleRuleKeyframes> copy() const { return adoptRef(new StyleRuleK
eyframes(*this)); } | |
| 58 | |
| 59 private: | 55 private: |
| 60 StyleRuleKeyframes(); | 56 StyleRuleKeyframes(); |
| 61 explicit StyleRuleKeyframes(const StyleRuleKeyframes&); | |
| 62 | 57 |
| 63 Vector<RefPtr<StyleKeyframe> > m_keyframes; | 58 Vector<RefPtr<StyleKeyframe> > m_keyframes; |
| 64 AtomicString m_name; | 59 AtomicString m_name; |
| 65 bool m_isPrefixed; | 60 bool m_isPrefixed; |
| 66 }; | 61 }; |
| 67 | 62 |
| 68 DEFINE_STYLE_RULE_TYPE_CASTS(Keyframes); | 63 DEFINE_STYLE_RULE_TYPE_CASTS(Keyframes); |
| 69 | 64 |
| 70 } // namespace blink | 65 } // namespace blink |
| 71 | 66 |
| 72 #endif // SKY_ENGINE_CORE_CSS_STYLERULEKEYFRAMES_H_ | 67 #endif // SKY_ENGINE_CORE_CSS_STYLERULEKEYFRAMES_H_ |
| OLD | NEW |