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

Side by Side Diff: Source/core/animation/css/CSSAnimations.h

Issue 22799020: Web Animations CSS: Support Animation of StyleImage and LengthBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Support animation of clip:' Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 m_styles = MutableStylePropertySet::create(); 65 m_styles = MutableStylePropertySet::create();
66 m_styles->mergeAndOverrideOnConflict(styles); 66 m_styles->mergeAndOverrideOnConflict(styles);
67 } 67 }
68 private: 68 private:
69 HashSet<const Player*> m_filtered; 69 HashSet<const Player*> m_filtered;
70 RefPtr<MutableStylePropertySet> m_styles; 70 RefPtr<MutableStylePropertySet> m_styles;
71 }; 71 };
72 72
73 class CSSAnimations FINAL { 73 class CSSAnimations FINAL {
74 public: 74 public:
75 static bool isAnimatableProperty(CSSPropertyID);
75 static bool needsUpdate(const Element*, const RenderStyle*); 76 static bool needsUpdate(const Element*, const RenderStyle*);
76 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(const Element*, EDispl ay, const CSSAnimations*, const CSSAnimationDataList*, StyleResolver*); 77 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(const Element*, EDispl ay, const CSSAnimations*, const CSSAnimationDataList*, StyleResolver*);
77 void update(Element*, const RenderStyle*); 78 void update(Element*, const RenderStyle*);
78 bool isEmpty() const { return m_animations.isEmpty(); } 79 bool isEmpty() const { return m_animations.isEmpty(); }
79 void cancel(); 80 void cancel();
80 private: 81 private:
81 typedef HashMap<StringImpl*, RefPtr<Player> > AnimationMap; 82 typedef HashMap<StringImpl*, RefPtr<Player> > AnimationMap;
82 AnimationMap m_animations; 83 AnimationMap m_animations;
83 class EventDelegate FINAL : public TimedItemEventDelegate { 84 class EventDelegate FINAL : public TimedItemEventDelegate {
84 public: 85 public:
85 EventDelegate(Element* target, const AtomicString& name) 86 EventDelegate(Element* target, const AtomicString& name)
86 : m_target(target) 87 : m_target(target)
87 , m_name(name) 88 , m_name(name)
88 { 89 {
89 } 90 }
90 virtual void onEventCondition(bool wasInPlay, bool isInPlay, double prev iousIteration, double currentIteration) OVERRIDE; 91 virtual void onEventCondition(bool wasInPlay, bool isInPlay, double prev iousIteration, double currentIteration) OVERRIDE;
91 private: 92 private:
92 void maybeDispatch(Document::ListenerType, AtomicString& eventName, doub le elapsedTime); 93 void maybeDispatch(Document::ListenerType, AtomicString& eventName, doub le elapsedTime);
93 Element* m_target; 94 Element* m_target;
94 const AtomicString m_name; 95 const AtomicString m_name;
95 }; 96 };
96 }; 97 };
97 98
98 } // namespace WebCore 99 } // namespace WebCore
99 100
100 #endif 101 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698