Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: Source/core/animation/CompositorAnimations.cpp

Issue 851693007: Prepare for responsive CSS animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Compositor restarts after style change Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 PropertySet properties = keyframeEffect.properties(); 140 PropertySet properties = keyframeEffect.properties();
141 141
142 if (properties.isEmpty()) 142 if (properties.isEmpty())
143 return false; 143 return false;
144 144
145 for (const auto& property : properties) { 145 for (const auto& property : properties) {
146 const PropertySpecificKeyframeVector& keyframes = keyframeEffect.getProp ertySpecificKeyframes(property); 146 const PropertySpecificKeyframeVector& keyframes = keyframeEffect.getProp ertySpecificKeyframes(property);
147 ASSERT(keyframes.size() >= 2); 147 ASSERT(keyframes.size() >= 2);
148 for (const auto& keyframe : keyframes) { 148 for (const auto& keyframe : keyframes) {
149 // FIXME: Determine candidacy based on the CSSValue instead of a sna pshot AnimatableValue. 149 // FIXME: Determine candidacy based on the CSSValue instead of a sna pshot AnimatableValue.
150 if (keyframe->composite() != AnimationEffect::CompositeReplace || !k eyframe->getAnimatableValue()) 150 bool isNeutralKeyframe = keyframe->isStringPropertySpecificKeyframe( ) && !toStringPropertySpecificKeyframe(keyframe.get())->value() && keyframe->com posite() == AnimationEffect::CompositeAdd;
151 if ((keyframe->composite() != AnimationEffect::CompositeReplace && ! isNeutralKeyframe) || !keyframe->getAnimatableValue() || !isCompositableProperty (property))
dstockwell 2015/01/27 02:22:58 I don't understand the isCompositableProperty test
shend 2015/01/28 02:44:50 Done.
151 return false; 152 return false;
152 153
153 switch (property) { 154 switch (property) {
154 case CSSPropertyOpacity: 155 case CSSPropertyOpacity:
155 break; 156 break;
156 case CSSPropertyTransform: 157 case CSSPropertyTransform:
157 if (toAnimatableTransform(keyframe->getAnimatableValue().get())- >transformOperations().dependsOnBoxSize()) 158 if (toAnimatableTransform(keyframe->getAnimatableValue().get())- >transformOperations().dependsOnBoxSize())
158 return false; 159 return false;
159 break; 160 break;
160 case CSSPropertyWebkitFilter: { 161 case CSSPropertyWebkitFilter: {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 break; 543 break;
543 default: 544 default:
544 ASSERT_NOT_REACHED(); 545 ASSERT_NOT_REACHED();
545 } 546 }
546 animations.append(animation.release()); 547 animations.append(animation.release());
547 } 548 }
548 ASSERT(!animations.isEmpty()); 549 ASSERT(!animations.isEmpty());
549 } 550 }
550 551
551 } // namespace blink 552 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698