forked from mirrors/gecko-dev
Bug 1873137 - Remove dom.animations-api.getAnimations.enabled pref r=webidl,emilio,firefox-animation-reviewers,devtools-reviewers,nchevobbe,boris
Differential Revision: https://phabricator.services.mozilla.com/D201162
This commit is contained in:
parent
6a92b4c33b
commit
c056a64e2e
27 changed files with 28 additions and 108 deletions
|
|
@ -70,10 +70,7 @@ const closeAnimationInspector = async function () {
|
|||
*/
|
||||
const enableAnimationFeatures = function () {
|
||||
return SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["dom.animations-api.getAnimations.enabled", true],
|
||||
["dom.animations-api.timelines.enabled", true],
|
||||
],
|
||||
set: [["dom.animations-api.timelines.enabled", true]],
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ load 1282691-1.html
|
|||
load 1291413-1.html
|
||||
load 1291413-2.html
|
||||
pref(dom.animations-api.compositing.enabled,true) load 1304886-1.html
|
||||
pref(dom.animations-api.getAnimations.enabled,true) load 1309198-1.html
|
||||
load 1309198-1.html
|
||||
load 1322382-1.html
|
||||
load 1322291-1.html
|
||||
load 1322291-2.html
|
||||
|
|
@ -26,7 +26,7 @@ load 1324554-1.html
|
|||
pref(dom.animations-api.compositing.enabled,true) load 1325193-1.html
|
||||
load 1332588-1.html
|
||||
load 1330190-1.html
|
||||
pref(dom.animations-api.compositing.enabled,true) pref(dom.animations-api.getAnimations.enabled,true) load 1330190-2.html
|
||||
pref(dom.animations-api.compositing.enabled,true) load 1330190-2.html
|
||||
pref(dom.animations-api.compositing.enabled,true) load 1330513-1.html
|
||||
pref(dom.animations-api.timelines.enabled,true) load 1333539-1.html
|
||||
pref(dom.animations-api.timelines.enabled,true) load 1333539-2.html
|
||||
|
|
@ -48,15 +48,15 @@ load 1524480-1.html
|
|||
load 1575926.html
|
||||
load 1585770.html
|
||||
load 1604500-1.html
|
||||
pref(dom.animations-api.getAnimations.enabled,true) load 1611847.html
|
||||
load 1611847.html
|
||||
load 1612891-1.html
|
||||
load 1612891-2.html
|
||||
load 1612891-3.html
|
||||
pref(dom.animations-api.getAnimations.enabled,true) load 1633442.html
|
||||
load 1633442.html
|
||||
load 1633486.html
|
||||
pref(layout.animation.prerender.partial,true) load 1656419.html
|
||||
load 1706157.html
|
||||
pref(gfx.omta.background-color,true) load 1699890.html
|
||||
pref(dom.animations-api.getAnimations.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1714421.html
|
||||
pref(dom.animations-api.timelines.enabled,true) load 1714421.html
|
||||
load 1807966.html
|
||||
load 1875441.html
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
[DEFAULT]
|
||||
prefs = [
|
||||
"dom.animations-api.compositing.enabled=true",
|
||||
"dom.animations-api.getAnimations.enabled=true",
|
||||
"dom.animations-api.timelines.enabled=true",
|
||||
"gfx.omta.background-color=true",
|
||||
"layout.css.individual-transform.enabled=true",
|
||||
|
|
@ -15,7 +14,6 @@ support-files = [
|
|||
"mozilla/xhr_doc.html",
|
||||
"mozilla/file_deferred_start.html",
|
||||
"mozilla/file_disable_animations_api_compositing.html",
|
||||
"mozilla/file_disable_animations_api_get_animations.html",
|
||||
"mozilla/file_disable_animations_api_timelines.html",
|
||||
"mozilla/file_discrete_animations.html",
|
||||
"mozilla/file_transition_finish_on_compositor.html",
|
||||
|
|
@ -37,8 +35,6 @@ skip-if = ["os == 'win' && bits == 64"] # Bug 1363957
|
|||
|
||||
["mozilla/test_disable_animations_api_compositing.html"]
|
||||
|
||||
["mozilla/test_disable_animations_api_get_animations.html"]
|
||||
|
||||
["mozilla/test_disable_animations_api_timelines.html"]
|
||||
|
||||
["mozilla/test_disabled_properties.html"]
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<script src="../testcommon.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test(t => {
|
||||
assert_false('getAnimations' in addDiv(t));
|
||||
}, 'Element.getAnimations() is not available when getAnimations pref is'
|
||||
+ ' disabled');
|
||||
|
||||
test(t => {
|
||||
assert_false('getAnimations' in document);
|
||||
}, 'Document.getAnimations() is not available when getAnimations pref is'
|
||||
+ ' disabled');
|
||||
|
||||
done();
|
||||
</script>
|
||||
</body>
|
||||
|
|
@ -9,7 +9,6 @@ setup({explicit_done: true});
|
|||
SpecialPowers.pushPrefEnv(
|
||||
{
|
||||
set: [
|
||||
["dom.animations-api.getAnimations.enabled", true],
|
||||
["dom.animations-api.timelines.enabled", true],
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
'use strict';
|
||||
setup({explicit_done: true});
|
||||
SpecialPowers.pushPrefEnv(
|
||||
{ "set": [["dom.animations-api.getAnimations.enabled", false]]},
|
||||
function() {
|
||||
window.open("file_disable_animations_api_get_animations.html");
|
||||
});
|
||||
</script>
|
||||
|
|
@ -4463,15 +4463,6 @@ bool Document::AllowsL10n() const {
|
|||
return allowed;
|
||||
}
|
||||
|
||||
bool Document::IsWebAnimationsGetAnimationsEnabled(JSContext* aCx,
|
||||
JSObject* /*unused*/
|
||||
) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
return nsContentUtils::IsSystemCaller(aCx) ||
|
||||
StaticPrefs::dom_animations_api_getAnimations_enabled();
|
||||
}
|
||||
|
||||
bool Document::AreWebAnimationsTimelinesEnabled(JSContext* aCx,
|
||||
JSObject* /*unused*/
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -3423,8 +3423,6 @@ class Document : public nsINode,
|
|||
mozilla::dom::HTMLAllCollection* All();
|
||||
|
||||
static bool DocumentSupportsL10n(JSContext* aCx, JSObject* aObject);
|
||||
static bool IsWebAnimationsGetAnimationsEnabled(JSContext* aCx,
|
||||
JSObject* aObject);
|
||||
static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx,
|
||||
JSObject* aObject);
|
||||
// Checks that the caller is either chrome or some addon.
|
||||
|
|
|
|||
|
|
@ -10,14 +10,10 @@ var names = [
|
|||
"span", "_moz_generated_content_before", "_moz_generated_content_after"
|
||||
];
|
||||
|
||||
if (SpecialPowers.getBoolPref("dom.animations-api.getAnimations.enabled")) {
|
||||
names.forEach(name => {
|
||||
var element = document.createElement(name);
|
||||
element.animate({ "color": ["red", "blue"] }, { duration: 1000 });
|
||||
is(element.getAnimations().length, 1);
|
||||
});
|
||||
} else {
|
||||
ok("Test requires Web Animations, which is disabled.");
|
||||
}
|
||||
names.forEach(name => {
|
||||
var element = document.createElement(name);
|
||||
element.animate({ "color": ["red", "blue"] }, { duration: 1000 });
|
||||
is(element.getAnimations().length, 1);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ function test_getUnanimatedComputedStyle() {
|
|||
SpecialPowers.pushPrefEnv(
|
||||
{
|
||||
set: [
|
||||
["dom.animations-api.getAnimations.enabled", true],
|
||||
["dom.animations-api.timelines.enabled", true],
|
||||
["layout.css.properties-and-values.enabled", true],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ def WebIDLTest(parser, harness):
|
|||
parser.parse(
|
||||
"""
|
||||
interface TestFuncConstructor {
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled"] constructor();
|
||||
[Func="IsNotUAWidget"] constructor();
|
||||
};
|
||||
"""
|
||||
)
|
||||
|
|
@ -277,7 +277,7 @@ def WebIDLTest(parser, harness):
|
|||
"::TestFuncConstructor::constructor",
|
||||
"constructor",
|
||||
[("TestFuncConstructor (Wrapper)", [])],
|
||||
func=["Document::IsWebAnimationsGetAnimationsEnabled"],
|
||||
func=["IsNotUAWidget"],
|
||||
)
|
||||
|
||||
parser = parser.reset()
|
||||
|
|
@ -286,7 +286,7 @@ def WebIDLTest(parser, harness):
|
|||
"\n"
|
||||
" interface TestPrefChromeOnlySCFuncConstructor {\n"
|
||||
' [ChromeOnly, Pref="dom.webidl.test1", SecureContext, '
|
||||
'Func="Document::IsWebAnimationsGetAnimationsEnabled"]\n'
|
||||
'Func="IsNotUAWidget"]\n'
|
||||
" constructor();\n"
|
||||
" };\n"
|
||||
)
|
||||
|
|
@ -300,7 +300,7 @@ def WebIDLTest(parser, harness):
|
|||
"::TestPrefChromeOnlySCFuncConstructor::constructor",
|
||||
"constructor",
|
||||
[("TestPrefChromeOnlySCFuncConstructor (Wrapper)", [])],
|
||||
func=["Document::IsWebAnimationsGetAnimationsEnabled"],
|
||||
func=["IsNotUAWidget"],
|
||||
pref=["dom.webidl.test1"],
|
||||
chromeOnly=True,
|
||||
secureContext=True,
|
||||
|
|
|
|||
|
|
@ -1505,7 +1505,7 @@ interface TestSCConstructorForInterface {
|
|||
[SecureContext] constructor();
|
||||
};
|
||||
|
||||
[Exposed=Window, Func="Document::IsWebAnimationsGetAnimationsEnabled"]
|
||||
[Exposed=Window, Func="IsNotUAWidget"]
|
||||
interface TestConstructorForFuncInterface {
|
||||
// Since the interface has a Func attribute, but the constructor does not,
|
||||
// the generated constructor should not check for the Func.
|
||||
|
|
@ -1516,7 +1516,7 @@ interface TestConstructorForFuncInterface {
|
|||
interface TestFuncConstructorForInterface {
|
||||
// Since the constructor has a Func attribute, but the interface does not,
|
||||
// the generated constructor should check for the Func.
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled"]
|
||||
[Func="IsNotUAWidget"]
|
||||
constructor();
|
||||
};
|
||||
|
||||
|
|
@ -1524,13 +1524,13 @@ interface TestFuncConstructorForInterface {
|
|||
interface TestFuncConstructorForDifferentFuncInterface {
|
||||
// Since the constructor has a different Func attribute from the interface,
|
||||
// the generated constructor should still check for its conditional func.
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled"]
|
||||
[Func="IsNotUAWidget"]
|
||||
constructor();
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface TestPrefChromeOnlySCFuncConstructorForInterface {
|
||||
[Pref="dom.webidl.test1", ChromeOnly, SecureContext, Func="Document::IsWebAnimationsGetAnimationsEnabled"]
|
||||
[Pref="dom.webidl.test1", ChromeOnly, SecureContext, Func="IsNotUAWidget"]
|
||||
// There should be checks for all Pref/ChromeOnly/SecureContext/Func
|
||||
// in the generated constructor.
|
||||
constructor();
|
||||
|
|
|
|||
|
|
@ -9,10 +9,6 @@
|
|||
'use strict';
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv(
|
||||
{ "set": [["dom.animations-api.getAnimations.enabled", true]]},
|
||||
function() {
|
||||
window.open("file_smilWithTransition.html");
|
||||
});
|
||||
window.open("file_smilWithTransition.html");
|
||||
</script>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,5 @@ interface mixin Animatable {
|
|||
[Throws]
|
||||
Animation animate(object? keyframes,
|
||||
optional UnrestrictedDoubleOrKeyframeAnimationOptions options = {});
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled"]
|
||||
sequence<Animation> getAnimations(optional GetAnimationsOptions options = {});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@
|
|||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled",
|
||||
HeaderFile="nsAnimationManager.h",
|
||||
Exposed=Window]
|
||||
[HeaderFile="nsAnimationManager.h", Exposed=Window]
|
||||
interface CSSAnimation : Animation {
|
||||
[Constant] readonly attribute DOMString animationName;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@
|
|||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled",
|
||||
HeaderFile="nsTransitionManager.h",
|
||||
Exposed=Window]
|
||||
[HeaderFile="nsTransitionManager.h", Exposed=Window]
|
||||
interface CSSTransition : Animation {
|
||||
[Constant] readonly attribute DOMString transitionProperty;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ interface mixin DocumentOrShadowRoot {
|
|||
|
||||
// https://drafts.csswg.org/web-animations-1/#extensions-to-the-documentorshadowroot-interface-mixin
|
||||
partial interface mixin DocumentOrShadowRoot {
|
||||
[Func="Document::IsWebAnimationsGetAnimationsEnabled"]
|
||||
sequence<Animation> getAnimations();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ add_task(async function setup_pref() {
|
|||
// To avoid throttling requestAnimationFrame callbacks in invisible
|
||||
// iframes
|
||||
["layout.throttled_frame_rate", 60],
|
||||
["dom.animations-api.getAnimations.enabled", true],
|
||||
["dom.animations-api.timelines.enabled", true],
|
||||
// Next two prefs are needed for hit-testing to work
|
||||
["test.events.async.enabled", true],
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ load 1146101-1.html
|
|||
load 1153693-1.html
|
||||
load 1156969.svg
|
||||
load 1161320-1.html
|
||||
pref(dom.animations-api.getAnimations.enabled,true) load 1161320-2.html
|
||||
load 1161320-2.html
|
||||
load 1161366-1.html
|
||||
load 1163446-1.html
|
||||
load 1164813-1.html
|
||||
|
|
@ -158,7 +158,7 @@ load 1265611-1.html
|
|||
load 1270795.html
|
||||
load 1275026.html
|
||||
load 1278463-1.html
|
||||
pref(dom.animations-api.getAnimations.enabled,true) load 1277908-1.html
|
||||
load 1277908-1.html
|
||||
load 1277908-2.html
|
||||
load 1282076-1.html
|
||||
load 1282076-2.html
|
||||
|
|
@ -276,7 +276,7 @@ load 1413361.html
|
|||
load 1413670.html
|
||||
load 1415353.html
|
||||
skip-if(wayland) load 1418059.html # wayland: bug 1856389
|
||||
skip-if(wayland) test-pref(dom.animations-api.getAnimations.enabled,true) load 1418867.html # wayland: bug 1856389
|
||||
skip-if(wayland) load 1418867.html # wayland: bug 1856389
|
||||
load 1419554.html
|
||||
load 1426312.html
|
||||
load 1439793.html
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
[DEFAULT]
|
||||
prefs = [
|
||||
"dom.animations-api.compositing.enabled=true",
|
||||
"dom.animations-api.getAnimations.enabled=true",
|
||||
"dom.animations-api.timelines.enabled=true",
|
||||
"gfx.omta.background-color=true",
|
||||
"gfx.font_loader.delay=0",
|
||||
|
|
|
|||
|
|
@ -2153,13 +2153,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is support for Document.getAnimations() and Element.getAnimations()
|
||||
# supported?
|
||||
- name: dom.animations-api.getAnimations.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is support for timelines from the Web Animations API enabled?
|
||||
- name: dom.animations-api.timelines.enabled
|
||||
type: bool
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.getAnimations.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false, layout.css.animation-composition.enabled:true, layout.css.properties-and-values.enabled:true]
|
||||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false, layout.css.animation-composition.enabled:true, layout.css.properties-and-values.enabled:true]
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
prefs: [dom.animations-api.getAnimations.enabled:true]
|
||||
leak-threshold: [default:51200]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
prefs: [dom.animations-api.getAnimations.enabled:true]
|
||||
[idlharness.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [TIMEOUT, OK]
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
prefs: [dom.animations-api.getAnimations.enabled:true]
|
||||
|
|
@ -1 +1 @@
|
|||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.getAnimations.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false]
|
||||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.getAnimations.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false, layout.css.properties-and-values.enabled:true]
|
||||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false, layout.css.properties-and-values.enabled:true]
|
||||
|
|
|
|||
Loading…
Reference in a new issue