| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 private: | 68 private: |
| 69 StyleKeyframe(); | 69 StyleKeyframe(); |
| 70 | 70 |
| 71 RefPtrWillBeMember<StylePropertySet> m_properties; | 71 RefPtrWillBeMember<StylePropertySet> m_properties; |
| 72 // These are both calculated lazily. Either one can be set, which invalidate
s the other. | 72 // These are both calculated lazily. Either one can be set, which invalidate
s the other. |
| 73 mutable String m_keyText; | 73 mutable String m_keyText; |
| 74 mutable OwnPtr<Vector<double> > m_keys; | 74 mutable OwnPtr<Vector<double> > m_keys; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 class CSSKeyframeRule final : public CSSRule { | 77 class CSSKeyframeRule final : public CSSRule { |
| 78 DEFINE_WRAPPERTYPEINFO(); |
| 78 public: | 79 public: |
| 79 virtual ~CSSKeyframeRule(); | 80 virtual ~CSSKeyframeRule(); |
| 80 | 81 |
| 81 virtual CSSRule::Type type() const override { return KEYFRAME_RULE; } | 82 virtual CSSRule::Type type() const override { return KEYFRAME_RULE; } |
| 82 virtual String cssText() const override { return m_keyframe->cssText(); } | 83 virtual String cssText() const override { return m_keyframe->cssText(); } |
| 83 virtual void reattach(StyleRuleBase*) override; | 84 virtual void reattach(StyleRuleBase*) override; |
| 84 | 85 |
| 85 String keyText() const { return m_keyframe->keyText(); } | 86 String keyText() const { return m_keyframe->keyText(); } |
| 86 void setKeyText(const String& s) { m_keyframe->setKeyText(s); } | 87 void setKeyText(const String& s) { m_keyframe->setKeyText(s); } |
| 87 | 88 |
| 88 CSSStyleDeclaration* style() const; | 89 CSSStyleDeclaration* style() const; |
| 89 | 90 |
| 90 virtual void trace(Visitor*) override; | 91 virtual void trace(Visitor*) override; |
| 91 | 92 |
| 92 private: | 93 private: |
| 93 CSSKeyframeRule(StyleKeyframe*, CSSKeyframesRule* parent); | 94 CSSKeyframeRule(StyleKeyframe*, CSSKeyframesRule* parent); |
| 94 | 95 |
| 95 RefPtrWillBeMember<StyleKeyframe> m_keyframe; | 96 RefPtrWillBeMember<StyleKeyframe> m_keyframe; |
| 96 mutable RefPtrWillBeMember<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWr
apper; | 97 mutable RefPtrWillBeMember<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWr
apper; |
| 97 | 98 |
| 98 friend class CSSKeyframesRule; | 99 friend class CSSKeyframesRule; |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 DEFINE_CSS_RULE_TYPE_CASTS(CSSKeyframeRule, KEYFRAME_RULE); | 102 DEFINE_CSS_RULE_TYPE_CASTS(CSSKeyframeRule, KEYFRAME_RULE); |
| 102 | 103 |
| 103 } // namespace blink | 104 } // namespace blink |
| 104 | 105 |
| 105 #endif // CSSKeyframeRule_h | 106 #endif // CSSKeyframeRule_h |
| OLD | NEW |