WebAnimation WebAnimation::fadeAnimation(const WebString& name, float from, float to, double duration) { WebAnimation tmp; tmp.d->name = String(name.impl()); tmp.d->animation = Animation::create(); tmp.d->animation->setDuration(duration); tmp.d->keyframes = KeyframeValueList(AnimatedPropertyOpacity); tmp.d->keyframes.insert(new FloatAnimationValue(0, from)); tmp.d->keyframes.insert(new FloatAnimationValue(1.0, to)); return tmp; }
void WebOverlay::removeAnimation(const WebString& name) { d->removeAnimation(String(PassRefPtr<StringImpl>(name.impl()))); }