| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 const Vector<RefPtr<StyleKeyframe> >& keyframes() const { return m_keyframes
; } | 46 const Vector<RefPtr<StyleKeyframe> >& keyframes() const { return m_keyframes
; } |
| 47 | 47 |
| 48 void parserAppendKeyframe(PassRefPtr<StyleKeyframe>); | 48 void parserAppendKeyframe(PassRefPtr<StyleKeyframe>); |
| 49 void wrapperAppendKeyframe(PassRefPtr<StyleKeyframe>); | 49 void wrapperAppendKeyframe(PassRefPtr<StyleKeyframe>); |
| 50 void wrapperRemoveKeyframe(unsigned); | 50 void wrapperRemoveKeyframe(unsigned); |
| 51 | 51 |
| 52 String name() const { return m_name; } | 52 String name() const { return m_name; } |
| 53 void setName(const String& name) { m_name = AtomicString(name); } | 53 void setName(const String& name) { m_name = AtomicString(name); } |
| 54 | 54 |
| 55 bool isVendorPrefixed() const { return m_isPrefixed; } |
| 56 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; } |
| 57 |
| 55 int findKeyframeIndex(const String& key) const; | 58 int findKeyframeIndex(const String& key) const; |
| 56 | 59 |
| 57 PassRefPtr<StyleRuleKeyframes> copy() const { return adoptRef(new StyleRuleK
eyframes(*this)); } | 60 PassRefPtr<StyleRuleKeyframes> copy() const { return adoptRef(new StyleRuleK
eyframes(*this)); } |
| 58 | 61 |
| 59 private: | 62 private: |
| 60 StyleRuleKeyframes(); | 63 StyleRuleKeyframes(); |
| 61 explicit StyleRuleKeyframes(const StyleRuleKeyframes&); | 64 explicit StyleRuleKeyframes(const StyleRuleKeyframes&); |
| 62 | 65 |
| 63 Vector<RefPtr<StyleKeyframe> > m_keyframes; | 66 Vector<RefPtr<StyleKeyframe> > m_keyframes; |
| 64 AtomicString m_name; | 67 AtomicString m_name; |
| 68 bool m_isPrefixed; |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 class CSSKeyframesRule : public CSSRule { | 71 class CSSKeyframesRule : public CSSRule { |
| 68 public: | 72 public: |
| 69 static PassRefPtr<CSSKeyframesRule> create(StyleRuleKeyframes* rule, CSSStyl
eSheet* sheet) { return adoptRef(new CSSKeyframesRule(rule, sheet)); } | 73 static PassRefPtr<CSSKeyframesRule> create(StyleRuleKeyframes* rule, CSSStyl
eSheet* sheet) { return adoptRef(new CSSKeyframesRule(rule, sheet)); } |
| 70 | 74 |
| 71 virtual ~CSSKeyframesRule(); | 75 virtual ~CSSKeyframesRule(); |
| 72 | 76 |
| 73 virtual CSSRule::Type type() const OVERRIDE { return WEBKIT_KEYFRAMES_RULE;
} | 77 virtual CSSRule::Type type() const OVERRIDE { return WEBKIT_KEYFRAMES_RULE;
} |
| 74 virtual String cssText() const OVERRIDE; | 78 virtual String cssText() const OVERRIDE; |
| 75 virtual void reattach(StyleRuleBase*) OVERRIDE; | 79 virtual void reattach(StyleRuleBase*) OVERRIDE; |
| 76 | 80 |
| 77 String name() const { return m_keyframesRule->name(); } | 81 String name() const { return m_keyframesRule->name(); } |
| 78 void setName(const String&); | 82 void setName(const String&); |
| 79 | 83 |
| 80 CSSRuleList* cssRules(); | 84 CSSRuleList* cssRules(); |
| 81 | 85 |
| 82 void insertRule(const String& rule); | 86 void insertRule(const String& rule); |
| 83 void deleteRule(const String& key); | 87 void deleteRule(const String& key); |
| 84 CSSKeyframeRule* findRule(const String& key); | 88 CSSKeyframeRule* findRule(const String& key); |
| 85 | 89 |
| 86 // For IndexedGetter and CSSRuleList. | 90 // For IndexedGetter and CSSRuleList. |
| 87 unsigned length() const; | 91 unsigned length() const; |
| 88 CSSKeyframeRule* item(unsigned index) const; | 92 CSSKeyframeRule* item(unsigned index) const; |
| 89 | 93 |
| 94 bool isVendorPrefixed() const { return m_isPrefixed; } |
| 95 void setVendorPrefixed(bool isPrefixed) { m_isPrefixed = isPrefixed; } |
| 96 |
| 90 private: | 97 private: |
| 91 CSSKeyframesRule(StyleRuleKeyframes*, CSSStyleSheet* parent); | 98 CSSKeyframesRule(StyleRuleKeyframes*, CSSStyleSheet* parent); |
| 92 | 99 |
| 93 RefPtr<StyleRuleKeyframes> m_keyframesRule; | 100 RefPtr<StyleRuleKeyframes> m_keyframesRule; |
| 94 mutable Vector<RefPtr<CSSKeyframeRule> > m_childRuleCSSOMWrappers; | 101 mutable Vector<RefPtr<CSSKeyframeRule> > m_childRuleCSSOMWrappers; |
| 95 mutable OwnPtr<CSSRuleList> m_ruleListCSSOMWrapper; | 102 mutable OwnPtr<CSSRuleList> m_ruleListCSSOMWrapper; |
| 103 bool m_isPrefixed; |
| 96 }; | 104 }; |
| 97 | 105 |
| 98 } // namespace WebCore | 106 } // namespace WebCore |
| 99 | 107 |
| 100 #endif // CSSKeyframesRule_h | 108 #endif // CSSKeyframesRule_h |
| OLD | NEW |