Issue #1689 - Part 1: Add pref for DOM Animation timelines API

Default false, no intent to ship for web content. Always enabled for Chrome.
This commit is contained in:
Moonchild 2021-01-14 14:46:52 +00:00 • committed by roytam1
commit ad1e2abea1
10 changed files with 27 additions and 12 deletions

View file

@ -2923,6 +2923,15 @@ nsDocument::IsWebAnimationsEnabled(JSContext* /*unused*/, JSObject* /*unused*/)
Preferences::GetBool("dom.animations-api.core.enabled");
}
bool
nsDocument::AreWebAnimationsTimelinesEnabled(JSContext* /*unused*/, JSObject* /*unused*/)
{
MOZ_ASSERT(NS_IsMainThread());
return nsContentUtils::IsCallerChrome() ||
Preferences::GetBool("dom.animations-api.timelines.enabled");
}
DocumentTimeline*
nsDocument::Timeline()
{