| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 PropertySet properties = keyframeEffect.properties(); | 136 PropertySet properties = keyframeEffect.properties(); |
| 137 | 137 |
| 138 if (properties.isEmpty()) | 138 if (properties.isEmpty()) |
| 139 return false; | 139 return false; |
| 140 | 140 |
| 141 for (PropertySet::const_iterator it = properties.begin(); it != properties.e
nd(); ++it) { | 141 for (PropertySet::const_iterator it = properties.begin(); it != properties.e
nd(); ++it) { |
| 142 const PropertySpecificKeyframeVector& frames = keyframeEffect.getPropert
ySpecificKeyframes(*it); | 142 const PropertySpecificKeyframeVector& frames = keyframeEffect.getPropert
ySpecificKeyframes(*it); |
| 143 ASSERT(frames.size() >= 2); | 143 ASSERT(frames.size() >= 2); |
| 144 for (size_t i = 0; i < frames.size(); ++i) { | 144 for (size_t i = 0; i < frames.size(); ++i) { |
| 145 const Keyframe::PropertySpecificKeyframe *frame = frames[i].get(); | 145 const Keyframe::PropertySpecificKeyframe *frame = frames[i].get(); |
| 146 if (frame->composite() != AnimationEffect::CompositeReplace) | 146 // FIXME: Determine candidacy based on the CSSValue instead of a sna
pshot AnimatableValue. |
| 147 if (frame->composite() != AnimationEffect::CompositeReplace || !fram
e->getAnimatableValue()) |
| 147 return false; | 148 return false; |
| 148 | 149 |
| 149 switch (*it) { | 150 switch (*it) { |
| 150 case CSSPropertyOpacity: | 151 case CSSPropertyOpacity: |
| 151 break; | 152 break; |
| 152 case CSSPropertyTransform: | 153 case CSSPropertyTransform: |
| 153 if (toAnimatableTransform(frame->getAnimatableValue().get())->tr
ansformOperations().dependsOnBoxSize()) | 154 if (toAnimatableTransform(frame->getAnimatableValue().get())->tr
ansformOperations().dependsOnBoxSize()) |
| 154 return false; | 155 return false; |
| 155 break; | 156 break; |
| 156 case CSSPropertyWebkitFilter: { | 157 case CSSPropertyWebkitFilter: { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 animation->setIterations(compositorTiming.adjustedIterationCount); | 457 animation->setIterations(compositorTiming.adjustedIterationCount); |
| 457 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 458 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
| 458 animation->setAlternatesDirection(compositorTiming.alternate); | 459 animation->setAlternatesDirection(compositorTiming.alternate); |
| 459 | 460 |
| 460 animations.append(animation.release()); | 461 animations.append(animation.release()); |
| 461 } | 462 } |
| 462 ASSERT(!animations.isEmpty()); | 463 ASSERT(!animations.isEmpty()); |
| 463 } | 464 } |
| 464 | 465 |
| 465 } // namespace WebCore | 466 } // namespace WebCore |
| OLD | NEW |