Chromium Code Reviews| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 RefPtr<TimingFunction> timingFunction; | 94 RefPtr<TimingFunction> timingFunction; |
| 95 if (value->isInheritedValue() && parentStyle->animations()) { | 95 if (value->isInheritedValue() && parentStyle->animations()) { |
| 96 timingFunction = parentStyle->animations()->timingFunctionLi st()[0]; | 96 timingFunction = parentStyle->animations()->timingFunctionLi st()[0]; |
| 97 } else if (value->isValueList()) { | 97 } else if (value->isValueList()) { |
| 98 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(* toCSSValueList(value)->item(0)); | 98 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(* toCSSValueList(value)->item(0)); |
| 99 } else { | 99 } else { |
| 100 ASSERT(value->isCSSWideKeyword()); | 100 ASSERT(value->isCSSWideKeyword()); |
| 101 timingFunction = CSSTimingData::initialTimingFunction(); | 101 timingFunction = CSSTimingData::initialTimingFunction(); |
| 102 } | 102 } |
| 103 keyframe->setEasing(timingFunction.release()); | 103 keyframe->setEasing(timingFunction.release()); |
| 104 } else if (property == CSSPropertyFilter) { | |
| 105 // TODO(alancutter): We will not support animating filter until -webkit-filter is an alias for it. | |
| 106 // This is to prevent animations on both -webkit-filter and filt er from being run on the main thread when | |
| 107 // they would otherwise run on the compositor. | |
| 108 continue; | |
|
alancutter (OOO until 2018)
2016/05/23 00:55:10
Glad to see this quirk in the animation engine go
Noel Gordon
2016/05/23 02:12:07
Ack. New patch uploaded.
| |
| 109 } else if (CSSAnimations::isAnimatableProperty(property)) { | 104 } else if (CSSAnimations::isAnimatableProperty(property)) { |
| 110 keyframe->setCSSPropertyValue(property, properties.propertyAt(j) .value()); | 105 keyframe->setCSSPropertyValue(property, properties.propertyAt(j) .value()); |
| 111 } | 106 } |
| 112 } | 107 } |
| 113 keyframes.append(keyframe); | 108 keyframes.append(keyframe); |
| 114 // The last keyframe specified at a given offset is used. | 109 // The last keyframe specified at a given offset is used. |
| 115 for (size_t j = 1; j < offsets.size(); ++j) { | 110 for (size_t j = 1; j < offsets.size(); ++j) { |
| 116 keyframes.append(toStringKeyframe(keyframe->cloneWithOffset(offsets[ j]).get())); | 111 keyframes.append(toStringKeyframe(keyframe->cloneWithOffset(offsets[ j]).get())); |
| 117 } | 112 } |
| 118 } | 113 } |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 868 } | 863 } |
| 869 | 864 |
| 870 DEFINE_TRACE(CSSAnimations) | 865 DEFINE_TRACE(CSSAnimations) |
| 871 { | 866 { |
| 872 visitor->trace(m_transitions); | 867 visitor->trace(m_transitions); |
| 873 visitor->trace(m_pendingUpdate); | 868 visitor->trace(m_pendingUpdate); |
| 874 visitor->trace(m_runningAnimations); | 869 visitor->trace(m_runningAnimations); |
| 875 } | 870 } |
| 876 | 871 |
| 877 } // namespace blink | 872 } // namespace blink |
| OLD | NEW |