Bug 1880782 - Remove dom.animations-api.compositing.enabled and dom.animations-api.timelines.enabled prefs r=webidl,devtools-reviewers,firefox-animation-reviewers,nchevobbe,smaug,boris
Differential Revision: https://phabricator.services.mozilla.com/D211505
This commit is contained in:
@@ -4,8 +4,6 @@ prefs = [
|
|||||||
"browser.sessionstore.closedTabsFromAllWindows=true",
|
"browser.sessionstore.closedTabsFromAllWindows=true",
|
||||||
"browser.sessionstore.closedTabsFromClosedWindows=true",
|
"browser.sessionstore.closedTabsFromClosedWindows=true",
|
||||||
"dom.ipc.keepProcessesAlive.extension=1", # We don't want to reset this at the end of the test, so that we don't have to spawn a new extension child process for each test unit.
|
"dom.ipc.keepProcessesAlive.extension=1", # We don't want to reset this at the end of the test, so that we don't have to spawn a new extension child process for each test unit.
|
||||||
"dom.animations-api.core.enabled=true",
|
|
||||||
"dom.animations-api.timelines.enabled=true",
|
|
||||||
"javascript.options.asyncstack_capture_debuggee_only=false",
|
"javascript.options.asyncstack_capture_debuggee_only=false",
|
||||||
]
|
]
|
||||||
support-files = [
|
support-files = [
|
||||||
|
|||||||
@@ -204,7 +204,6 @@ extraPrefs = [
|
|||||||
"privacy.resistFingerprinting.reduceTimerPrecision.microseconds",
|
"privacy.resistFingerprinting.reduceTimerPrecision.microseconds",
|
||||||
extraData.RFP_Precision * 1000,
|
extraData.RFP_Precision * 1000,
|
||||||
],
|
],
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
addAllTests(extraData, extraPrefs);
|
addAllTests(extraData, extraPrefs);
|
||||||
@@ -219,7 +218,6 @@ extraPrefs = [
|
|||||||
"privacy.resistFingerprinting.reduceTimerPrecision.microseconds",
|
"privacy.resistFingerprinting.reduceTimerPrecision.microseconds",
|
||||||
extraData.RFP_Precision * 1000,
|
extraData.RFP_Precision * 1000,
|
||||||
],
|
],
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
addAllTests(extraData, extraPrefs);
|
addAllTests(extraData, extraPrefs);
|
||||||
@@ -231,5 +229,5 @@ extraData = {
|
|||||||
RFP_Precision: RFP_TIME_ATOM_MS,
|
RFP_Precision: RFP_TIME_ATOM_MS,
|
||||||
Unconditional_Precision: 0.02,
|
Unconditional_Precision: 0.02,
|
||||||
};
|
};
|
||||||
extraPrefs = [["dom.animations-api.timelines.enabled", true]];
|
extraPrefs = [];
|
||||||
addAllTests(extraData, extraPrefs);
|
addAllTests(extraData, extraPrefs);
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1382545
|
|||||||
prefName += reduceTimerPrecision ? "privacy.reduceTimerPrecision " : "";
|
prefName += reduceTimerPrecision ? "privacy.reduceTimerPrecision " : "";
|
||||||
SpecialPowers.pushPrefEnv({"set":
|
SpecialPowers.pushPrefEnv({"set":
|
||||||
[
|
[
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
["privacy.resistFingerprinting", resistFingerprinting],
|
["privacy.resistFingerprinting", resistFingerprinting],
|
||||||
["privacy.reduceTimerPrecision", reduceTimerPrecision],
|
["privacy.reduceTimerPrecision", reduceTimerPrecision],
|
||||||
["privacy.resistFingerprinting.reduceTimerPrecision.microseconds", expectedPrecision],
|
["privacy.resistFingerprinting.reduceTimerPrecision.microseconds", expectedPrecision],
|
||||||
|
|||||||
@@ -64,29 +64,6 @@ const closeAnimationInspector = async function () {
|
|||||||
return gDevTools.closeToolboxForTab(gBrowser.selectedTab);
|
return gDevTools.closeToolboxForTab(gBrowser.selectedTab);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Some animation features are not enabled by default in release/beta channels
|
|
||||||
* yet including parts of the Web Animations API.
|
|
||||||
*/
|
|
||||||
const enableAnimationFeatures = function () {
|
|
||||||
return SpecialPowers.pushPrefEnv({
|
|
||||||
set: [["dom.animations-api.timelines.enabled", true]],
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a new test tab in the browser and load the given url.
|
|
||||||
*
|
|
||||||
* @param {String} url
|
|
||||||
* The url to be loaded in the new tab
|
|
||||||
* @return a promise that resolves to the tab object when the url is loaded
|
|
||||||
*/
|
|
||||||
const _addTab = addTab;
|
|
||||||
addTab = async function (url) {
|
|
||||||
await enableAnimationFeatures();
|
|
||||||
return _addTab(url);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove animated elements from document except given selectors.
|
* Remove animated elements from document except given selectors.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -784,9 +784,6 @@ static KeyframeEffectParams KeyframeEffectParamsFromUnion(
|
|||||||
const KeyframeEffectOptions& options =
|
const KeyframeEffectOptions& options =
|
||||||
KeyframeEffectOptionsFromUnion(aOptions);
|
KeyframeEffectOptionsFromUnion(aOptions);
|
||||||
|
|
||||||
// If dom.animations-api.compositing.enabled is turned off,
|
|
||||||
// iterationComposite and composite are the default value 'replace' in the
|
|
||||||
// dictionary.
|
|
||||||
result.mIterationComposite = options.mIterationComposite;
|
result.mIterationComposite = options.mIterationComposite;
|
||||||
result.mComposite = options.mComposite;
|
result.mComposite = options.mComposite;
|
||||||
|
|
||||||
@@ -1272,8 +1269,6 @@ void KeyframeEffect::GetKeyframes(JSContext* aCx, nsTArray<JSObject*>& aResult,
|
|||||||
keyframe.mTimingFunction.ref().AppendToString(keyframeDict.mEasing);
|
keyframe.mTimingFunction.ref().AppendToString(keyframeDict.mEasing);
|
||||||
} // else if null, leave easing as its default "linear".
|
} // else if null, leave easing as its default "linear".
|
||||||
|
|
||||||
// With the pref off (i.e. dom.animations-api.compositing.enabled:false),
|
|
||||||
// the dictionary-to-JS conversion will skip this member entirely.
|
|
||||||
keyframeDict.mComposite = keyframe.mComposite;
|
keyframeDict.mComposite = keyframe.mComposite;
|
||||||
|
|
||||||
JS::Rooted<JS::Value> keyframeJSValue(aCx);
|
JS::Rooted<JS::Value> keyframeJSValue(aCx);
|
||||||
|
|||||||
@@ -460,9 +460,7 @@ static bool ConvertKeyframeSequence(JSContext* aCx, dom::Document* aDocument,
|
|||||||
keyframe->mOffset.emplace(keyframeDict.mOffset.Value());
|
keyframe->mOffset.emplace(keyframeDict.mOffset.Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StaticPrefs::dom_animations_api_compositing_enabled()) {
|
keyframe->mComposite = keyframeDict.mComposite;
|
||||||
keyframe->mComposite = keyframeDict.mComposite;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Look for additional property-values pairs on the object.
|
// Look for additional property-values pairs on the object.
|
||||||
nsTArray<PropertyValuesPair> propertyValuePairs;
|
nsTArray<PropertyValuesPair> propertyValuePairs;
|
||||||
@@ -1155,26 +1153,23 @@ static void GetKeyframeListFromPropertyIndexedKeyframe(
|
|||||||
//
|
//
|
||||||
// This corresponds to step 5, "Otherwise," branch, substep 12 of
|
// This corresponds to step 5, "Otherwise," branch, substep 12 of
|
||||||
// https://drafts.csswg.org/web-animations/#processing-a-keyframes-argument
|
// https://drafts.csswg.org/web-animations/#processing-a-keyframes-argument
|
||||||
if (StaticPrefs::dom_animations_api_compositing_enabled()) {
|
const FallibleTArray<dom::CompositeOperationOrAuto>* compositeOps = nullptr;
|
||||||
const FallibleTArray<dom::CompositeOperationOrAuto>* compositeOps = nullptr;
|
AutoTArray<dom::CompositeOperationOrAuto, 1> singleCompositeOp;
|
||||||
AutoTArray<dom::CompositeOperationOrAuto, 1> singleCompositeOp;
|
auto& composite = keyframeDict.mComposite;
|
||||||
auto& composite = keyframeDict.mComposite;
|
if (composite.IsCompositeOperationOrAuto()) {
|
||||||
if (composite.IsCompositeOperationOrAuto()) {
|
singleCompositeOp.AppendElement(composite.GetAsCompositeOperationOrAuto());
|
||||||
singleCompositeOp.AppendElement(
|
const FallibleTArray<dom::CompositeOperationOrAuto>& asFallibleArray =
|
||||||
composite.GetAsCompositeOperationOrAuto());
|
singleCompositeOp;
|
||||||
const FallibleTArray<dom::CompositeOperationOrAuto>& asFallibleArray =
|
compositeOps = &asFallibleArray;
|
||||||
singleCompositeOp;
|
} else if (composite.IsCompositeOperationOrAutoSequence()) {
|
||||||
compositeOps = &asFallibleArray;
|
compositeOps = &composite.GetAsCompositeOperationOrAutoSequence();
|
||||||
} else if (composite.IsCompositeOperationOrAutoSequence()) {
|
}
|
||||||
compositeOps = &composite.GetAsCompositeOperationOrAutoSequence();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fill in and repeat as needed.
|
// Fill in and repeat as needed.
|
||||||
if (compositeOps && !compositeOps->IsEmpty()) {
|
if (compositeOps && !compositeOps->IsEmpty()) {
|
||||||
size_t length = compositeOps->Length();
|
size_t length = compositeOps->Length();
|
||||||
for (size_t i = 0; i < aResult.Length(); i++) {
|
for (size_t i = 0; i < aResult.Length(); i++) {
|
||||||
aResult[i].mComposite = compositeOps->ElementAt(i % length);
|
aResult[i].mComposite = compositeOps->ElementAt(i % length);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
prefs = [
|
prefs = [
|
||||||
"dom.animations-api.compositing.enabled=true",
|
|
||||||
"gfx.omta.background-color=true",
|
"gfx.omta.background-color=true",
|
||||||
"layout.css.basic-shape-rect.enabled=true",
|
"layout.css.basic-shape-rect.enabled=true",
|
||||||
"layout.css.basic-shape-xywh.enabled=true",
|
"layout.css.basic-shape-xywh.enabled=true",
|
||||||
|
|||||||
@@ -1571,17 +1571,6 @@ function runTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
W3CTest.runner.expectAssertions(0, 12); // bug 1189015
|
W3CTest.runner.expectAssertions(0, 12); // bug 1189015
|
||||||
setup({explicit_done: true});
|
runTest();
|
||||||
SpecialPowers.pushPrefEnv(
|
|
||||||
{
|
|
||||||
set: [
|
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
function() {
|
|
||||||
runTest();
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
load 1134538.html
|
load 1134538.html
|
||||||
load 1239889-1.html
|
load 1239889-1.html
|
||||||
load 1244595-1.html
|
load 1244595-1.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1216842-1.html
|
load 1216842-1.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1216842-2.html
|
load 1216842-2.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1216842-3.html
|
load 1216842-3.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1216842-4.html
|
load 1216842-4.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1216842-5.html
|
load 1216842-5.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1216842-6.html
|
load 1216842-6.html
|
||||||
load 1272475-1.html
|
load 1272475-1.html
|
||||||
load 1272475-2.html
|
load 1272475-2.html
|
||||||
load 1278485-1.html
|
load 1278485-1.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1277272-1.html
|
load 1277272-1.html
|
||||||
load 1282691-1.html
|
load 1282691-1.html
|
||||||
load 1291413-1.html
|
load 1291413-1.html
|
||||||
load 1291413-2.html
|
load 1291413-2.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1304886-1.html
|
load 1304886-1.html
|
||||||
load 1309198-1.html
|
load 1309198-1.html
|
||||||
load 1322382-1.html
|
load 1322382-1.html
|
||||||
load 1322291-1.html
|
load 1322291-1.html
|
||||||
load 1322291-2.html
|
load 1322291-2.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1323114-1.html
|
load 1323114-1.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1323114-2.html
|
load 1323114-2.html
|
||||||
load 1323119-1.html
|
load 1323119-1.html
|
||||||
load 1324554-1.html
|
load 1324554-1.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1325193-1.html
|
load 1325193-1.html
|
||||||
load 1332588-1.html
|
load 1332588-1.html
|
||||||
load 1330190-1.html
|
load 1330190-1.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1330190-2.html
|
load 1330190-2.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1330513-1.html
|
load 1330513-1.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1333539-1.html
|
load 1333539-1.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1333539-2.html
|
load 1333539-2.html
|
||||||
load 1334582-1.html
|
load 1334582-1.html
|
||||||
load 1334582-2.html
|
load 1334582-2.html
|
||||||
load 1334583-1.html
|
load 1334583-1.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1335998-1.html
|
load 1335998-1.html
|
||||||
load 1343589-1.html
|
load 1343589-1.html
|
||||||
load 1359658-1.html
|
load 1359658-1.html
|
||||||
load 1373712-1.html
|
load 1373712-1.html
|
||||||
@@ -41,7 +41,7 @@ load 1379606-1.html
|
|||||||
load 1393605-1.html
|
load 1393605-1.html
|
||||||
load 1400022-1.html
|
load 1400022-1.html
|
||||||
load 1401809.html
|
load 1401809.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1411318-1.html
|
load 1411318-1.html
|
||||||
load 1468294-1.html
|
load 1468294-1.html
|
||||||
load 1467277-1.html
|
load 1467277-1.html
|
||||||
load 1524480-1.html
|
load 1524480-1.html
|
||||||
@@ -57,6 +57,6 @@ load 1633486.html
|
|||||||
pref(layout.animation.prerender.partial,true) load 1656419.html
|
pref(layout.animation.prerender.partial,true) load 1656419.html
|
||||||
load 1706157.html
|
load 1706157.html
|
||||||
pref(gfx.omta.background-color,true) load 1699890.html
|
pref(gfx.omta.background-color,true) load 1699890.html
|
||||||
pref(dom.animations-api.timelines.enabled,true) load 1714421.html
|
load 1714421.html
|
||||||
load 1807966.html
|
load 1807966.html
|
||||||
load 1875441.html
|
load 1875441.html
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
prefs = [
|
prefs = [
|
||||||
"dom.animations-api.compositing.enabled=true",
|
|
||||||
"dom.animations-api.timelines.enabled=true",
|
|
||||||
"gfx.omta.background-color=true",
|
"gfx.omta.background-color=true",
|
||||||
"layout.css.scroll-driven-animations.enabled=true",
|
"layout.css.scroll-driven-animations.enabled=true",
|
||||||
"gfx.font_loader.delay=0",
|
"gfx.font_loader.delay=0",
|
||||||
@@ -12,8 +10,6 @@ support-files = [
|
|||||||
"chrome/file_animate_xrays.html",
|
"chrome/file_animate_xrays.html",
|
||||||
"mozilla/xhr_doc.html",
|
"mozilla/xhr_doc.html",
|
||||||
"mozilla/file_deferred_start.html",
|
"mozilla/file_deferred_start.html",
|
||||||
"mozilla/file_disable_animations_api_compositing.html",
|
|
||||||
"mozilla/file_disable_animations_api_timelines.html",
|
|
||||||
"mozilla/file_discrete_animations.html",
|
"mozilla/file_discrete_animations.html",
|
||||||
"mozilla/file_transition_finish_on_compositor.html",
|
"mozilla/file_transition_finish_on_compositor.html",
|
||||||
"../../../layout/style/test/property_database.js",
|
"../../../layout/style/test/property_database.js",
|
||||||
@@ -32,10 +28,6 @@ support-files = [
|
|||||||
["mozilla/test_deferred_start.html"]
|
["mozilla/test_deferred_start.html"]
|
||||||
skip-if = ["os == 'win' && bits == 64"] # Bug 1363957
|
skip-if = ["os == 'win' && bits == 64"] # Bug 1363957
|
||||||
|
|
||||||
["mozilla/test_disable_animations_api_compositing.html"]
|
|
||||||
|
|
||||||
["mozilla/test_disable_animations_api_timelines.html"]
|
|
||||||
|
|
||||||
["mozilla/test_disabled_properties.html"]
|
["mozilla/test_disabled_properties.html"]
|
||||||
|
|
||||||
["mozilla/test_discrete_animations.html"]
|
["mozilla/test_discrete_animations.html"]
|
||||||
|
|||||||
@@ -1,137 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<meta charset=utf-8>
|
|
||||||
<script src="../testcommon.js"></script>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const anim = addDiv(t).animate(
|
|
||||||
{ marginLeft: ['0px', '10px'] },
|
|
||||||
{
|
|
||||||
duration: 100 * MS_PER_SEC,
|
|
||||||
iterations: 10,
|
|
||||||
iterationComposite: 'accumulate',
|
|
||||||
composite: 'add',
|
|
||||||
}
|
|
||||||
);
|
|
||||||
assert_false(
|
|
||||||
'iterationComposite' in anim.effect,
|
|
||||||
'The KeyframeEffect.iterationComposite member is not present'
|
|
||||||
);
|
|
||||||
assert_false(
|
|
||||||
'composite' in anim.effect,
|
|
||||||
'The KeyframeEffect.composite member is not present'
|
|
||||||
);
|
|
||||||
}, 'The iterationComposite and composite members are not present on Animation'
|
|
||||||
+ ' when the compositing pref is disabled');
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const div = addDiv(t);
|
|
||||||
const anim = div.animate(
|
|
||||||
{ marginLeft: ['0px', '10px'] },
|
|
||||||
{
|
|
||||||
duration: 100 * MS_PER_SEC,
|
|
||||||
iterations: 10,
|
|
||||||
iterationComposite: 'accumulate',
|
|
||||||
}
|
|
||||||
);
|
|
||||||
anim.pause();
|
|
||||||
anim.currentTime = 200 * MS_PER_SEC;
|
|
||||||
|
|
||||||
assert_equals(
|
|
||||||
getComputedStyle(div).marginLeft,
|
|
||||||
'0px',
|
|
||||||
'Animated style should NOT accumulate'
|
|
||||||
);
|
|
||||||
}, 'KeyframeEffectOptions.iterationComposite should be ignored if the'
|
|
||||||
+ ' compositing pref is disabled');
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const div = addDiv(t);
|
|
||||||
const anim1 = div.animate(
|
|
||||||
{ marginLeft: ['0px', '100px'] },
|
|
||||||
{ duration: 100 * MS_PER_SEC }
|
|
||||||
);
|
|
||||||
anim1.pause();
|
|
||||||
anim1.currentTime = 50 * MS_PER_SEC;
|
|
||||||
|
|
||||||
const anim2 = div.animate(
|
|
||||||
{ marginLeft: ['0px', '100px'] },
|
|
||||||
{ duration: 100 * MS_PER_SEC, composite: 'add' }
|
|
||||||
);
|
|
||||||
anim2.pause();
|
|
||||||
anim2.currentTime = 50 * MS_PER_SEC;
|
|
||||||
|
|
||||||
assert_equals(
|
|
||||||
getComputedStyle(div).marginLeft,
|
|
||||||
'50px',
|
|
||||||
'Animations should NOT add together'
|
|
||||||
);
|
|
||||||
}, 'KeyframeEffectOptions.composite should be ignored if the'
|
|
||||||
+ ' compositing pref is disabled');
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const div = addDiv(t);
|
|
||||||
const anim1 = div.animate({ marginLeft: ['0px', '100px'] }, 100 * MS_PER_SEC);
|
|
||||||
anim1.pause();
|
|
||||||
anim1.currentTime = 50 * MS_PER_SEC;
|
|
||||||
|
|
||||||
const anim2 = div.animate(
|
|
||||||
[
|
|
||||||
{ marginLeft: '0px', composite: 'add' },
|
|
||||||
{ marginLeft: '100px', composite: 'add' },
|
|
||||||
],
|
|
||||||
100 * MS_PER_SEC
|
|
||||||
);
|
|
||||||
anim2.pause();
|
|
||||||
anim2.currentTime = 50 * MS_PER_SEC;
|
|
||||||
|
|
||||||
assert_equals(
|
|
||||||
getComputedStyle(div).marginLeft,
|
|
||||||
'50px',
|
|
||||||
'Animations should NOT add together'
|
|
||||||
);
|
|
||||||
}, 'composite member is ignored on keyframes when using array notation');
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const div = addDiv(t);
|
|
||||||
const anim1 = div.animate(
|
|
||||||
{ marginLeft: ['0px', '100px'] },
|
|
||||||
100 * MS_PER_SEC
|
|
||||||
);
|
|
||||||
anim1.pause();
|
|
||||||
anim1.currentTime = 50 * MS_PER_SEC;
|
|
||||||
|
|
||||||
const anim2 = div.animate(
|
|
||||||
{ marginLeft: ['0px', '100px'], composite: ['add', 'add'] },
|
|
||||||
100 * MS_PER_SEC
|
|
||||||
);
|
|
||||||
anim2.pause();
|
|
||||||
anim2.currentTime = 50 * MS_PER_SEC;
|
|
||||||
|
|
||||||
assert_equals(
|
|
||||||
getComputedStyle(div).marginLeft,
|
|
||||||
'50px',
|
|
||||||
'Animations should NOT add together'
|
|
||||||
);
|
|
||||||
}, 'composite member is ignored on keyframes when using object notation');
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const anim = addDiv(t).animate(
|
|
||||||
{ marginLeft: ['0px', '10px'] },
|
|
||||||
100 * MS_PER_SEC
|
|
||||||
);
|
|
||||||
|
|
||||||
for (let frame of anim.effect.getKeyframes()) {
|
|
||||||
assert_false(
|
|
||||||
'composite' in frame,
|
|
||||||
'The BaseComputedKeyframe.composite member is not present'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}, 'composite member is hidden from the result of ' +
|
|
||||||
'KeyframeEffect::getKeyframes()');
|
|
||||||
|
|
||||||
done();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<meta charset=utf-8>
|
|
||||||
<script src="../testcommon.js"></script>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
assert_false(
|
|
||||||
window.hasOwnProperty('DocumentTimeline'),
|
|
||||||
'DocumentTimeline should not be exposed on the global'
|
|
||||||
);
|
|
||||||
assert_false(
|
|
||||||
window.hasOwnProperty('AnimationTimeline'),
|
|
||||||
'AnimationTimeline should not be exposed on the global'
|
|
||||||
);
|
|
||||||
assert_false(
|
|
||||||
'timeline' in document,
|
|
||||||
'document should not have a timeline property'
|
|
||||||
);
|
|
||||||
|
|
||||||
const anim = addDiv(t).animate(null);
|
|
||||||
assert_false(
|
|
||||||
'timeline' in anim,
|
|
||||||
'Animation should not have a timeline property'
|
|
||||||
);
|
|
||||||
}, 'Timeline-related interfaces and members are disabled');
|
|
||||||
|
|
||||||
done();
|
|
||||||
</script>
|
|
||||||
@@ -6,14 +6,5 @@
|
|||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
setup({explicit_done: true});
|
setup({explicit_done: true});
|
||||||
SpecialPowers.pushPrefEnv(
|
window.open("file_deferred_start.html");
|
||||||
{
|
|
||||||
set: [
|
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
function() {
|
|
||||||
window.open("file_deferred_start.html");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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.compositing.enabled", false]]},
|
|
||||||
function() {
|
|
||||||
window.open("file_disable_animations_api_compositing.html");
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,16 +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.timelines.enabled', false]] },
|
|
||||||
function() {
|
|
||||||
window.open('file_disable_animations_api_timelines.html');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
@@ -4475,15 +4475,6 @@ bool Document::AllowsL10n() const {
|
|||||||
return allowed;
|
return allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Document::AreWebAnimationsTimelinesEnabled(JSContext* aCx,
|
|
||||||
JSObject* /*unused*/
|
|
||||||
) {
|
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
|
||||||
|
|
||||||
return nsContentUtils::IsSystemCaller(aCx) ||
|
|
||||||
StaticPrefs::dom_animations_api_timelines_enabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
DocumentTimeline* Document::Timeline() {
|
DocumentTimeline* Document::Timeline() {
|
||||||
if (!mDocumentTimeline) {
|
if (!mDocumentTimeline) {
|
||||||
mDocumentTimeline = new DocumentTimeline(this, TimeDuration(0));
|
mDocumentTimeline = new DocumentTimeline(this, TimeDuration(0));
|
||||||
|
|||||||
@@ -3417,8 +3417,6 @@ class Document : public nsINode,
|
|||||||
mozilla::dom::HTMLAllCollection* All();
|
mozilla::dom::HTMLAllCollection* All();
|
||||||
|
|
||||||
static bool DocumentSupportsL10n(JSContext* aCx, JSObject* aObject);
|
static bool DocumentSupportsL10n(JSContext* aCx, JSObject* aObject);
|
||||||
static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx,
|
|
||||||
JSObject* aObject);
|
|
||||||
// Checks that the caller is either chrome or some addon.
|
// Checks that the caller is either chrome or some addon.
|
||||||
static bool IsCallerChromeOrAddon(JSContext* aCx, JSObject* aObject);
|
static bool IsCallerChromeOrAddon(JSContext* aCx, JSObject* aObject);
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ function test_getUnanimatedComputedStyle() {
|
|||||||
SpecialPowers.pushPrefEnv(
|
SpecialPowers.pushPrefEnv(
|
||||||
{
|
{
|
||||||
set: [
|
set: [
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
["layout.css.properties-and-values.enabled", true],
|
["layout.css.properties-and-values.enabled", true],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1528,7 +1528,7 @@ interface TestFuncConstructorForInterface {
|
|||||||
constructor();
|
constructor();
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=Window, Func="Document::AreWebAnimationsTimelinesEnabled"]
|
[Exposed=Window, Func="Document::IsCallerChromeOrAddon"]
|
||||||
interface TestFuncConstructorForDifferentFuncInterface {
|
interface TestFuncConstructorForDifferentFuncInterface {
|
||||||
// Since the constructor has a different Func attribute from the interface,
|
// Since the constructor has a different Func attribute from the interface,
|
||||||
// the generated constructor should still check for its conditional func.
|
// the generated constructor should still check for its conditional func.
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ interface Animation : EventTarget {
|
|||||||
[Pure]
|
[Pure]
|
||||||
attribute AnimationEffect? effect;
|
attribute AnimationEffect? effect;
|
||||||
// Bug 1676794. Drop BinaryName once we support ScrollTimeline interface.
|
// Bug 1676794. Drop BinaryName once we support ScrollTimeline interface.
|
||||||
[Func="Document::AreWebAnimationsTimelinesEnabled",
|
[BinaryName="timelineFromJS"]
|
||||||
BinaryName="timelineFromJS"]
|
|
||||||
attribute AnimationTimeline? timeline;
|
attribute AnimationTimeline? timeline;
|
||||||
|
|
||||||
[BinaryName="startTimeAsDouble"]
|
[BinaryName="startTimeAsDouble"]
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Func="Document::AreWebAnimationsTimelinesEnabled",
|
[Exposed=Window]
|
||||||
Exposed=Window]
|
|
||||||
interface AnimationTimeline {
|
interface AnimationTimeline {
|
||||||
[BinaryName="currentTimeAsDouble"]
|
[BinaryName="currentTimeAsDouble"]
|
||||||
readonly attribute double? currentTime;
|
readonly attribute double? currentTime;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ dictionary BasePropertyIndexedKeyframe {
|
|||||||
dictionary BaseKeyframe {
|
dictionary BaseKeyframe {
|
||||||
double? offset = null;
|
double? offset = null;
|
||||||
UTF8String easing = "linear";
|
UTF8String easing = "linear";
|
||||||
[Pref="dom.animations-api.compositing.enabled"]
|
|
||||||
CompositeOperationOrAuto composite = "auto";
|
CompositeOperationOrAuto composite = "auto";
|
||||||
|
|
||||||
// Non-standard extensions
|
// Non-standard extensions
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ partial interface Document {
|
|||||||
|
|
||||||
// https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
|
// https://drafts.csswg.org/web-animations/#extensions-to-the-document-interface
|
||||||
partial interface Document {
|
partial interface Document {
|
||||||
[Func="Document::AreWebAnimationsTimelinesEnabled"]
|
|
||||||
readonly attribute DocumentTimeline timeline;
|
readonly attribute DocumentTimeline timeline;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ dictionary DocumentTimelineOptions {
|
|||||||
DOMHighResTimeStamp originTime = 0;
|
DOMHighResTimeStamp originTime = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Func="Document::AreWebAnimationsTimelinesEnabled",
|
[Exposed=Window]
|
||||||
Exposed=Window]
|
|
||||||
interface DocumentTimeline : AnimationTimeline {
|
interface DocumentTimeline : AnimationTimeline {
|
||||||
[Throws]
|
[Throws]
|
||||||
constructor(optional DocumentTimelineOptions options = {});
|
constructor(optional DocumentTimelineOptions options = {});
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ enum IterationCompositeOperation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
dictionary KeyframeEffectOptions : EffectTiming {
|
dictionary KeyframeEffectOptions : EffectTiming {
|
||||||
[Pref="dom.animations-api.compositing.enabled"]
|
|
||||||
IterationCompositeOperation iterationComposite = "replace";
|
IterationCompositeOperation iterationComposite = "replace";
|
||||||
[Pref="dom.animations-api.compositing.enabled"]
|
|
||||||
CompositeOperation composite = "replace";
|
CompositeOperation composite = "replace";
|
||||||
DOMString? pseudoElement = null;
|
DOMString? pseudoElement = null;
|
||||||
};
|
};
|
||||||
@@ -36,9 +34,7 @@ interface KeyframeEffect : AnimationEffect {
|
|||||||
|
|
||||||
attribute Element? target;
|
attribute Element? target;
|
||||||
[SetterThrows] attribute DOMString? pseudoElement;
|
[SetterThrows] attribute DOMString? pseudoElement;
|
||||||
[Pref="dom.animations-api.compositing.enabled"]
|
|
||||||
attribute IterationCompositeOperation iterationComposite;
|
attribute IterationCompositeOperation iterationComposite;
|
||||||
[Pref="dom.animations-api.compositing.enabled"]
|
|
||||||
attribute CompositeOperation composite;
|
attribute CompositeOperation composite;
|
||||||
[Throws] sequence<object> getKeyframes();
|
[Throws] sequence<object> getKeyframes();
|
||||||
[Throws] undefined setKeyframes(object? keyframes);
|
[Throws] undefined setKeyframes(object? keyframes);
|
||||||
|
|||||||
@@ -26,21 +26,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1135764
|
|||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}
|
||||||
addLoadEvent(function() {
|
addLoadEvent(function() {
|
||||||
SpecialPowers.pushPrefEnv(
|
var ifr = document.querySelector("iframe");
|
||||||
{
|
ifr.onload = function() {
|
||||||
set: [
|
startTimelineValue = frames[0].document.timeline.currentTime;
|
||||||
["dom.animations-api.timelines.enabled", true],
|
frames[0].requestAnimationFrame(waitATick);
|
||||||
],
|
};
|
||||||
},
|
ifr.src = "file_bug1135764.xml";
|
||||||
function() {
|
|
||||||
var ifr = document.querySelector("iframe");
|
|
||||||
ifr.onload = function() {
|
|
||||||
startTimelineValue = frames[0].document.timeline.currentTime;
|
|
||||||
frames[0].requestAnimationFrame(waitATick);
|
|
||||||
};
|
|
||||||
ifr.src = "file_bug1135764.xml";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ add_task(async function setup_pref() {
|
|||||||
// To avoid throttling requestAnimationFrame callbacks in invisible
|
// To avoid throttling requestAnimationFrame callbacks in invisible
|
||||||
// iframes
|
// iframes
|
||||||
["layout.throttled_frame_rate", 60],
|
["layout.throttled_frame_rate", 60],
|
||||||
["dom.animations-api.timelines.enabled", true],
|
|
||||||
// Next two prefs are needed for hit-testing to work
|
// Next two prefs are needed for hit-testing to work
|
||||||
["test.events.async.enabled", true],
|
["test.events.async.enabled", true],
|
||||||
["apz.test.logging_enabled", true],
|
["apz.test.logging_enabled", true],
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
== stacking-context-transform-changing-effect-on-table.html stacking-context-animation-on-table-ref.html
|
== stacking-context-transform-changing-effect-on-table.html stacking-context-animation-on-table-ref.html
|
||||||
== stacking-context-transform-changing-display-property.html stacking-context-animation-ref.html
|
== stacking-context-transform-changing-display-property.html stacking-context-animation-ref.html
|
||||||
== stacking-context-transform-losing-css-animation-in-delay.html stacking-context-animation-ref.html
|
== stacking-context-transform-losing-css-animation-in-delay.html stacking-context-animation-ref.html
|
||||||
test-pref(dom.animations-api.compositing.enabled,true) == style-updates-on-iteration-composition-changed-from-accumulate-to-replace.html style-updates-for-iteration-composite-ref.html
|
== style-updates-on-iteration-composition-changed-from-accumulate-to-replace.html style-updates-for-iteration-composite-ref.html
|
||||||
test-pref(dom.animations-api.compositing.enabled,true) == style-updates-on-iteration-composition-changed-from-replace-to-accumulate.html style-updates-for-iteration-composite-ref.html
|
== style-updates-on-iteration-composition-changed-from-replace-to-accumulate.html style-updates-for-iteration-composite-ref.html
|
||||||
test-pref(dom.animations-api.compositing.enabled,true) == style-updates-on-current-iteration-changed.html style-updates-for-iteration-composite-ref.html
|
== style-updates-on-current-iteration-changed.html style-updates-for-iteration-composite-ref.html
|
||||||
== cancel-animation-with-selector-matching.html about:blank
|
== cancel-animation-with-selector-matching.html about:blank
|
||||||
== child-in-animating-element-display-none.html child-in-animating-element-display-none-ref.html
|
== child-in-animating-element-display-none.html child-in-animating-element-display-none-ref.html
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ load 1381420-1.html
|
|||||||
load 1381682.html
|
load 1381682.html
|
||||||
load 1382672.html
|
load 1382672.html
|
||||||
load 1382710.html
|
load 1382710.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1383493-1.html
|
load 1383493-1.html
|
||||||
load 1383001.html
|
load 1383001.html
|
||||||
load 1383001-2.html
|
load 1383001-2.html
|
||||||
load 1383319.html
|
load 1383319.html
|
||||||
@@ -225,7 +225,7 @@ load 1393791.html
|
|||||||
load 1384232.html
|
load 1384232.html
|
||||||
load 1395725.html
|
load 1395725.html
|
||||||
load 1396041.html
|
load 1396041.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1397363-1.html
|
load 1397363-1.html
|
||||||
load 1395719.html
|
load 1395719.html
|
||||||
load 1397091.html
|
load 1397091.html
|
||||||
load 1398479.html
|
load 1398479.html
|
||||||
@@ -317,4 +317,4 @@ load 1639533.html
|
|||||||
pref(layout.accessiblecaret.enabled,true) load 1640040.html
|
pref(layout.accessiblecaret.enabled,true) load 1640040.html
|
||||||
load 1806189-1.html
|
load 1806189-1.html
|
||||||
pref(layout.css.scroll-driven-animations.enabled,true) load 1821416.html
|
pref(layout.css.scroll-driven-animations.enabled,true) load 1821416.html
|
||||||
pref(dom.animations-api.compositing.enabled,true) load 1872309.html
|
load 1872309.html
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
prefs = [
|
prefs = [
|
||||||
"dom.animations-api.compositing.enabled=true",
|
|
||||||
"dom.animations-api.timelines.enabled=true",
|
|
||||||
"gfx.omta.background-color=true",
|
"gfx.omta.background-color=true",
|
||||||
"gfx.font_loader.delay=0",
|
"gfx.font_loader.delay=0",
|
||||||
"layout.css.motion-path-url.enabled=true",
|
"layout.css.motion-path-url.enabled=true",
|
||||||
|
|||||||
@@ -2226,18 +2226,6 @@
|
|||||||
value: true
|
value: true
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
# Is support for composite operations from the Web Animations API enabled?
|
|
||||||
- name: dom.animations-api.compositing.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
|
|
||||||
value: true
|
|
||||||
mirror: always
|
|
||||||
|
|
||||||
# Is support for Navigator.getBattery enabled?
|
# Is support for Navigator.getBattery enabled?
|
||||||
- name: dom.battery.enabled
|
- name: dom.battery.enabled
|
||||||
type: bool
|
type: bool
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
prefs: [dom.animations-api.compositing.enabled:true, layout.css.transition-behavior.enabled:true]
|
prefs: [layout.css.transition-behavior.enabled:true]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
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]
|
prefs: [layout.css.marker.restricted:false, layout.css.animation-composition.enabled:true, layout.css.properties-and-values.enabled:true]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
prefs: [dom.animations-api.compositing.enabled:true, layout.css.backdrop-filter.enabled:true, layout.css.transform-box-content-stroke.enabled:true]
|
prefs: [layout.css.backdrop-filter.enabled:true, layout.css.transform-box-content-stroke.enabled:true]
|
||||||
leak-threshold: [default:51200]
|
leak-threshold: [default:51200]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
prefs: [dom.animations-api.compositing.enabled:true, dom.animations-api.timelines.enabled:true, layout.css.marker.restricted:false, layout.css.starting-style-at-rules.enabled:true]
|
prefs: [layout.css.marker.restricted:false, layout.css.starting-style-at-rules.enabled:true]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
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]
|
prefs: [layout.css.marker.restricted:false, layout.css.properties-and-values.enabled:true]
|
||||||
|
|||||||
Reference in New Issue
Block a user