[webkit-reviews] review denied: [Bug 183781] [Web Animations] Dispatch DOM events for CSS Transitions and CSS Animations implemented as Web Animations : [Attachment 336135] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 20 11:34:07 PDT 2018


Dean Jackson <dino at apple.com> has denied Antoine Quint <graouts at apple.com>'s
request for review:
Bug 183781: [Web Animations] Dispatch DOM events for CSS Transitions and CSS
Animations implemented as Web Animations
https://bugs.webkit.org/show_bug.cgi?id=183781

Attachment 336135: Patch

https://bugs.webkit.org/attachment.cgi?id=336135&action=review




--- Comment #2 from Dean Jackson <dino at apple.com> ---
Comment on attachment 336135
  --> https://bugs.webkit.org/attachment.cgi?id=336135
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336135&action=review

This is all good. It just needs to be split into smaller patches because it is
doing multiple things.

> Source/WebCore/animation/AnimationTimeline.cpp:148
> +    // In case this element is newly getting a "display: none" we need to
cancel all of its animations and disregard new ones.
> +    if (oldStyle && oldStyle->hasAnimations() && oldStyle->display() != NONE
&& newStyle.display() == NONE) {
> +	   if (m_elementToCSSAnimationByName.contains(&element)) {
> +	       for (const auto& cssAnimationsByNameMapItem :
m_elementToCSSAnimationByName.take(&element))
> +		  
cancelOrRemoveDeclarativeAnimation(cssAnimationsByNameMapItem.value);
> +	   }
> +	   return;
> +    }
> +
> +    if (oldStyle && oldStyle->hasAnimations() && newStyle.hasAnimations() &&
*(oldStyle->animations()) == *(newStyle.animations()))
> +	   return;

This display:none work should be a separate patch.

> Source/WebCore/animation/DeclarativeAnimation.cpp:72
> +    else
> +	   pause();

So should this.

> Source/WebCore/animation/DeclarativeAnimation.cpp:106
> +void DeclarativeAnimation::cancel()
> +{
> +    auto cancelationTime = 0_s;
> +    if (auto animationEffect = effect())
> +	   cancelationTime = animationEffect->activeTime().value_or(0_s);
> +
> +    WebAnimation::cancel();
> +
> +    invalidateDOMEvents(cancelationTime);
> +}

And maybe cancel() on declarative animations should be a separate patch too.


More information about the webkit-reviews mailing list