| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 // No smooth interpolation exists between these values so don't start a | 670 // No smooth interpolation exists between these values so don't start a |
| 671 // transition. | 671 // transition. |
| 672 if (!transitionType) { | 672 if (!transitionType) { |
| 673 return; | 673 return; |
| 674 } | 674 } |
| 675 | 675 |
| 676 // If we have multiple transitions on the same property, we will use the | 676 // If we have multiple transitions on the same property, we will use the |
| 677 // last one since we iterate over them in order. | 677 // last one since we iterate over them in order. |
| 678 | 678 |
| 679 Timing timing = transitionData.convertToTiming(transitionIndex); | 679 Timing timing = transitionData.convertToTiming(transitionIndex); |
| 680 if (timing.startDelay + timing.iterationDuration <= 0) | 680 if (timing.startDelay + timing.iterationDuration <= 0) { |
| 681 // We may have started a transition in a prior CSSTransitionData update, |
| 682 // this CSSTransitionData update needs to override them. |
| 683 // TODO(alancutter): Just iterate over the CSSTransitionDatas in reverse and |
| 684 // skip any properties that have already been visited so we don't need to |
| 685 // "undo" work like this. |
| 686 update.unstartTransition(id); |
| 681 return; | 687 return; |
| 688 } |
| 682 | 689 |
| 683 AnimatableValue* reversingAdjustedStartValue = from.get(); | 690 AnimatableValue* reversingAdjustedStartValue = from.get(); |
| 684 double reversingShorteningFactor = 1; | 691 double reversingShorteningFactor = 1; |
| 685 if (interruptedTransition) { | 692 if (interruptedTransition) { |
| 686 const double interruptedProgress = | 693 const double interruptedProgress = |
| 687 interruptedTransition->animation->effect()->progress(); | 694 interruptedTransition->animation->effect()->progress(); |
| 688 if (!std::isnan(interruptedProgress)) { | 695 if (!std::isnan(interruptedProgress)) { |
| 689 reversingAdjustedStartValue = interruptedTransition->to.get(); | 696 reversingAdjustedStartValue = interruptedTransition->to.get(); |
| 690 reversingShorteningFactor = | 697 reversingShorteningFactor = |
| 691 clampTo((interruptedProgress * | 698 clampTo((interruptedProgress * |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 isCustomPropertyHandle); | 1118 isCustomPropertyHandle); |
| 1112 } | 1119 } |
| 1113 | 1120 |
| 1114 DEFINE_TRACE(CSSAnimations) { | 1121 DEFINE_TRACE(CSSAnimations) { |
| 1115 visitor->trace(m_transitions); | 1122 visitor->trace(m_transitions); |
| 1116 visitor->trace(m_pendingUpdate); | 1123 visitor->trace(m_pendingUpdate); |
| 1117 visitor->trace(m_runningAnimations); | 1124 visitor->trace(m_runningAnimations); |
| 1118 } | 1125 } |
| 1119 | 1126 |
| 1120 } // namespace blink | 1127 } // namespace blink |
| OLD | NEW |