Bug 183370 - [Web Animations] Add a new runtime flag to control whether CSS Animations and CSS Transitions should run using the Web Animations timeline
Summary: [Web Animations] Add a new runtime flag to control whether CSS Animations and...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-06 08:35 PST by Antoine Quint
Modified: 2018-03-11 18:25 PDT (History)
4 users (show)

See Also:


Attachments
Patch (11.29 KB, patch)
2018-03-06 08:50 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2018-03-06 08:35:07 PST
We need a new runtime flag to control whether CSS Animations and CSS Transitions should run using the Web Animations timeline or using CSSAnimationController.
Comment 1 Antoine Quint 2018-03-06 08:35:22 PST
<rdar://problem/38180729>
Comment 2 Antoine Quint 2018-03-06 08:50:27 PST
Created attachment 335100 [details]
Patch
Comment 3 Dean Jackson 2018-03-06 09:51:32 PST
Comment on attachment 335100 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335100&action=review

You should check with Weinig here.

> Source/WebKit/UIProcess/API/C/WKPreferences.cpp:527
> +void WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(WKPreferencesRef preferencesRef, bool flag)
> +{
> +    toImpl(preferencesRef)->setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(flag);
> +}
> +
> +bool WKPreferencesGetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(WKPreferencesRef preferencesRef)
> +{
> +    return toImpl(preferencesRef)->cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled();
> +}
> +

Don't need this. Remove it.

> Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h:125
> +// Defaults to false
> +WK_EXPORT void WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(WKPreferencesRef, bool flag);
> +WK_EXPORT bool WKPreferencesGetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(WKPreferencesRef);
> +

Ditto.

> Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:979
> +- (void)_setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:(BOOL)enabled
> +{
> +    _preferences->setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(enabled);
> +}
> +

Actually I'm not sure if you need any of this other than the .yaml change.

> Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp:196
> +    if (preference == "WebKitCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled")
> +        RuntimeEnabledFeatures::sharedFeatures().setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(enabled);

Maybe I misunderstand the code, but I thought you didn't need to do this explicitly because the .yaml is generating code for it.
Comment 4 Tim Horton 2018-03-06 10:47:08 PST
Comment on attachment 335100 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335100&action=review

>> Source/WebKit/UIProcess/API/C/WKPreferences.cpp:527
>> +
> 
> Don't need this. Remove it.

Some clients still use this API

>> Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp:196
>> +        RuntimeEnabledFeatures::sharedFeatures().setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(enabled);
> 
> Maybe I misunderstand the code, but I thought you didn't need to do this explicitly because the .yaml is generating code for it.

Maybe plumbing to overrideBoolPreferenceForTestRunner isn't generated yet?
Comment 5 WebKit Commit Bot 2018-03-06 11:51:01 PST
Comment on attachment 335100 [details]
Patch

Clearing flags on attachment: 335100

Committed r229334: <https://trac.webkit.org/changeset/229334>
Comment 6 WebKit Commit Bot 2018-03-06 11:51:02 PST
All reviewed patches have been landed.  Closing bug.