Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9db2da0e4d0a921511e1c740351e3bba0f400e7a
      
https://github.com/WebKit/WebKit/commit/9db2da0e4d0a921511e1c740351e3bba0f400e7a
  Author: Antoine Quint <[email protected]>
  Date:   2025-11-14 (Fri, 14 Nov 2025)

  Changed paths:
    M 
LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt
    A 
LayoutTests/compositing/layer-creation/multiple-keyframes-individual-transform-properties-animation-overlap-expected.txt
    A 
LayoutTests/compositing/layer-creation/multiple-keyframes-individual-transform-properties-animation-overlap.html
    M 
LayoutTests/compositing/layer-creation/scale-rotation-animation-overlap-expected.txt
    M 
LayoutTests/compositing/layer-creation/scale-rotation-animation-overlap.html
    A 
LayoutTests/compositing/layer-creation/scale-rotation-individual-properties-animation-overlap-expected.txt
    A 
LayoutTests/compositing/layer-creation/scale-rotation-individual-properties-animation-overlap.html
    M 
LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt
    A 
LayoutTests/compositing/layer-creation/translate-scale-individual-properties-animation-overlap-expected.txt
    A 
LayoutTests/compositing/layer-creation/translate-scale-individual-properties-animation-overlap.html
    M 
LayoutTests/platform/ios/compositing/layer-creation/scale-rotation-animation-overlap-expected.txt
    A 
LayoutTests/platform/ios/compositing/layer-creation/scale-rotation-individual-properties-animation-overlap-expected.txt
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/animation/KeyframeEffect.h
    M Source/WebCore/animation/WebAnimationUtilities.cpp
    M Source/WebCore/animation/WebAnimationUtilities.h
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/style/Styleable.cpp
    M Source/WebCore/style/Styleable.h

  Log Message:
  -----------
  Overlap computations are broken with rotate, translate, scale properties
https://bugs.webkit.org/show_bug.cgi?id=236019

Reviewed by Simon Fraser.

We extend the extent computation for transform animations to also include the 
set
of individual transform properties: `translate`, `scale` and `rotate`.

Previously, the function used to compute that extent, 
`computeExtentOfTransformAnimation()`,
had two separate code paths: one for `matrix()` functions and another for the 
other function
types. Now we use a single approach which, for each keyframe:

1. computes the blended style for that keyframe using 
`setAnimatedPropertiesInStyle()`,
2. computes the transform inclusive of all properties using 
`RenderStyle::applyTransform()`.

This has the benefit of using the exact same values that will be hit during the 
animation.
Thanks to this approach, we can compute slightly tighter extents in the 
existing tests.

We also add new tests for individual transform properties.

Tests: 
compositing/layer-creation/multiple-keyframes-individual-transform-properties-animation-overlap.html
       
compositing/layer-creation/scale-rotation-individual-properties-animation-overlap.html
       
compositing/layer-creation/translate-scale-individual-properties-animation-overlap.html

* 
LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt:
* 
LayoutTests/compositing/layer-creation/multiple-keyframes-individual-transform-properties-animation-overlap-expected.txt:
 Added.
* 
LayoutTests/compositing/layer-creation/multiple-keyframes-individual-transform-properties-animation-overlap.html:
 Added.
* 
LayoutTests/compositing/layer-creation/scale-rotation-animation-overlap-expected.txt:
* LayoutTests/compositing/layer-creation/scale-rotation-animation-overlap.html:
* 
LayoutTests/compositing/layer-creation/scale-rotation-individual-properties-animation-overlap-expected.txt:
 Added.
* 
LayoutTests/compositing/layer-creation/scale-rotation-individual-properties-animation-overlap.html:
 Added.
* 
LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
* 
LayoutTests/compositing/layer-creation/translate-scale-individual-properties-animation-overlap-expected.txt:
 Added.
* 
LayoutTests/compositing/layer-creation/translate-scale-individual-properties-animation-overlap.html:
 Added.
* 
LayoutTests/platform/ios/compositing/layer-creation/scale-rotation-animation-overlap-expected.txt:
* 
LayoutTests/platform/ios/compositing/layer-creation/scale-rotation-individual-properties-animation-overlap-expected.txt:
 Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::isRunningAcceleratedTransformRelatedAnimation const):
(WebCore::KeyframeEffect::animatesMotionPath const):
(WebCore::KeyframeEffect::preventsAcceleration const):
(WebCore::KeyframeEffect::transformRelatedPropertyDidChange):
(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):
(WebCore::propertiesContainTransformRelatedProperty): Deleted.
(WebCore::KeyframeEffect::computeTransformedExtentViaTransformList const): 
Deleted.
(WebCore::KeyframeEffect::computeTransformedExtentViaMatrix const): Deleted.
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/WebAnimationUtilities.cpp:
(WebCore::animatablePropertiesContainTransformRelatedProperty):
* Source/WebCore/animation/WebAnimationUtilities.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::currentTransform const):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::computeAnimationExtent const):
(WebCore::Styleable::isRunningAcceleratedTransformRelatedAnimation const):
* Source/WebCore/style/Styleable.h:

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



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

Reply via email to