| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 const CSSAnimations* cssAnimations = | 299 const CSSAnimations* cssAnimations = |
| 300 elementAnimations ? &elementAnimations->cssAnimations() : nullptr; | 300 elementAnimations ? &elementAnimations->cssAnimations() : nullptr; |
| 301 const Element* elementForScoping = | 301 const Element* elementForScoping = |
| 302 animatingElement ? animatingElement : &element; | 302 animatingElement ? animatingElement : &element; |
| 303 | 303 |
| 304 Vector<bool> cancelRunningAnimationFlags( | 304 Vector<bool> cancelRunningAnimationFlags( |
| 305 cssAnimations ? cssAnimations->m_runningAnimations.size() : 0); | 305 cssAnimations ? cssAnimations->m_runningAnimations.size() : 0); |
| 306 for (bool& flag : cancelRunningAnimationFlags) | 306 for (bool& flag : cancelRunningAnimationFlags) |
| 307 flag = true; | 307 flag = true; |
| 308 | 308 |
| 309 if (animationData && style.display() != EDisplay::None) { | 309 if (animationData && style.display() != EDisplay::kNone) { |
| 310 const Vector<AtomicString>& nameList = animationData->nameList(); | 310 const Vector<AtomicString>& nameList = animationData->nameList(); |
| 311 for (size_t i = 0; i < nameList.size(); ++i) { | 311 for (size_t i = 0; i < nameList.size(); ++i) { |
| 312 AtomicString name = nameList[i]; | 312 AtomicString name = nameList[i]; |
| 313 if (name == CSSAnimationData::initialName()) | 313 if (name == CSSAnimationData::initialName()) |
| 314 continue; | 314 continue; |
| 315 | 315 |
| 316 // Find n where this is the nth occurence of this animation name. | 316 // Find n where this is the nth occurence of this animation name. |
| 317 size_t nameIndex = 0; | 317 size_t nameIndex = 0; |
| 318 for (size_t j = 0; j < i; j++) { | 318 for (size_t j = 0; j < i; j++) { |
| 319 if (nameList[j] == name) | 319 if (nameList[j] == name) |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 elementAnimations ? &elementAnimations->cssAnimations().m_transitions | 852 elementAnimations ? &elementAnimations->cssAnimations().m_transitions |
| 853 : nullptr; | 853 : nullptr; |
| 854 const CSSTransitionData* transitionData = style.transitions(); | 854 const CSSTransitionData* transitionData = style.transitions(); |
| 855 | 855 |
| 856 const bool animationStyleRecalc = | 856 const bool animationStyleRecalc = |
| 857 elementAnimations && elementAnimations->isAnimationStyleChange(); | 857 elementAnimations && elementAnimations->isAnimationStyleChange(); |
| 858 | 858 |
| 859 HashSet<PropertyHandle> listedProperties; | 859 HashSet<PropertyHandle> listedProperties; |
| 860 bool anyTransitionHadTransitionAll = false; | 860 bool anyTransitionHadTransitionAll = false; |
| 861 const LayoutObject* layoutObject = animatingElement->layoutObject(); | 861 const LayoutObject* layoutObject = animatingElement->layoutObject(); |
| 862 if (!animationStyleRecalc && style.display() != EDisplay::None && | 862 if (!animationStyleRecalc && style.display() != EDisplay::kNone && |
| 863 layoutObject && layoutObject->style() && transitionData) { | 863 layoutObject && layoutObject->style() && transitionData) { |
| 864 TransitionUpdateState state = { | 864 TransitionUpdateState state = { |
| 865 update, animatingElement, *layoutObject->style(), | 865 update, animatingElement, *layoutObject->style(), |
| 866 style, activeTransitions, listedProperties, | 866 style, activeTransitions, listedProperties, |
| 867 *transitionData}; | 867 *transitionData}; |
| 868 | 868 |
| 869 for (size_t transitionIndex = 0; | 869 for (size_t transitionIndex = 0; |
| 870 transitionIndex < transitionData->propertyList().size(); | 870 transitionIndex < transitionData->propertyList().size(); |
| 871 ++transitionIndex) { | 871 ++transitionIndex) { |
| 872 const CSSTransitionData::TransitionProperty& transitionProperty = | 872 const CSSTransitionData::TransitionProperty& transitionProperty = |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 isCustomPropertyHandle); | 1212 isCustomPropertyHandle); |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 DEFINE_TRACE(CSSAnimations) { | 1215 DEFINE_TRACE(CSSAnimations) { |
| 1216 visitor->trace(m_transitions); | 1216 visitor->trace(m_transitions); |
| 1217 visitor->trace(m_pendingUpdate); | 1217 visitor->trace(m_pendingUpdate); |
| 1218 visitor->trace(m_runningAnimations); | 1218 visitor->trace(m_runningAnimations); |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 } // namespace blink | 1221 } // namespace blink |
| OLD | NEW |