Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c10b2ad3d5aa693edfffdeb1d774e71b6d6f6394
      
https://github.com/WebKit/WebKit/commit/c10b2ad3d5aa693edfffdeb1d774e71b6d6f6394
  Author: Kiet Ho <[email protected]>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-010-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-011-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-012-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-013-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-014-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-015-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-016-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-017-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-017.html
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/animation/KeyframeEffect.h
    M Source/WebCore/page/LocalFrameViewLayoutContext.cpp
    M Source/WebCore/rendering/RenderObject.cpp
    M Source/WebCore/rendering/RenderObject.h

  Log Message:
  -----------
  [css-anchor-position-1] Disable accelerated animation if animation affects 
anchor elements
rdar://175896047
https://bugs.webkit.org/show_bug.cgi?id=313698

Reviewed by Antoine Quint.

Accelerated animations don't trigger style resolution and layout, because
they're offloaded to the UI process. This doesn't play well with anchor
positioning, as most accelerated properties (scale, rotate, translate, ...)
can change the geometry of an element. If the element is an anchor, or layout
container of one, then the geometry of the anchor and elements anchored to it
have to be updated too.

Fix this by disabling accelerated animation if (1) the element being animated
is an anchor, or layout container of any anchors, and (2) any properties being
animated can be accelerated and change geometry.

Tests: 
imported/w3c/web-platform-tests/css/css-anchor-position/transform-010.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-011.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-012.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-013.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-014.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-015.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-016.html
       
imported/w3c/web-platform-tests/css/css-anchor-position/transform-017.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-010-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-011-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-012-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-013-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-014-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-015-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-016-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-017-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/transform-017.html:
 Added.
* LayoutTests/platform/win/TestExpectations:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::canBeAccelerated const):
(WebCore::KeyframeEffect::computeAnimationIsAcceleratedAndAffectsAnchorGeometry):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/page/LocalFrameViewLayoutContext.cpp:
(WebCore::LocalFrameViewLayoutContext::scheduleSubtreeLayout):
(WebCore::isObjectAncestorContainerOf): Deleted.
    - Move this static function into 
RenderObject::isAncestorContainerOfRenderer, so it could
      be used in other places.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::isAncestorContainerOfRenderer const):
* Source/WebCore/rendering/RenderObject.h:

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



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

Reply via email to