[webkit-reviews] review granted: [Bug 180647] [Web Animations] Implement AnimationPlaybackEvent and AnimationPlaybackEventInit : [Attachment 328973] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 11 09:53:14 PST 2017

Dean Jackson <dino at apple.com> has granted Antoine Quint <graouts at apple.com>'s
request for review:
Bug 180647: [Web Animations] Implement AnimationPlaybackEvent and

Attachment 328973: Patch


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

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

> Source/WebCore/animation/AnimationPlaybackEvent.cpp:46
> +    : Event(type, true, false)

What is the middle 'true' here? I guess it is a different constructor to the
one you're using above?

> Source/WebCore/animation/AnimationPlaybackEvent.cpp:58
> +    if (m_currentTime)
> +	   return m_currentTime->milliseconds();
> +    return std::nullopt;

We normally do these the other way around.

if (!m_currentTime)
  return std::nullopt;

return actualvalue;

> Source/WebCore/animation/AnimationPlaybackEvent.cpp:71
> +EventInterface AnimationPlaybackEvent::eventInterface() const
> +{
> +    return AnimationPlaybackEventInterfaceType;
> +}

This can be inline in the header file.

> Source/WebCore/animation/AnimationPlaybackEvent.h:40
> +    static Ref<AnimationPlaybackEvent> create(const AtomicString& type,
const AnimationPlaybackEventInit& initializer, IsTrusted isTrusted =

Not your issue, but I wish it was Trusted::NotTrusted, although
Trusted::Trusted would look weird.

More information about the webkit-reviews mailing list