[webkit-changes] [WebKit/WebKit] 6ab17c: [web-animations] percentage transform values are i...

Antoine Quint noreply at github.com
Thu Dec 14 00:59:09 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ab17cf692e2176ae76cd00a44e48fb608faaf46
      https://github.com/WebKit/WebKit/commit/6ab17cf692e2176ae76cd00a44e48fb608faaf46
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-separate-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-separate-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-separate.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-separate-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-separate-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-separate.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height.html
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/animation/KeyframeEffect.h

  Log Message:
  -----------
  [web-animations] percentage transform values are incorrect if `width` and `height` are animated
https://bugs.webkit.org/show_bug.cgi?id=211986
rdar://63309680

Reviewed by Simon Fraser.

When animating the `transform` or `translate` property, we resolve percentage values for translate
operations to fixed values. However, if the element also has an animation of `width` or `height`,
the resolved translation values will no longer be correct while the animation is in flight.

In that case, we need to detect such a case and turn off acceleration support.

* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-separate-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-separate-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height-separate.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-percent-with-width-and-height.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-separate-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-separate-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height-separate.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-percent-with-width-and-height.html: Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::canBeAccelerated const):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):
(WebCore::KeyframeEffect::computeHasSizeDependentTransform):
* Source/WebCore/animation/KeyframeEffect.h:

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




More information about the webkit-changes mailing list