| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "core/css/CSSPropertyMetadata.h" | 45 #include "core/css/CSSPropertyMetadata.h" |
| 46 #include "core/css/resolver/CSSToStyleMap.h" | 46 #include "core/css/resolver/CSSToStyleMap.h" |
| 47 #include "core/css/resolver/StyleResolver.h" | 47 #include "core/css/resolver/StyleResolver.h" |
| 48 #include "core/dom/Element.h" | 48 #include "core/dom/Element.h" |
| 49 #include "core/dom/PseudoElement.h" | 49 #include "core/dom/PseudoElement.h" |
| 50 #include "core/dom/StyleEngine.h" | 50 #include "core/dom/StyleEngine.h" |
| 51 #include "core/events/TransitionEvent.h" | 51 #include "core/events/TransitionEvent.h" |
| 52 #include "core/events/WebKitAnimationEvent.h" | 52 #include "core/events/WebKitAnimationEvent.h" |
| 53 #include "core/frame/UseCounter.h" | 53 #include "core/frame/UseCounter.h" |
| 54 #include "core/layout/Layer.h" | 54 #include "core/layout/Layer.h" |
| 55 #include "core/rendering/RenderObject.h" | 55 #include "core/layout/LayoutObject.h" |
| 56 #include "core/rendering/style/KeyframeList.h" | 56 #include "core/rendering/style/KeyframeList.h" |
| 57 #include "platform/animation/TimingFunction.h" | 57 #include "platform/animation/TimingFunction.h" |
| 58 #include "public/platform/Platform.h" | 58 #include "public/platform/Platform.h" |
| 59 #include "wtf/BitArray.h" | 59 #include "wtf/BitArray.h" |
| 60 #include "wtf/HashSet.h" | 60 #include "wtf/HashSet.h" |
| 61 | 61 |
| 62 namespace blink { | 62 namespace blink { |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| 65 | 65 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 #if ENABLE(ASSERT) | 512 #if ENABLE(ASSERT) |
| 513 // In debug builds we verify that it would have been safe to avoid populatin
g and testing listedProperties if the style recalc is due to animation. | 513 // In debug builds we verify that it would have been safe to avoid populatin
g and testing listedProperties if the style recalc is due to animation. |
| 514 const bool animationStyleRecalc = false; | 514 const bool animationStyleRecalc = false; |
| 515 #else | 515 #else |
| 516 // In release builds we avoid the cost of checking for new and interrupted t
ransitions if the style recalc is due to animation. | 516 // In release builds we avoid the cost of checking for new and interrupted t
ransitions if the style recalc is due to animation. |
| 517 const bool animationStyleRecalc = activeAnimations && activeAnimations->isAn
imationStyleChange(); | 517 const bool animationStyleRecalc = activeAnimations && activeAnimations->isAn
imationStyleChange(); |
| 518 #endif | 518 #endif |
| 519 | 519 |
| 520 BitArray<numCSSProperties> listedProperties; | 520 BitArray<numCSSProperties> listedProperties; |
| 521 bool anyTransitionHadTransitionAll = false; | 521 bool anyTransitionHadTransitionAll = false; |
| 522 const RenderObject* renderer = animatingElement->renderer(); | 522 const LayoutObject* renderer = animatingElement->renderer(); |
| 523 if (!animationStyleRecalc && style.display() != NONE && renderer && renderer
->style() && transitionData) { | 523 if (!animationStyleRecalc && style.display() != NONE && renderer && renderer
->style() && transitionData) { |
| 524 const RenderStyle& oldStyle = *renderer->style(); | 524 const RenderStyle& oldStyle = *renderer->style(); |
| 525 | 525 |
| 526 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) { | 526 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) { |
| 527 const CSSTransitionData::TransitionProperty& transitionProperty = tr
ansitionData->propertyList()[i]; | 527 const CSSTransitionData::TransitionProperty& transitionProperty = tr
ansitionData->propertyList()[i]; |
| 528 CSSTransitionData::TransitionPropertyType mode = transitionProperty.
propertyType; | 528 CSSTransitionData::TransitionPropertyType mode = transitionProperty.
propertyType; |
| 529 CSSPropertyID property = transitionProperty.propertyId; | 529 CSSPropertyID property = transitionProperty.propertyId; |
| 530 if (mode == CSSTransitionData::TransitionNone || mode == CSSTransiti
onData::TransitionUnknown) | 530 if (mode == CSSTransitionData::TransitionNone || mode == CSSTransiti
onData::TransitionUnknown) |
| 531 continue; | 531 continue; |
| 532 | 532 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 visitor->trace(m_newTransitions); | 787 visitor->trace(m_newTransitions); |
| 788 visitor->trace(m_activeInterpolationsForAnimations); | 788 visitor->trace(m_activeInterpolationsForAnimations); |
| 789 visitor->trace(m_activeInterpolationsForTransitions); | 789 visitor->trace(m_activeInterpolationsForTransitions); |
| 790 visitor->trace(m_newAnimations); | 790 visitor->trace(m_newAnimations); |
| 791 visitor->trace(m_suppressedAnimationPlayers); | 791 visitor->trace(m_suppressedAnimationPlayers); |
| 792 visitor->trace(m_animationsWithUpdates); | 792 visitor->trace(m_animationsWithUpdates); |
| 793 #endif | 793 #endif |
| 794 } | 794 } |
| 795 | 795 |
| 796 } // namespace blink | 796 } // namespace blink |
| OLD | NEW |