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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 DEFINE_TRACE(AnimationStack) { | 156 DEFINE_TRACE(AnimationStack) { |
157 visitor->trace(m_sampledEffects); | 157 visitor->trace(m_sampledEffects); |
158 } | 158 } |
159 | 159 |
160 bool AnimationStack::getAnimatedBoundingBox(FloatBox& box, | 160 bool AnimationStack::getAnimatedBoundingBox(FloatBox& box, |
161 CSSPropertyID property) const { | 161 CSSPropertyID property) const { |
162 FloatBox originalBox(box); | 162 FloatBox originalBox(box); |
163 for (const auto& sampledEffect : m_sampledEffects) { | 163 for (const auto& sampledEffect : m_sampledEffects) { |
164 if (sampledEffect->effect() && | 164 if (sampledEffect->effect() && |
165 sampledEffect->effect()->affects(PropertyHandle(property))) { | 165 sampledEffect->effect()->affects(PropertyHandle(property))) { |
166 KeyframeEffect* effect = sampledEffect->effect(); | 166 KeyframeEffectReadOnly* effect = sampledEffect->effect(); |
167 const Timing& timing = effect->specifiedTiming(); | 167 const Timing& timing = effect->specifiedTiming(); |
168 double startRange = 0; | 168 double startRange = 0; |
169 double endRange = 1; | 169 double endRange = 1; |
170 timing.timingFunction->range(&startRange, &endRange); | 170 timing.timingFunction->range(&startRange, &endRange); |
171 FloatBox expandingBox(originalBox); | 171 FloatBox expandingBox(originalBox); |
172 if (!CompositorAnimations::getAnimatedBoundingBox( | 172 if (!CompositorAnimations::getAnimatedBoundingBox( |
173 expandingBox, *effect->model(), startRange, endRange)) | 173 expandingBox, *effect->model(), startRange, endRange)) |
174 return false; | 174 return false; |
175 box.expandTo(expandingBox); | 175 box.expandTo(expandingBox); |
176 } | 176 } |
177 } | 177 } |
178 return true; | 178 return true; |
179 } | 179 } |
180 | 180 |
181 } // namespace blink | 181 } // namespace blink |
OLD | NEW |