Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c7ec9d7ff067dd19d84994162e6778d7cb1bb10b
      
https://github.com/WebKit/WebKit/commit/c7ec9d7ff067dd19d84994162e6778d7cb1bb10b
  Author: Antoine Quint <[email protected]>
  Date:   2025-02-21 (Fri, 21 Feb 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset.html
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Animations.cpp
    M Source/WebCore/style/StyleResolver.cpp

  Log Message:
  -----------
  [scroll-animations] "In & Out" demos of 
https://nerdy.dev/notebook/scroll-driven-animations.html mostly do not work
https://bugs.webkit.org/show_bug.cgi?id=287789
rdar://144974803

Reviewed by Antti Koivisto and Anne van Kesteren.

The "In & Out" section of this page uses @keyframes rules that look something 
like:

```
@keyframes candycane {
    entry 0% { translate: -100% }
    entry 200% { translate: 0% }
    exit -100% { translate: 0% }
    exit 100% { translate: 100% }
}
```

When we added support for timeline ranges in keyframes in 289948@main we 
incorrectly handled percentages the
same way we do for keyframes specified without a timeline range which restrict 
their values to the [0%-100%]
range. But the percentage can actually be negative values and values above 
100%, so we adjust our parsing
code to allow those and change how we construct the empty and deleted values 
for the `StyleRuleKeyframe::Key`
struct which represents such values in our CSS parsing code.

Since this wasn't part of the existing battery of WPT tests, we add such a case.

* 
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset.html:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Animations.cpp:
(WebCore::CSSPropertyParserHelpers::consumeKeyframeKeyList):
* Source/WebCore/style/StyleResolver.cpp:
(WTF::HashTraits<WebCore::StyleRuleKeyframe::Key>::emptyValue):
(WTF::HashTraits<WebCore::StyleRuleKeyframe::Key>::isEmptyValue):
(WTF::HashTraits<WebCore::StyleRuleKeyframe::Key>::constructDeletedValue):
(WTF::HashTraits<WebCore::StyleRuleKeyframe::Key>::isDeletedValue):

Canonical link: https://commits.webkit.org/290776@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