| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "platform/transforms/TransformationMatrix.h" | 42 #include "platform/transforms/TransformationMatrix.h" |
| 43 #include "wtf/PtrUtil.h" | 43 #include "wtf/PtrUtil.h" |
| 44 #include "wtf/text/StringHash.h" | 44 #include "wtf/text/StringHash.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 PropertyHandleSet KeyframeEffectModelBase::properties() const { | 48 PropertyHandleSet KeyframeEffectModelBase::properties() const { |
| 49 PropertyHandleSet result; | 49 PropertyHandleSet result; |
| 50 for (const auto& keyframe : m_keyframes) { | 50 for (const auto& keyframe : m_keyframes) { |
| 51 for (const auto& property : keyframe->properties()) | 51 for (const auto& property : keyframe->properties()) |
| 52 result.add(property); | 52 result.insert(property); |
| 53 } | 53 } |
| 54 return result; | 54 return result; |
| 55 } | 55 } |
| 56 | 56 |
| 57 void KeyframeEffectModelBase::setFrames(KeyframeVector& keyframes) { | 57 void KeyframeEffectModelBase::setFrames(KeyframeVector& keyframes) { |
| 58 // TODO(samli): Should also notify/invalidate the animation | 58 // TODO(samli): Should also notify/invalidate the animation |
| 59 m_keyframes = keyframes; | 59 m_keyframes = keyframes; |
| 60 m_keyframeGroups = nullptr; | 60 m_keyframeGroups = nullptr; |
| 61 m_interpolationEffect.clear(); | 61 m_interpolationEffect.clear(); |
| 62 m_lastFraction = std::numeric_limits<double>::quiet_NaN(); | 62 m_lastFraction = std::numeric_limits<double>::quiet_NaN(); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 317 } |
| 318 if (m_keyframes.back()->offset() != 1.0) { | 318 if (m_keyframes.back()->offset() != 1.0) { |
| 319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); | 319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); |
| 320 addedSyntheticKeyframe = true; | 320 addedSyntheticKeyframe = true; |
| 321 } | 321 } |
| 322 | 322 |
| 323 return addedSyntheticKeyframe; | 323 return addedSyntheticKeyframe; |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace blink | 326 } // namespace blink |
| OLD | NEW |