[Web Animations] :KeyframeEffect.pseudoElement does not return a valid string when targeting ::marker or ::first-letter
Created attachment 413677 [details]
Comment on attachment 413677 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=413677&action=review
> + We used to use PseudoElement::pseudoElementNameForEvents() to go from PseudoId to a String, but PseudoElement
> + only knows about ::before and ::after and not about valid pseudo-elements. We remove that method and create an
> + equivalent in WebAnimationUtilities that knows about all public pseudo-elements.
Why not fix pseudoElementNameForEvents to handle all pseudo elements?
> +String pseudoIdAsString(PseudoId pseudoId)
Yeah, I think this should stay on PseudoElement. If you were going to update the list, it's where you would look. Not inside WebAnimationUtilities.
Actually, we want to move away from PseudoElement which are only ever created for ::before and ::after pseudo-elements. We've moved to using the Styleable struct throughout the animation code so that we rely on PseudoElement as little as possible.
We only ever need to convert from a PseudoId to a String for animations, so I believe this is the right place.
Committed r269623: <https://trac.webkit.org/changeset/269623>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 413677 [details].