Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 28e155992e27804fca34327a04c65d2188b122cc
      
https://github.com/WebKit/WebKit/commit/28e155992e27804fca34327a04c65d2188b122cc
  Author: Antoine Quint <[email protected]>
  Date:   2026-01-16 (Fri, 16 Jan 2026)

  Changed paths:
    A 
LayoutTests/compositing/layer-creation/implicit-keyframes-animation-overlap-expected.txt
    A 
LayoutTests/compositing/layer-creation/implicit-keyframes-animation-overlap.html
    M Source/WebCore/animation/KeyframeEffect.cpp

  Log Message:
  -----------
  [threaded-animations] REGRESSION: scrolling 
https://scroll-driven-animations.style/ makes content disappear on iPad
https://bugs.webkit.org/show_bug.cgi?id=305654
rdar://168132265

Reviewed by Simon Fraser.

The various cards on the home page for https://scroll-driven-animations.style/, 
a site containing a
number of Scroll-driven Animations demos, are animated as follows:

    @keyframes appear {
        from {
                opacity: 0;
                translate: 0 -50% 0;
                clip-path: inset(100% 100% 0% 0%);
        }
        to {
                opacity: 1;
                clip-path: inset(0% 0% 0% 0%);
        }
    }

You'll notice that the `translate` property is specified in the "from" keyframe 
but not in the "to"
keyframe, making the "to" keyframe implicit. Unfortunately, this trips up the 
computation of the
transform animation extent we enhanced in 303045@main to account for individual 
transform properties.

Indeed, we simply used `BlendingKeyframes::hasImplicitKeyframes()` to determine 
whether there were
an implicit keyframe to account for, but in this case, there is a "to" keyframe 
defined, it simply
does not provide a value for any transform-related properties.

We now check if we've found explicit "from" and "to" keyframes and, if we have 
not, account for
the underlying style as the missing keyframe.

A new test checks this behavior with an empty "to" keyframe. Its result was 
checked visually
with layer borders enabled and it failed as expected prior to this patch.

Test: compositing/layer-creation/implicit-keyframes-animation-overlap.html

* 
LayoutTests/compositing/layer-creation/implicit-keyframes-animation-overlap-expected.txt:
 Added.
* 
LayoutTests/compositing/layer-creation/implicit-keyframes-animation-overlap.html:
 Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to