| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 if (!m_effects[i]->interpolations().isEmpty()) { | 134 if (!m_effects[i]->interpolations().isEmpty()) { |
| 135 m_effects[dest++].swap(m_effects[i]); | 135 m_effects[dest++].swap(m_effects[i]); |
| 136 continue; | 136 continue; |
| 137 } | 137 } |
| 138 if (m_effects[i]->animation()) | 138 if (m_effects[i]->animation()) |
| 139 m_effects[i]->animation()->notifySampledEffectRemovedFromAnimationSt
ack(); | 139 m_effects[i]->animation()->notifySampledEffectRemovedFromAnimationSt
ack(); |
| 140 } | 140 } |
| 141 m_effects.shrink(dest); | 141 m_effects.shrink(dest); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void AnimationStack::trace(Visitor* visitor) | |
| 145 { | |
| 146 visitor->trace(m_effects); | |
| 147 } | |
| 148 | |
| 149 bool AnimationStack::getAnimatedBoundingBox(FloatBox& box, CSSPropertyID propert
y) const | 144 bool AnimationStack::getAnimatedBoundingBox(FloatBox& box, CSSPropertyID propert
y) const |
| 150 { | 145 { |
| 151 FloatBox originalBox(box); | 146 FloatBox originalBox(box); |
| 152 for (size_t i = 0; i < m_effects.size(); ++i) { | 147 for (size_t i = 0; i < m_effects.size(); ++i) { |
| 153 if (m_effects[i]->animation() && m_effects[i]->animation()->affects(prop
erty)) { | 148 if (m_effects[i]->animation() && m_effects[i]->animation()->affects(prop
erty)) { |
| 154 Animation* anim = m_effects[i]->animation(); | 149 Animation* anim = m_effects[i]->animation(); |
| 155 if (!anim) | 150 if (!anim) |
| 156 continue; | 151 continue; |
| 157 const Timing& timing = anim->specifiedTiming(); | 152 const Timing& timing = anim->specifiedTiming(); |
| 158 double startRange = 0; | 153 double startRange = 0; |
| 159 double endRange = 1; | 154 double endRange = 1; |
| 160 timing.timingFunction->range(&startRange, &endRange); | 155 timing.timingFunction->range(&startRange, &endRange); |
| 161 FloatBox expandingBox(originalBox); | 156 FloatBox expandingBox(originalBox); |
| 162 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand
ingBox, *anim->effect(), startRange, endRange)) | 157 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand
ingBox, *anim->effect(), startRange, endRange)) |
| 163 return false; | 158 return false; |
| 164 box.expandTo(expandingBox); | 159 box.expandTo(expandingBox); |
| 165 } | 160 } |
| 166 } | 161 } |
| 167 return true; | 162 return true; |
| 168 } | 163 } |
| 169 | 164 |
| 170 } // namespace blink | 165 } // namespace blink |
| OLD | NEW |