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

Side by Side Diff: Source/core/animation/TimedItem.h

Issue 46043014: Web Animations CSS: Unfreeze AnimationClock if sampling timelines does not trigger style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reinstate assert Created 7 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 | 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 Player* player() { return m_player; } 85 Player* player() { return m_player; }
86 86
87 const Timing& specified() const { return m_specified; } 87 const Timing& specified() const { return m_specified; }
88 88
89 protected: 89 protected:
90 TimedItem(const Timing&, PassOwnPtr<EventDelegate> = nullptr); 90 TimedItem(const Timing&, PassOwnPtr<EventDelegate> = nullptr);
91 91
92 // When TimedItem receives a new inherited time via updateInheritedTime 92 // When TimedItem receives a new inherited time via updateInheritedTime
93 // it will (if necessary) recalculate timings and (if necessary) call 93 // it will (if necessary) recalculate timings and (if necessary) call
94 // updateChildrenAndEffects. 94 // updateChildrenAndEffects.
95 void updateInheritedTime(double inheritedTime) const; 95 // Returns whether style recalc was triggered.
96 bool updateInheritedTime(double inheritedTime) const;
96 97
97 private: 98 private:
98 virtual void updateChildrenAndEffects() const = 0; 99 // Returns whether style recalc was triggered.
100 virtual bool updateChildrenAndEffects() const = 0;
99 virtual double intrinsicIterationDuration() const { return 0; }; 101 virtual double intrinsicIterationDuration() const { return 0; };
100 virtual void willDetach() = 0; 102 virtual void willDetach() = 0;
101 virtual double calculateTimeToEffectChange(double inheritedTime, double acti veTime, Phase) const = 0; 103 virtual double calculateTimeToEffectChange(double inheritedTime, double acti veTime, Phase) const = 0;
102 104
103 void attach(Player* player) { m_player = player; }; 105 void attach(Player* player) { m_player = player; };
104 void detach() 106 void detach()
105 { 107 {
106 ASSERT(m_player); 108 ASSERT(m_player);
107 willDetach(); 109 willDetach();
108 m_player = 0; 110 m_player = 0;
(...skipping 19 matching lines...) Expand all
128 } m_calculated; 130 } m_calculated;
129 mutable bool m_isFirstSample; 131 mutable bool m_isFirstSample;
130 132
131 // FIXME: Should check the version and reinherit time if inconsistent. 133 // FIXME: Should check the version and reinherit time if inconsistent.
132 const CalculatedTiming& ensureCalculated() const { return m_calculated; } 134 const CalculatedTiming& ensureCalculated() const { return m_calculated; }
133 }; 135 };
134 136
135 } // namespace WebCore 137 } // namespace WebCore
136 138
137 #endif 139 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698