| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 246 |
| 247 PropertyHandleSet properties = keyframeEffect.properties(); | 247 PropertyHandleSet properties = keyframeEffect.properties(); |
| 248 if (properties.isEmpty()) | 248 if (properties.isEmpty()) |
| 249 return false; | 249 return false; |
| 250 | 250 |
| 251 unsigned transformPropertyCount = 0; | 251 unsigned transformPropertyCount = 0; |
| 252 for (const auto& property : properties) { | 252 for (const auto& property : properties) { |
| 253 if (!property.isCSSProperty()) | 253 if (!property.isCSSProperty()) |
| 254 return false; | 254 return false; |
| 255 | 255 |
| 256 if (isTransformRelatedCSSProperty(property)) | 256 if (isTransformRelatedCSSProperty(property)) { |
| 257 if (targetElement.layoutObject() && targetElement.layoutObject()->is
Inline()) { |
| 258 return false; |
| 259 } |
| 257 transformPropertyCount++; | 260 transformPropertyCount++; |
| 261 } |
| 258 | 262 |
| 259 const PropertySpecificKeyframeVector& keyframes = keyframeEffect.getProp
ertySpecificKeyframes(property); | 263 const PropertySpecificKeyframeVector& keyframes = keyframeEffect.getProp
ertySpecificKeyframes(property); |
| 260 ASSERT(keyframes.size() >= 2); | 264 ASSERT(keyframes.size() >= 2); |
| 261 for (const auto& keyframe : keyframes) { | 265 for (const auto& keyframe : keyframes) { |
| 262 // FIXME: Determine candidacy based on the CSSValue instead of a sna
pshot AnimatableValue. | 266 // FIXME: Determine candidacy based on the CSSValue instead of a sna
pshot AnimatableValue. |
| 263 bool isNeutralKeyframe = keyframe->isCSSPropertySpecificKeyframe() &
& !toCSSPropertySpecificKeyframe(keyframe.get())->value() && keyframe->composite
() == EffectModel::CompositeAdd; | 267 bool isNeutralKeyframe = keyframe->isCSSPropertySpecificKeyframe() &
& !toCSSPropertySpecificKeyframe(keyframe.get())->value() && keyframe->composite
() == EffectModel::CompositeAdd; |
| 264 if ((keyframe->composite() != EffectModel::CompositeReplace && !isNe
utralKeyframe) || !keyframe->getAnimatableValue()) | 268 if ((keyframe->composite() != EffectModel::CompositeReplace && !isNe
utralKeyframe) || !keyframe->getAnimatableValue()) |
| 265 return false; | 269 return false; |
| 266 | 270 |
| 267 switch (property.cssProperty()) { | 271 switch (property.cssProperty()) { |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 break; | 758 break; |
| 755 default: | 759 default: |
| 756 ASSERT_NOT_REACHED(); | 760 ASSERT_NOT_REACHED(); |
| 757 } | 761 } |
| 758 animations.append(animation.release()); | 762 animations.append(animation.release()); |
| 759 } | 763 } |
| 760 ASSERT(!animations.isEmpty()); | 764 ASSERT(!animations.isEmpty()); |
| 761 } | 765 } |
| 762 | 766 |
| 763 } // namespace blink | 767 } // namespace blink |
| OLD | NEW |