WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
233869
[Web Animations] Add a way to run scripted animations
https://bugs.webkit.org/show_bug.cgi?id=233869
Summary
[Web Animations] Add a way to run scripted animations
Antoine Quint
Reported
2021-12-06 02:12:15 PST
[Web Animations] Add a way to run scripted animations
Attachments
Patch
(46.19 KB, patch)
2021-12-06 02:31 PST
,
Antoine Quint
dino
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antoine Quint
Comment 1
2021-12-06 02:29:50 PST
rdar://85983542
Antoine Quint
Comment 2
2021-12-06 02:31:05 PST
Created
attachment 446016
[details]
Patch This patch is expected not to build until the patch for
bug 233868
lands but can already be reviewed.
Antoine Quint
Comment 3
2021-12-06 02:58:08 PST
I filed
https://github.com/w3c/csswg-drafts/issues/6861
to propose to revive the discussion of custom effects in Web Animations.
Dean Jackson
Comment 4
2021-12-06 10:07:33 PST
Comment on
attachment 446016
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=446016&action=review
> LayoutTests/ChangeLog:19 > +2021-12-06 Antoine Quint <
graouts@webkit.org
> > + > + [Web Animations] Add a way to run scripted animations > +
https://bugs.webkit.org/show_bug.cgi?id=233869
> + > + Reviewed by NOBODY (OOPS!). > + > + * webanimations/custom-effect/custom-effect-expected.txt: Added. > + * webanimations/custom-effect/custom-effect.html: Added. > + * webanimations/custom-effect/document-timeline-animate-expected.txt: Added. > + * webanimations/custom-effect/document-timeline-animate.html: Added. > + > +2021-12-06 Antoine Quint <
graouts@webkit.org
> > + > + [Web Animations] Add a way to run scripted animations > +
https://bugs.webkit.org/show_bug.cgi?id=233869
> +
rdar://85983542
> + > + Reviewed by NOBODY (OOPS!).
oops
> LayoutTests/webanimations/custom-effect/custom-effect.html:30 > + assert_not_equals(customEffectProgress, 1, "Callback is first fired with progress = 0.");
Did you want to change this message?
> Source/WTF/ChangeLog:12 > +2021-12-06 Antoine Quint <
graouts@webkit.org
> > + > + [Web Animations] Add a way to run scripted animations > +
https://bugs.webkit.org/show_bug.cgi?id=233869
> + > + Reviewed by NOBODY (OOPS!). > + > + * Scripts/Preferences/WebPreferencesExperimental.yaml: > + > +2021-12-06 Antoine Quint <
graouts@webkit.org
> > + > + [Web Animations] Add a way to run scripted animations
oops
> Source/WebCore/ChangeLog:39 > +2021-12-06 Antoine Quint <
graouts@webkit.org
> > + > + [Web Animations] Add a way to run scripted animations > +
https://bugs.webkit.org/show_bug.cgi?id=233869
> + > + Reviewed by NOBODY (OOPS!). > + > + Tests: webanimations/custom-effect/custom-effect.html > + webanimations/custom-effect/document-timeline-animate.html > + > + * CMakeLists.txt: > + * DerivedSources-input.xcfilelist: > + * DerivedSources-output.xcfilelist: > + * DerivedSources.make: > + * Headers.cmake: > + * Sources.txt: > + * WebCore.xcodeproj/project.pbxproj: > + * animation/AnimationEffect.h: > + (WebCore::AnimationEffect::isCustomEffect const): > + * animation/CustomAnimationOptions.h: Copied from Source/WebCore/animation/DocumentTimeline.idl. > + * animation/CustomAnimationOptions.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl. > + * animation/CustomEffect.cpp: Added. > + (WebCore::CustomEffect::create): > + (WebCore::CustomEffect::CustomEffect): > + (WebCore::CustomEffect::animationDidTick): > + * animation/CustomEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.idl. > + (WebCore::CustomEffect::~CustomEffect): > + * animation/CustomEffect.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl. > + * animation/CustomEffectCallback.h: Copied from Source/WebCore/animation/DocumentTimeline.idl. > + * animation/CustomEffectCallback.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl. > + * animation/DocumentTimeline.cpp: > + (WebCore::DocumentTimeline::animate): > + * animation/DocumentTimeline.h: > + * animation/DocumentTimeline.idl: > + * bindings/js/WebCoreBuiltinNames.h: > + > +2021-12-06 Antoine Quint <
graouts@webkit.org
> > + > + [Web Animations] Add a way to run scripted animations
oops
> Source/WebCore/animation/CustomEffect.cpp:43 > + std::variant<double, String> duration = std::get<double>(optionsValue);
We don't have a type for duration?
> Source/WebCore/animation/DocumentTimeline.cpp:516 > + std::variant<double, EffectTiming> customEffectOptionsVariant; > + if (std::holds_alternative<double>(*options)) > + customEffectOptionsVariant = std::get<double>(*options); > + else { > + auto customEffectOptions = std::get<CustomAnimationOptions>(*options); > + id = customEffectOptions.id; > + customEffectOptionsVariant = WTFMove(customEffectOptions); > + } > + customEffectOptions = customEffectOptionsVariant;
This might be nicer as a function that returns the variant directly into customEffectOptions.
Antoine Quint
Comment 5
2021-12-06 11:28:36 PST
Will fix Windows failures in
https://bugs.webkit.org/show_bug.cgi?id=233887
.
Antoine Quint
Comment 6
2021-12-06 11:31:10 PST
Committed
r286555
(
244885@main
): <
https://commits.webkit.org/244885@main
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug