From e440d180639fd2aa2e4e4efa256b65df9bd9d0c9 Mon Sep 17 00:00:00 2001 From: Bramus Date: Wed, 13 Sep 2023 13:58:07 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Don=E2=80=99t=20bother=20extracting=20data?= =?UTF-8?q?=20from=20animation-related=20properties=20if=20there=20are=20n?= =?UTF-8?q?one=20declared?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scroll-timeline-css-parser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scroll-timeline-css-parser.js b/src/scroll-timeline-css-parser.js index f1fc1ad2..6ebe7aff 100644 --- a/src/scroll-timeline-css-parser.js +++ b/src/scroll-timeline-css-parser.js @@ -212,6 +212,8 @@ export class StyleParser { this.saveSourceSelectorToScrollTimeline(rule); this.saveSubjectSelectorToViewTimeline(rule); + if(!hasAnimationTimeline && !hasAnimationName && !hasAnimation) return; + let timelineNames = []; let animationNames = []; let shouldReplacePart = false; From cdc76f577cf2a1da8e115b4e035337338fe10b4d Mon Sep 17 00:00:00 2001 From: Bramus Date: Wed, 13 Sep 2023 19:58:11 +0200 Subject: [PATCH 2/2] Code formatting --- src/scroll-timeline-css-parser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scroll-timeline-css-parser.js b/src/scroll-timeline-css-parser.js index 6ebe7aff..ed6512a3 100644 --- a/src/scroll-timeline-css-parser.js +++ b/src/scroll-timeline-css-parser.js @@ -212,7 +212,9 @@ export class StyleParser { this.saveSourceSelectorToScrollTimeline(rule); this.saveSubjectSelectorToViewTimeline(rule); - if(!hasAnimationTimeline && !hasAnimationName && !hasAnimation) return; + if (!hasAnimationTimeline && !hasAnimationName && !hasAnimation) { + return; + } let timelineNames = []; let animationNames = [];