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

Side by Side Diff: Source/core/animation/TimedItemTest.cpp

Issue 28263002: Plumb timeToNextEffect through players and animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved location of timeToEffectChange calculation Created 7 years, 2 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 void updateInheritedTime(double time) 72 void updateInheritedTime(double time)
73 { 73 {
74 m_eventDelegate->reset(); 74 m_eventDelegate->reset();
75 TimedItem::updateInheritedTime(time); 75 TimedItem::updateInheritedTime(time);
76 } 76 }
77 77
78 void updateChildrenAndEffects(bool wasActiveOrInEffect) const FINAL OVERRIDE { } 78 void updateChildrenAndEffects(bool wasActiveOrInEffect) const FINAL OVERRIDE { }
79 void willDetach() { } 79 void willDetach() { }
80 TestTimedItemEventDelegate* eventDelegate() { return m_eventDelegate; } 80 TestTimedItemEventDelegate* eventDelegate() { return m_eventDelegate; }
81 double calculateTimeToEffectChange(double inheritedTime, double activeTime, Phase) const FINAL OVERRIDE { return -1; }
81 82
82 private: 83 private:
83 TestTimedItem(const Timing& specified, TestTimedItemEventDelegate* eventDele gate) 84 TestTimedItem(const Timing& specified, TestTimedItemEventDelegate* eventDele gate)
84 : TimedItem(specified, adoptPtr(eventDelegate)) 85 : TimedItem(specified, adoptPtr(eventDelegate))
85 , m_eventDelegate(eventDelegate) 86 , m_eventDelegate(eventDelegate)
86 { 87 {
87 } 88 }
88 89
89 TestTimedItemEventDelegate* m_eventDelegate; 90 TestTimedItemEventDelegate* m_eventDelegate;
90 }; 91 };
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 // After end 568 // After end
568 timedItem->updateInheritedTime(3.5); 569 timedItem->updateInheritedTime(3.5);
569 ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered()); 570 ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered());
570 EXPECT_TRUE(timedItem->eventDelegate()->phaseChanged()); 571 EXPECT_TRUE(timedItem->eventDelegate()->phaseChanged());
571 EXPECT_FALSE(timedItem->eventDelegate()->iterationChanged()); 572 EXPECT_FALSE(timedItem->eventDelegate()->iterationChanged());
572 573
573 timedItem->updateInheritedTime(3.6); 574 timedItem->updateInheritedTime(3.6);
574 ASSERT_FALSE(timedItem->eventDelegate()->eventTriggered()); 575 ASSERT_FALSE(timedItem->eventDelegate()->eventTriggered());
575 } 576 }
576 } 577 }
OLDNEW
« Source/core/animation/DocumentTimeline.cpp ('K') | « Source/core/animation/TimedItem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698