| OLD | NEW |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 return result; | 88 return result; |
| 89 } | 89 } |
| 90 | 90 |
| 91 double takeTimeToNextIteration() | 91 double takeTimeToNextIteration() |
| 92 { | 92 { |
| 93 const double result = m_timeToNextIteration; | 93 const double result = m_timeToNextIteration; |
| 94 m_timeToNextIteration = nullValue(); | 94 m_timeToNextIteration = nullValue(); |
| 95 return result; | 95 return result; |
| 96 } | 96 } |
| 97 | 97 |
| 98 virtual void trace(Visitor* visitor) override | |
| 99 { | |
| 100 visitor->trace(m_eventDelegate); | |
| 101 AnimationNode::trace(visitor); | |
| 102 } | |
| 103 | |
| 104 private: | 98 private: |
| 105 TestAnimationNode(const Timing& specified, TestAnimationNodeEventDelegate* e
ventDelegate) | 99 TestAnimationNode(const Timing& specified, TestAnimationNodeEventDelegate* e
ventDelegate) |
| 106 : AnimationNode(specified, adoptPtr(eventDelegate)) | 100 : AnimationNode(specified, adoptPtr(eventDelegate)) |
| 107 , m_eventDelegate(eventDelegate) | 101 , m_eventDelegate(eventDelegate) |
| 108 { | 102 { |
| 109 } | 103 } |
| 110 | 104 |
| 111 RawPtr<TestAnimationNodeEventDelegate> m_eventDelegate; | 105 RawPtr<TestAnimationNodeEventDelegate> m_eventDelegate; |
| 112 mutable double m_localTime; | 106 mutable double m_localTime; |
| 113 mutable double m_timeToNextIteration; | 107 mutable double m_timeToNextIteration; |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 EXPECT_TRUE(std::isinf(animationNode->takeTimeToNextIteration())); | 766 EXPECT_TRUE(std::isinf(animationNode->takeTimeToNextIteration())); |
| 773 | 767 |
| 774 // Item has finished. | 768 // Item has finished. |
| 775 animationNode->updateInheritedTime(3.5); | 769 animationNode->updateInheritedTime(3.5); |
| 776 EXPECT_EQ(AnimationNode::PhaseAfter, animationNode->phase()); | 770 EXPECT_EQ(AnimationNode::PhaseAfter, animationNode->phase()); |
| 777 EXPECT_EQ(3.5, animationNode->takeLocalTime()); | 771 EXPECT_EQ(3.5, animationNode->takeLocalTime()); |
| 778 EXPECT_TRUE(std::isinf(animationNode->takeTimeToNextIteration())); | 772 EXPECT_TRUE(std::isinf(animationNode->takeTimeToNextIteration())); |
| 779 } | 773 } |
| 780 | 774 |
| 781 } | 775 } |
| OLD | NEW |