Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e9cf5c17d3448f24c84ba5af5529c69c0fc9935
      
https://github.com/WebKit/WebKit/commit/5e9cf5c17d3448f24c84ba5af5529c69c0fc9935
  Author: Antoine Quint <[email protected]>
  Date:   2025-09-29 (Mon, 29 Sep 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-inner-match-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-inner-match.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-outer-match-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-outer-match.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/keyframes-002-expected.txt
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/style/StyleResolver.cpp
    M Source/WebCore/style/StyleResolver.h
    M Source/WebCore/style/Styleable.cpp

  Log Message:
  -----------
  [css-animations] resolve `animation-name` as tree-scoped references
https://bugs.webkit.org/show_bug.cgi?id=296048
rdar://156484228

Reviewed by Antti Koivisto.

Adopt `Style::Scope::resolveTreeScopedReference()` introduced in 300333@main to 
resolve `animation-name`
and find the correct scope to find the matching `@keyframes` rule.

Because `resolveTreeScopedReference()` provides a const `Style::Scope` and 
`Style::Resolver` to work with,
a few methods on `Style::Resolver` needed to be updated to be marked const, 
which they should have been
all along.

Additionally, because the `resolveTreeScopedReference()` lambda needs to return 
a truthy value to determine
whether a matching `@keyframes` rule was found for the provided scope, we 
needed to change
`Style::Resolver::keyframeStylesForAnimation()` to return a `bool` to indicate 
whether it processed an
`@keyframes` rule.

Tests: 
imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow.html
       
imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-inner-match.html
       
imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-outer-match.html
       
imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-nested-shadow.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-inner-match-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-inner-match.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-outer-match-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-outer-match.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-name-in-shadow-part.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/keyframes-002-expected.txt:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::builderContext const):
(WebCore::Style::Resolver::styleForKeyframe const):
(WebCore::Style::Resolver::isAnimationNameValid const):
(WebCore::Style::Resolver::keyframeStylesForAnimation const):
(WebCore::Style::Resolver::builderContext): Deleted.
(WebCore::Style::Resolver::styleForKeyframe): Deleted.
(WebCore::Style::Resolver::isAnimationNameValid): Deleted.
(WebCore::Style::Resolver::keyframeStylesForAnimation): Deleted.
* Source/WebCore/style/StyleResolver.h:
* Source/WebCore/style/Styleable.cpp:
(WebCore::keyframesRuleExistsForAnimation):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to