[webkit-changes] [WebKit/WebKit] 7fd136: [web-animations] store pseudo-element as a PseudoI...

Antoine Quint noreply at github.com
Mon Nov 28 06:38:54 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7fd1368cc82ba69731b9e1cc244cbac8307426ad
      https://github.com/WebKit/WebKit/commit/7fd1368cc82ba69731b9e1cc244cbac8307426ad
  Author: Antoine Quint <graouts at apple.com>
  Date:   2022-11-28 (Mon, 28 Nov 2022)

  Changed paths:
    M Source/WebCore/animation/CSSAnimation.cpp
    M Source/WebCore/animation/CSSAnimation.h
    M Source/WebCore/animation/CSSAnimationEvent.cpp
    M Source/WebCore/animation/CSSAnimationEvent.h
    M Source/WebCore/animation/CSSTransition.cpp
    M Source/WebCore/animation/CSSTransition.h
    M Source/WebCore/animation/CSSTransitionEvent.cpp
    M Source/WebCore/animation/CSSTransitionEvent.h
    M Source/WebCore/animation/DeclarativeAnimation.cpp
    M Source/WebCore/animation/DeclarativeAnimation.h
    M Source/WebCore/animation/DeclarativeAnimationEvent.cpp
    M Source/WebCore/animation/DeclarativeAnimationEvent.h
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/animation/WebAnimationUtilities.cpp
    M Source/WebCore/animation/WebAnimationUtilities.h

  Log Message:
  -----------
  [web-animations] store pseudo-element as a PseudoId on DeclarativeAnimationEvent
https://bugs.webkit.org/show_bug.cgi?id=248389

Reviewed by Antti Koivisto.

To fix bug 235145 we're going to need to sort animation events by composite order and account for the
relative position of the event targets, which means we'll need to get to the pseudo-element quite a bit.
This is currently stored as a string, but we should store it as a PseudoId to be efficient, and convert
to a string for API use as needed.

We do just that in this patch, moving the code from KeyframeEffect to convert a pseudo-element string to
a PseudoId to WebAnimationUtilities to be shared and used in DeclarativeAnimationEvent.

* Source/WebCore/animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::createEvent):
* Source/WebCore/animation/CSSAnimation.h:
* Source/WebCore/animation/CSSAnimationEvent.cpp:
(WebCore::CSSAnimationEvent::CSSAnimationEvent):
* Source/WebCore/animation/CSSAnimationEvent.h:
* Source/WebCore/animation/CSSTransition.cpp:
(WebCore::CSSTransition::createEvent):
* Source/WebCore/animation/CSSTransition.h:
* Source/WebCore/animation/CSSTransitionEvent.cpp:
(WebCore::CSSTransitionEvent::CSSTransitionEvent):
* Source/WebCore/animation/CSSTransitionEvent.h:
* Source/WebCore/animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::enqueueDOMEvent):
* Source/WebCore/animation/DeclarativeAnimation.h:
* Source/WebCore/animation/DeclarativeAnimationEvent.cpp:
(WebCore::DeclarativeAnimationEvent::DeclarativeAnimationEvent):
(WebCore::DeclarativeAnimationEvent::pseudoElement):
* Source/WebCore/animation/DeclarativeAnimationEvent.h:
(WebCore::DeclarativeAnimationEvent::pseudoId const):
(WebCore::DeclarativeAnimationEvent::pseudoElement const): Deleted.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setPseudoElement):
* Source/WebCore/animation/WebAnimationUtilities.cpp:
(WebCore::pseudoIdFromString):
* Source/WebCore/animation/WebAnimationUtilities.h:

Canonical link: https://commits.webkit.org/257069@main




More information about the webkit-changes mailing list