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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 83 } |
84 | 84 |
85 bool KeyframeEffectModelBase::SnapshotNeutralCompositorKeyframes( | 85 bool KeyframeEffectModelBase::SnapshotNeutralCompositorKeyframes( |
86 Element& element, | 86 Element& element, |
87 const ComputedStyle& old_style, | 87 const ComputedStyle& old_style, |
88 const ComputedStyle& new_style, | 88 const ComputedStyle& new_style, |
89 const ComputedStyle* parent_style) const { | 89 const ComputedStyle* parent_style) const { |
90 bool updated = false; | 90 bool updated = false; |
91 EnsureKeyframeGroups(); | 91 EnsureKeyframeGroups(); |
92 for (CSSPropertyID property : CompositorAnimations::kCompositableProperties) { | 92 for (CSSPropertyID property : CompositorAnimations::kCompositableProperties) { |
93 if (CSSPropertyEquality::PropertiesEqual(property, old_style, new_style)) | 93 if (CSSPropertyEquality::PropertiesEqual(PropertyHandle(property), |
| 94 old_style, new_style)) |
94 continue; | 95 continue; |
95 PropertySpecificKeyframeGroup* keyframe_group = | 96 PropertySpecificKeyframeGroup* keyframe_group = |
96 keyframe_groups_->at(PropertyHandle(property)); | 97 keyframe_groups_->at(PropertyHandle(property)); |
97 if (!keyframe_group) | 98 if (!keyframe_group) |
98 continue; | 99 continue; |
99 for (auto& keyframe : keyframe_group->keyframes_) { | 100 for (auto& keyframe : keyframe_group->keyframes_) { |
100 if (keyframe->IsNeutral()) | 101 if (keyframe->IsNeutral()) |
101 updated |= keyframe->PopulateAnimatableValue(property, element, | 102 updated |= keyframe->PopulateAnimatableValue(property, element, |
102 new_style, parent_style); | 103 new_style, parent_style); |
103 } | 104 } |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 } | 320 } |
320 if (keyframes_.back()->Offset() != 1.0) { | 321 if (keyframes_.back()->Offset() != 1.0) { |
321 AppendKeyframe(keyframes_.back()->NeutralKeyframe(1, nullptr)); | 322 AppendKeyframe(keyframes_.back()->NeutralKeyframe(1, nullptr)); |
322 added_synthetic_keyframe = true; | 323 added_synthetic_keyframe = true; |
323 } | 324 } |
324 | 325 |
325 return added_synthetic_keyframe; | 326 return added_synthetic_keyframe; |
326 } | 327 } |
327 | 328 |
328 } // namespace blink | 329 } // namespace blink |
OLD | NEW |