Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6718717d10e990b85cababf273e22be911cffa72
      
https://github.com/WebKit/WebKit/commit/6718717d10e990b85cababf273e22be911cffa72
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-08-18 (Tue, 18 Aug 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor-revert-layer-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor-revert-layer.html
    M Source/WebCore/animation/BlendingKeyframes.cpp

  Log Message:
  -----------
  BlendingKeyframe copy constructor drops m_hasPropertiesWithRevertRuleOrLayer, 
so keyframes using revert-layer/revert-rule stop being recomputed after 
KeyframeEffect is copied
https://bugs.webkit.org/show_bug.cgi?id=321988
rdar://185164643

Reviewed by Antoine Quint.

This patch aligns WebKit with Blink / Chromium.

BlendingKeyframe's copy constructor initializes every member except
m_hasPropertiesWithRevertRuleOrLayer. BlendingKeyframes::copyKeyframes()
copies each keyframe through that constructor and re-derives the container
flag in analyzeKeyframe(), so the copy always reports
hasPropertiesWithRevertRuleOrLayer() == false.

In the animation origin 'revert-layer' and 'revert-rule' roll the cascade
back to the author level, which WebKit implements by leaving the property
unapplied so the keyframe keeps the base style's value. That makes the
keyframe style depend on the author-level value, and
KeyframeEffect::recomputeKeyframesIfNecessary() relies on the flag to
re-resolve it when that value changes. Losing the flag leaves such an
effect permanently pinned to the value the keyframes were first computed
with.

This is web-observable through the KeyframeEffect copy constructor: the
copy carries already-computed keyframes, so updateBlendingKeyframes() will
not rebuild them from the parsed keyframes, and setAnimation() only clears
them for CSSAnimation-typed effects.

Test: 
imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor-revert-layer.html

* 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor-revert-layer-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/copy-constructor-revert-layer.html:
 Added.
* Source/WebCore/animation/BlendingKeyframes.cpp:
(WebCore::BlendingKeyframe::BlendingKeyframe):

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



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

Reply via email to