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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 #endif | 531 #endif |
532 | 532 |
533 BitArray<numCSSProperties> listedProperties; | 533 BitArray<numCSSProperties> listedProperties; |
534 bool anyTransitionHadTransitionAll = false; | 534 bool anyTransitionHadTransitionAll = false; |
535 const LayoutObject* layoutObject = animatingElement->layoutObject(); | 535 const LayoutObject* layoutObject = animatingElement->layoutObject(); |
536 if (!animationStyleRecalc && style.display() != NONE && layoutObject && layo
utObject->style() && transitionData) { | 536 if (!animationStyleRecalc && style.display() != NONE && layoutObject && layo
utObject->style() && transitionData) { |
537 const ComputedStyle& oldStyle = *layoutObject->style(); | 537 const ComputedStyle& oldStyle = *layoutObject->style(); |
538 | 538 |
539 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) { | 539 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) { |
540 const CSSTransitionData::TransitionProperty& transitionProperty = tr
ansitionData->propertyList()[i]; | 540 const CSSTransitionData::TransitionProperty& transitionProperty = tr
ansitionData->propertyList()[i]; |
541 CSSTransitionData::TransitionPropertyType mode = transitionProperty.
propertyType; | 541 if (transitionProperty.propertyType != CSSTransitionData::Transition
KnownProperty) |
542 CSSPropertyID property = resolveCSSPropertyID(transitionProperty.unr
esolvedProperty); | |
543 if (mode == CSSTransitionData::TransitionNone || mode == CSSTransiti
onData::TransitionUnknown) | |
544 continue; | 542 continue; |
545 | 543 |
546 bool animateAll = mode == CSSTransitionData::TransitionAll; | 544 CSSPropertyID property = resolveCSSPropertyID(transitionProperty.unr
esolvedProperty); |
547 ASSERT(animateAll || mode == CSSTransitionData::TransitionSingleProp
erty); | 545 bool animateAll = property == CSSPropertyAll; |
548 if (animateAll) | 546 if (animateAll) |
549 anyTransitionHadTransitionAll = true; | 547 anyTransitionHadTransitionAll = true; |
550 const StylePropertyShorthand& propertyList = animateAll ? CSSAnimati
ons::propertiesForTransitionAll() : shorthandForProperty(property); | 548 const StylePropertyShorthand& propertyList = animateAll ? CSSAnimati
ons::propertiesForTransitionAll() : shorthandForProperty(property); |
551 // If not a shorthand we only execute one iteration of this loop, an
d refer to the property directly. | 549 // If not a shorthand we only execute one iteration of this loop, an
d refer to the property directly. |
552 for (unsigned j = 0; !j || j < propertyList.length(); ++j) { | 550 for (unsigned j = 0; !j || j < propertyList.length(); ++j) { |
553 CSSPropertyID id = propertyList.length() ? propertyList.properti
es()[j] : property; | 551 CSSPropertyID id = propertyList.length() ? propertyList.properti
es()[j] : property; |
554 ASSERT(id >= firstCSSProperty); | 552 ASSERT(id >= firstCSSProperty); |
555 | 553 |
556 if (!animateAll) { | 554 if (!animateAll) { |
557 if (CSSPropertyMetadata::isInterpolableProperty(id)) | 555 if (CSSPropertyMetadata::isInterpolableProperty(id)) |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 { | 789 { |
792 #if ENABLE(OILPAN) | 790 #if ENABLE(OILPAN) |
793 visitor->trace(m_transitions); | 791 visitor->trace(m_transitions); |
794 visitor->trace(m_pendingUpdate); | 792 visitor->trace(m_pendingUpdate); |
795 visitor->trace(m_animations); | 793 visitor->trace(m_animations); |
796 visitor->trace(m_previousActiveInterpolationsForAnimations); | 794 visitor->trace(m_previousActiveInterpolationsForAnimations); |
797 #endif | 795 #endif |
798 } | 796 } |
799 | 797 |
800 } // namespace blink | 798 } // namespace blink |
OLD | NEW |