Changeset 262711 in webkit


Ignore:
Timestamp:
Jun 8, 2020 7:24:14 AM (4 years ago)
Author:
Antti Koivisto
Message:

Pseudo-elements (::after) in shadow roots don't animate
https://bugs.webkit.org/show_bug.cgi?id=173027
<rdar://problem/42842994>

Reviewed by Antoine Quint.

Source/WebCore:

Test: animations/keyframe-pseudo-shadow.html

  • animation/AnimationTimeline.cpp:

(WebCore::shouldConsiderAnimation):

We should use the actual element instead of the PseudoElement when calling Style::Scope::forOrdinal.
The keyframe code that computes the style already does this correctly.

LayoutTests:

  • animations/keyframe-pseudo-shadow-expected.html: Added.
  • animations/keyframe-pseudo-shadow.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r262710 r262711  
     12020-06-08  Antti Koivisto  <antti@apple.com>
     2
     3        Pseudo-elements (::after) in shadow roots don't animate
     4        https://bugs.webkit.org/show_bug.cgi?id=173027
     5        <rdar://problem/42842994>
     6
     7        Reviewed by Antoine Quint.
     8
     9        * animations/keyframe-pseudo-shadow-expected.html: Added.
     10        * animations/keyframe-pseudo-shadow.html: Added.
     11
    1122020-06-08  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r262710 r262711  
     12020-06-08  Antti Koivisto  <antti@apple.com>
     2
     3        Pseudo-elements (::after) in shadow roots don't animate
     4        https://bugs.webkit.org/show_bug.cgi?id=173027
     5        <rdar://problem/42842994>
     6
     7        Reviewed by Antoine Quint.
     8
     9        Test: animations/keyframe-pseudo-shadow.html
     10
     11        * animation/AnimationTimeline.cpp:
     12        (WebCore::shouldConsiderAnimation):
     13
     14        We should use the actual element instead of the PseudoElement when calling Style::Scope::forOrdinal.
     15        The keyframe code that computes the style already does this correctly.
     16
    1172020-06-08  Youenn Fablet  <youenn@apple.com>
    218
  • trunk/Source/WebCore/animation/AnimationTimeline.cpp

    r262154 r262711  
    3838#include "KeyframeEffect.h"
    3939#include "KeyframeEffectStack.h"
     40#include "PseudoElement.h"
    4041#include "RenderStyle.h"
    4142#include "RenderView.h"
     
    211212}
    212213
    213 static bool shouldConsiderAnimation(Element& element, const Animation& animation)
     214static bool shouldConsiderAnimation(Element& elementOrPseudoElement, const Animation& animation)
    214215{
    215216    if (!animation.isValidAnimation())
     
    221222    if (name == animationNameNone || name.isEmpty())
    222223        return false;
     224
     225    auto& element = is<PseudoElement>(elementOrPseudoElement) ? *downcast<PseudoElement>(elementOrPseudoElement).hostElement() : elementOrPseudoElement;
    223226
    224227    if (auto* styleScope = Style::Scope::forOrdinal(element, animation.nameStyleScopeOrdinal()))
Note: See TracChangeset for help on using the changeset viewer.