| 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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 for (const auto& entry : m_transitions) { | 837 for (const auto& entry : m_transitions) { |
| 838 entry.value.animation->cancel(); | 838 entry.value.animation->cancel(); |
| 839 entry.value.animation->update(TimingUpdateOnDemand); | 839 entry.value.animation->update(TimingUpdateOnDemand); |
| 840 } | 840 } |
| 841 | 841 |
| 842 m_runningAnimations.clear(); | 842 m_runningAnimations.clear(); |
| 843 m_transitions.clear(); | 843 m_transitions.clear(); |
| 844 clearPendingUpdate(); | 844 clearPendingUpdate(); |
| 845 } | 845 } |
| 846 | 846 |
| 847 // TODO(alancutter): CSS properties and presentation attributes may have |
| 848 // identical effects. By grouping them in the same set we introduce a bug where |
| 849 // arbitrary hash iteration will determine the order the apply in and thus which |
| 850 // one "wins". We should be more deliberate about the order of application in |
| 851 // the case of effect collisions. |
| 852 // Example: Both 'color' and 'svg-color' set the color on ComputedStyle but are |
| 853 // considered distinct properties in the ActiveInterpolationsMap. |
| 847 static bool isStylePropertyHandle(const PropertyHandle& propertyHandle) { | 854 static bool isStylePropertyHandle(const PropertyHandle& propertyHandle) { |
| 848 return propertyHandle.isCSSProperty() || | 855 return propertyHandle.isCSSProperty() || |
| 849 propertyHandle.isPresentationAttribute(); | 856 propertyHandle.isPresentationAttribute(); |
| 850 } | 857 } |
| 851 | 858 |
| 852 void CSSAnimations::calculateAnimationActiveInterpolations( | 859 void CSSAnimations::calculateAnimationActiveInterpolations( |
| 853 CSSAnimationUpdate& update, | 860 CSSAnimationUpdate& update, |
| 854 const Element* animatingElement) { | 861 const Element* animatingElement) { |
| 855 ElementAnimations* elementAnimations = | 862 ElementAnimations* elementAnimations = |
| 856 animatingElement ? animatingElement->elementAnimations() : nullptr; | 863 animatingElement ? animatingElement->elementAnimations() : nullptr; |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 return toShadowRoot(treeScope.rootNode()).host() == element; | 1094 return toShadowRoot(treeScope.rootNode()).host() == element; |
| 1088 } | 1095 } |
| 1089 | 1096 |
| 1090 DEFINE_TRACE(CSSAnimations) { | 1097 DEFINE_TRACE(CSSAnimations) { |
| 1091 visitor->trace(m_transitions); | 1098 visitor->trace(m_transitions); |
| 1092 visitor->trace(m_pendingUpdate); | 1099 visitor->trace(m_pendingUpdate); |
| 1093 visitor->trace(m_runningAnimations); | 1100 visitor->trace(m_runningAnimations); |
| 1094 } | 1101 } |
| 1095 | 1102 |
| 1096 } // namespace blink | 1103 } // namespace blink |
| OLD | NEW |