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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if ((affectsOpacity && attachedAnimation->affects(targetElement, CSSProp
ertyOpacity)) | 131 if ((affectsOpacity && attachedAnimation->affects(targetElement, CSSProp
ertyOpacity)) |
132 || (affectsTransform && isTransformRelatedAnimation(targetElement, a
ttachedAnimation)) | 132 || (affectsTransform && isTransformRelatedAnimation(targetElement, a
ttachedAnimation)) |
133 || (affectsFilter && attachedAnimation->affects(targetElement, CSSPr
opertyWebkitFilter)) | 133 || (affectsFilter && attachedAnimation->affects(targetElement, CSSPr
opertyWebkitFilter)) |
134 || (affectsBackdropFilter && attachedAnimation->affects(targetElemen
t, CSSPropertyBackdropFilter))) | 134 || (affectsBackdropFilter && attachedAnimation->affects(targetElemen
t, CSSPropertyBackdropFilter))) |
135 return true; | 135 return true; |
136 } | 136 } |
137 | 137 |
138 return false; | 138 return false; |
139 } | 139 } |
140 | 140 |
141 } | 141 } // namespace |
142 | 142 |
143 CompositorAnimations::CompositorAnimations() | 143 CompositorAnimations::CompositorAnimations() |
144 { | 144 { |
145 } | 145 } |
146 | 146 |
147 CompositorAnimations* CompositorAnimations::instance(CompositorAnimations* newIn
stance) | 147 CompositorAnimations* CompositorAnimations::instance(CompositorAnimations* newIn
stance) |
148 { | 148 { |
149 static CompositorAnimations* instance = new CompositorAnimations(); | 149 static CompositorAnimations* instance = new CompositorAnimations(); |
150 if (newInstance) { | 150 if (newInstance) { |
151 instance = newInstance; | 151 instance = newInstance; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 610 |
611 curve.setStepsTimingFunction(steps, stepsStartOffset); | 611 curve.setStepsTimingFunction(steps, stepsStartOffset); |
612 break; | 612 break; |
613 } | 613 } |
614 | 614 |
615 default: | 615 default: |
616 ASSERT_NOT_REACHED(); | 616 ASSERT_NOT_REACHED(); |
617 } | 617 } |
618 } | 618 } |
619 | 619 |
620 } // namespace anoymous | 620 } // namespace |
621 | 621 |
622 void CompositorAnimationsImpl::addKeyframesToCurve(WebCompositorAnimationCurve&
curve, const PropertySpecificKeyframeVector& keyframes, const Timing& timing) | 622 void CompositorAnimationsImpl::addKeyframesToCurve(WebCompositorAnimationCurve&
curve, const PropertySpecificKeyframeVector& keyframes, const Timing& timing) |
623 { | 623 { |
624 auto* lastKeyframe = keyframes.last().get(); | 624 auto* lastKeyframe = keyframes.last().get(); |
625 for (const auto& keyframe : keyframes) { | 625 for (const auto& keyframe : keyframes) { |
626 const TimingFunction* keyframeTimingFunction = 0; | 626 const TimingFunction* keyframeTimingFunction = 0; |
627 if (keyframe != lastKeyframe) { // Ignore timing function of last frame. | 627 if (keyframe != lastKeyframe) { // Ignore timing function of last frame. |
628 keyframeTimingFunction = &keyframe->easing(); | 628 keyframeTimingFunction = &keyframe->easing(); |
629 } | 629 } |
630 | 630 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 break; | 757 break; |
758 default: | 758 default: |
759 ASSERT_NOT_REACHED(); | 759 ASSERT_NOT_REACHED(); |
760 } | 760 } |
761 animations.append(animation.release()); | 761 animations.append(animation.release()); |
762 } | 762 } |
763 ASSERT(!animations.isEmpty()); | 763 ASSERT(!animations.isEmpty()); |
764 } | 764 } |
765 | 765 |
766 } // namespace blink | 766 } // namespace blink |
OLD | NEW |