From 29963d81bd052f7ab3a417a28923d723b0d0d03c Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sat, 16 Jan 2021 14:29:01 +0000 Subject: [PATCH 01/10] Bump platform version for added features. --- config/milestone.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/milestone.txt b/config/milestone.txt index 6423995849..40b2e6eecf 100644 --- a/config/milestone.txt +++ b/config/milestone.txt @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -4.7.0 \ No newline at end of file +4.8.0 \ No newline at end of file From ad1e2abea1af9620c1370564a76eb2cdd25d8cd6 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 14 Jan 2021 14:46:52 +0000 Subject: [PATCH 02/10] Issue #1689 - Part 1: Add pref for DOM Animation timelines API Default false, no intent to ship for web content. Always enabled for Chrome. --- dom/animation/test/crashtests/crashtests.list | 14 +++++++------- dom/base/nsDocument.cpp | 9 +++++++++ dom/base/nsDocument.h | 2 ++ dom/webidl/Animation.webidl | 2 +- dom/webidl/AnimationTimeline.webidl | 2 +- dom/webidl/Document.webidl | 2 +- dom/webidl/DocumentTimeline.webidl | 2 +- dom/xslt/tests/mochitest/test_bug1135764.html | 2 +- layout/style/test/mochitest.ini | 3 +++ modules/libpref/init/all.js | 1 + 10 files changed, 27 insertions(+), 12 deletions(-) diff --git a/dom/animation/test/crashtests/crashtests.list b/dom/animation/test/crashtests/crashtests.list index f61d7f876e..29b18769aa 100644 --- a/dom/animation/test/crashtests/crashtests.list +++ b/dom/animation/test/crashtests/crashtests.list @@ -1,13 +1,13 @@ pref(dom.animations-api.core.enabled,true) load 1239889-1.html pref(dom.animations-api.core.enabled,true) load 1244595-1.html -pref(dom.animations-api.core.enabled,true) load 1216842-1.html -pref(dom.animations-api.core.enabled,true) load 1216842-2.html -pref(dom.animations-api.core.enabled,true) load 1216842-3.html -pref(dom.animations-api.core.enabled,true) load 1216842-4.html -pref(dom.animations-api.core.enabled,true) load 1216842-5.html -pref(dom.animations-api.core.enabled,true) load 1216842-6.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1216842-1.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1216842-2.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1216842-3.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1216842-4.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1216842-5.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1216842-6.html pref(dom.animations-api.core.enabled,true) load 1272475-1.html pref(dom.animations-api.core.enabled,true) load 1272475-2.html pref(dom.animations-api.core.enabled,true) load 1278485-1.html -pref(dom.animations-api.core.enabled,true) load 1277272-1.html +pref(dom.animations-api.core.enabled,true) pref(dom.animations-api.timelines.enabled,true) load 1277272-1.html pref(dom.animations-api.core.enabled,true) load 1290535-1.html diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 0fed2db01a..4d6579a898 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -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() { diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index 951ed26169..a1fb04c6b0 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -433,6 +433,8 @@ public: static bool IsElementAnimateEnabled(JSContext* aCx, JSObject* aObject); static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject); + static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx, JSObject* aObject); + virtual mozilla::dom::DocumentTimeline* Timeline() override; virtual void GetAnimations( nsTArray>& aAnimations) override; diff --git a/dom/webidl/Animation.webidl b/dom/webidl/Animation.webidl index 615084f752..9fdea5ade2 100644 --- a/dom/webidl/Animation.webidl +++ b/dom/webidl/Animation.webidl @@ -19,7 +19,7 @@ interface Animation : EventTarget { attribute DOMString id; [Func="nsDocument::IsWebAnimationsEnabled", Pure] attribute AnimationEffectReadOnly? effect; - [Func="nsDocument::IsWebAnimationsEnabled"] + [Func="nsDocument::AreWebAnimationsTimelinesEnabled"] attribute AnimationTimeline? timeline; [BinaryName="startTimeAsDouble"] attribute double? startTime; diff --git a/dom/webidl/AnimationTimeline.webidl b/dom/webidl/AnimationTimeline.webidl index fe3d0fb49a..4cf5567ce7 100644 --- a/dom/webidl/AnimationTimeline.webidl +++ b/dom/webidl/AnimationTimeline.webidl @@ -10,7 +10,7 @@ * liability, trademark and document use rules apply. */ -[Func="nsDocument::IsWebAnimationsEnabled"] +[Func="nsDocument::AreWebAnimationsTimelinesEnabled"] interface AnimationTimeline { [BinaryName="currentTimeAsDouble"] readonly attribute double? currentTime; diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index 26985202be..46db008763 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -312,7 +312,7 @@ partial interface Document { // http://w3c.github.io/web-animations/#extensions-to-the-document-interface partial interface Document { - [Func="nsDocument::IsWebAnimationsEnabled"] + [Func="nsDocument::AreWebAnimationsTimelinesEnabled"] readonly attribute DocumentTimeline timeline; [Func="nsDocument::IsWebAnimationsEnabled"] sequence getAnimations(); diff --git a/dom/webidl/DocumentTimeline.webidl b/dom/webidl/DocumentTimeline.webidl index 916b1a4911..f10e2b365d 100644 --- a/dom/webidl/DocumentTimeline.webidl +++ b/dom/webidl/DocumentTimeline.webidl @@ -14,7 +14,7 @@ dictionary DocumentTimelineOptions { DOMHighResTimeStamp originTime = 0; }; -[Func="nsDocument::IsWebAnimationsEnabled", +[Func="nsDocument::AreWebAnimationsTimelinesEnabled", Constructor (optional DocumentTimelineOptions options)] interface DocumentTimeline : AnimationTimeline { }; diff --git a/dom/xslt/tests/mochitest/test_bug1135764.html b/dom/xslt/tests/mochitest/test_bug1135764.html index 5a7410e37a..b1f627c872 100644 --- a/dom/xslt/tests/mochitest/test_bug1135764.html +++ b/dom/xslt/tests/mochitest/test_bug1135764.html @@ -27,7 +27,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1135764 } addLoadEvent(function() { SpecialPowers.pushPrefEnv( - { "set": [[ "dom.animations-api.core.enabled", true]] }, + { "set": [[ "dom.animations-api.timelines.enabled", true]] }, function() { var ifr = document.querySelector("iframe"); ifr.onload = function() { diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini index 01aafefd90..8b36e3e1e8 100644 --- a/layout/style/test/mochitest.ini +++ b/layout/style/test/mochitest.ini @@ -1,4 +1,7 @@ [DEFAULT] +prefs = + dom.animations-api.core.enabled=true + dom.animations-api.timelines.enabled=true support-files = animation_utils.js ccd-quirks.html diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index c8f3314161..0ec38fbbca 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2718,6 +2718,7 @@ pref("dom.animations-api.core.enabled", false); #else pref("dom.animations-api.core.enabled", true); #endif +pref("dom.animations-api.timelines.enabled", false); // Is support for the Element.animate() function (a subset of the Web Animations // API) enabled? From d9693c298c3f22af39126ae38aad5f2605e26175 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 14 Jan 2021 16:05:53 +0000 Subject: [PATCH 03/10] Issue #1689 - Part 2: Add a preference for implicit keyframes This preference controls whether authors are allowed to specify animations without a 0% or 100% keyframe. We intend to ship this but it isn't implemented yet (needs a follow-up) but this preference acts as a safeguard in case we discover we need to disable it once it's implemented. --- dom/animation/KeyframeUtils.cpp | 30 ++++++++++++++++++++---------- dom/animation/test/mochitest.ini | 4 ++++ dom/base/nsDocument.cpp | 9 +++++++++ dom/base/nsDocument.h | 1 + modules/libpref/init/all.js | 1 + 5 files changed, 35 insertions(+), 10 deletions(-) diff --git a/dom/animation/KeyframeUtils.cpp b/dom/animation/KeyframeUtils.cpp index 166f6728ac..540f892d57 100644 --- a/dom/animation/KeyframeUtils.cpp +++ b/dom/animation/KeyframeUtils.cpp @@ -7,6 +7,7 @@ #include "mozilla/AnimationUtils.h" #include "mozilla/ErrorResult.h" #include "mozilla/Move.h" +#include "mozilla/Preferences.h" #include "mozilla/RangedArray.h" #include "mozilla/ServoBindings.h" #include "mozilla/StyleAnimationValue.h" @@ -21,6 +22,7 @@ #include "nsCSSPropertyIDSet.h" #include "nsCSSProps.h" #include "nsCSSPseudoElements.h" // For CSSPseudoElementType +#include "nsDocument.h" #include "nsTArray.h" #include // For std::stable_sort @@ -400,7 +402,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx, ErrorResult& aRv); static bool -RequiresAdditiveAnimation(const nsTArray& aKeyframes, +HasImplicitKeyframeValues(const nsTArray& aKeyframes, nsIDocument* aDocument); static void @@ -467,11 +469,13 @@ KeyframeUtils::GetKeyframesFromObject(JSContext* aCx, // says that if you don't have a keyframe at offset 0 or 1, then you should // synthesize one using an additive zero value when you go to compose style. // Until we implement additive animations we just throw if we encounter any - // set of keyframes that would put us in that situation. + // set of keyframes that would put us in that situation and keyframes aren't + // explicitly force-enabled. - if (RequiresAdditiveAnimation(keyframes, aDocument)) { - aRv.Throw(NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR); + if (!nsDocument::AreWebAnimationsImplicitKeyframesEnabled(aCx, nullptr) && + HasImplicitKeyframeValues(keyframes, aDocument)) { keyframes.Clear(); + aRv.Throw(NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR); } return keyframes; @@ -1330,10 +1334,16 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx, // No animation values for this property. continue; } - if (count == 1) { - // We don't support additive values and so can't support an - // animation that goes from the underlying value to this - // specified value. Throw an exception until we do support this. + if (!Preferences::GetBool("dom.animations-api.implicit-keyframes.enabled") && + count == 1) { + // We don't support implicit keyframes by preference. + aRv.Throw(NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR); + return; + } else if (count == 1) { + // Implicit keyframes isn't implemented yet and so we can't + // support an animation that goes from the underlying value + // to this specified value. + // Throw an exception until we do support this. aRv.Throw(NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR); return; } @@ -1374,7 +1384,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx, * try to detect where we have an invalid value at 0%/100%. */ static bool -RequiresAdditiveAnimation(const nsTArray& aKeyframes, +HasImplicitKeyframeValues(const nsTArray& aKeyframes, nsIDocument* aDocument) { // We are looking to see if that every property referenced in |aKeyframes| @@ -1385,7 +1395,7 @@ RequiresAdditiveAnimation(const nsTArray& aKeyframes, // a document which we might not always have at the point where we want to // perform this check. // - // This is only a temporary measure until we implement additive animation. + // This is only a temporary measure until we implement implicit keyframes. // So as long as this check catches most cases, and we don't do anything // horrible in one of the cases we can't detect, it should be sufficient. diff --git a/dom/animation/test/mochitest.ini b/dom/animation/test/mochitest.ini index db6dffada0..b56136d250 100644 --- a/dom/animation/test/mochitest.ini +++ b/dom/animation/test/mochitest.ini @@ -1,4 +1,8 @@ [DEFAULT] +prefs = + dom.animations-api.core.enabled=true + dom.animations-api.implicit-keyframes.enabled=true + dom.animations-api.timelines.enabled=true # Support files for chrome tests that we want to load over HTTP need # to go in here, not chrome.ini. support-files = diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 4d6579a898..43f11c0313 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -2932,6 +2932,15 @@ nsDocument::AreWebAnimationsTimelinesEnabled(JSContext* /*unused*/, JSObject* /* Preferences::GetBool("dom.animations-api.timelines.enabled"); } +bool +nsDocument::AreWebAnimationsImplicitKeyframesEnabled(JSContext* /*unused*/, JSObject* /*unused*/) +{ + MOZ_ASSERT(NS_IsMainThread()); + + return nsContentUtils::IsCallerChrome() || + Preferences::GetBool("dom.animations-api.implicit-keyframes.enabled"); +} + DocumentTimeline* nsDocument::Timeline() { diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index a1fb04c6b0..f544166c20 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -433,6 +433,7 @@ public: static bool IsElementAnimateEnabled(JSContext* aCx, JSObject* aObject); static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject); + static bool AreWebAnimationsImplicitKeyframesEnabled(JSContext* aCx, JSObject* aObject); static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx, JSObject* aObject); virtual mozilla::dom::DocumentTimeline* Timeline() override; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 0ec38fbbca..4103a2d220 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2719,6 +2719,7 @@ pref("dom.animations-api.core.enabled", false); pref("dom.animations-api.core.enabled", true); #endif pref("dom.animations-api.timelines.enabled", false); +pref("dom.animations-api.implicit-keyframes.enabled", false); // Is support for the Element.animate() function (a subset of the Web Animations // API) enabled? From fdeb68f0b8c7f4ce9bedbb9c97de5f9aafffb5f4 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 14 Jan 2021 17:17:28 +0000 Subject: [PATCH 04/10] Issue #1689 - Part 3: Add a preference for animation composite modes. This feature should not be shipped until the various definitions of addition for each additive property are properly specified and then implemented accordingly. Unlike other patches in this series, compositing is not frequently used internally so there is no need to enable this by default for chrome callers. --- dom/animation/KeyframeEffect.cpp | 5 +++-- dom/animation/test/mochitest.ini | 1 + layout/reftests/web-animations/reftest.list | 6 +++--- modules/libpref/init/all.js | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 90230a5b44..090c7019d7 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -10,6 +10,7 @@ #include "mozilla/dom/AnimationEffectTiming.h" #include "mozilla/dom/KeyframeEffectBinding.h" #include "mozilla/KeyframeUtils.h" +#include "mozilla/Preferences.h" #include "nsContentUtils.h" #include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch #include "nsIScriptError.h" @@ -135,9 +136,9 @@ void KeyframeEffect::SetIterationComposite( const IterationCompositeOperation& aIterationComposite) { - // Ignore iterationComposite if the Web Animations API is not enabled, + // Ignore iterationComposite if the API is not enabled, // then the default value 'Replace' will be used. - if (!AnimationUtils::IsCoreAPIEnabledForCaller()) { + if (!Preferences::GetBool("dom.animations-api.compositing.enabled")) { return; } diff --git a/dom/animation/test/mochitest.ini b/dom/animation/test/mochitest.ini index b56136d250..fff62ac7c9 100644 --- a/dom/animation/test/mochitest.ini +++ b/dom/animation/test/mochitest.ini @@ -1,5 +1,6 @@ [DEFAULT] prefs = + dom.animations-api.compositing.enabled=true dom.animations-api.core.enabled=true dom.animations-api.implicit-keyframes.enabled=true dom.animations-api.timelines.enabled=true diff --git a/layout/reftests/web-animations/reftest.list b/layout/reftests/web-animations/reftest.list index eefd41f49d..da1d07089c 100644 --- a/layout/reftests/web-animations/reftest.list +++ b/layout/reftests/web-animations/reftest.list @@ -15,6 +15,6 @@ test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-ch test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-changing-effect.html stacking-context-animation-ref.html test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-changing-display-property.html stacking-context-animation-ref.html test-pref(dom.animations-api.core.enabled,true) == stacking-context-transform-losing-css-animation-in-delay.html stacking-context-animation-ref.html -test-pref(dom.animations-api.core.enabled,true) == style-updates-on-iteration-composition-changed-from-accumulate-to-replace.html style-updates-for-iteration-composite-ref.html -test-pref(dom.animations-api.core.enabled,true) == style-updates-on-iteration-composition-changed-from-replace-to-accumulate.html style-updates-for-iteration-composite-ref.html -test-pref(dom.animations-api.core.enabled,true) == style-updates-on-current-iteration-changed.html style-updates-for-iteration-composite-ref.html +test-pref(dom.animations-api.core.enabled,true) 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 +test-pref(dom.animations-api.core.enabled,true) 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 +test-pref(dom.animations-api.core.enabled,true) test-pref(dom.animations-api.compositing.enabled,true) == style-updates-on-current-iteration-changed.html style-updates-for-iteration-composite-ref.html diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 4103a2d220..b8cb114580 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2720,6 +2720,7 @@ pref("dom.animations-api.core.enabled", true); #endif pref("dom.animations-api.timelines.enabled", false); pref("dom.animations-api.implicit-keyframes.enabled", false); +pref("dom.animations-api.compositing.enabled", false); // Is support for the Element.animate() function (a subset of the Web Animations // API) enabled? From 15feed4c00235ef32ac9fd04bd7c5ab0dee27932 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 14 Jan 2021 17:43:44 +0000 Subject: [PATCH 05/10] Issue #1689 - Part 4: Add a preference for {Document,Element}.getAnimations() This is probably the last thing we will ship (if ever) since it needs the most spec and implementation work for arbitrary use that is pretty far into a corner. --- dom/animation/test/mochitest.ini | 1 + dom/base/nsDocument.cpp | 9 +++++++++ dom/base/nsDocument.h | 1 + dom/webidl/Animatable.webidl | 2 +- dom/webidl/CSSPseudoElement.webidl | 2 +- dom/webidl/Document.webidl | 2 +- modules/libpref/init/all.js | 5 ++--- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dom/animation/test/mochitest.ini b/dom/animation/test/mochitest.ini index fff62ac7c9..ecdb674fe1 100644 --- a/dom/animation/test/mochitest.ini +++ b/dom/animation/test/mochitest.ini @@ -2,6 +2,7 @@ prefs = dom.animations-api.compositing.enabled=true dom.animations-api.core.enabled=true + dom.animations-api.getAnimations.enabled=true dom.animations-api.implicit-keyframes.enabled=true dom.animations-api.timelines.enabled=true # Support files for chrome tests that we want to load over HTTP need diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 43f11c0313..1c3e7a421f 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -2941,6 +2941,15 @@ nsDocument::AreWebAnimationsImplicitKeyframesEnabled(JSContext* /*unused*/, JSOb Preferences::GetBool("dom.animations-api.implicit-keyframes.enabled"); } +bool +nsDocument::IsWebAnimationsGetAnimationsEnabled(JSContext* /*unused*/, JSObject* /*unused*/) +{ + MOZ_ASSERT(NS_IsMainThread()); + + return nsContentUtils::IsCallerChrome() || + Preferences::GetBool("dom.animations-api.getAnimations.enabled"); +} + DocumentTimeline* nsDocument::Timeline() { diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index f544166c20..010f95ae25 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -435,6 +435,7 @@ public: static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject); static bool AreWebAnimationsImplicitKeyframesEnabled(JSContext* aCx, JSObject* aObject); static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx, JSObject* aObject); + static bool IsWebAnimationsGetAnimationsEnabled(JSContext* aCx, JSObject* aObject); virtual mozilla::dom::DocumentTimeline* Timeline() override; virtual void GetAnimations( diff --git a/dom/webidl/Animatable.webidl b/dom/webidl/Animatable.webidl index 4c1396c995..decc139602 100644 --- a/dom/webidl/Animatable.webidl +++ b/dom/webidl/Animatable.webidl @@ -23,6 +23,6 @@ interface Animatable { [Func="nsDocument::IsElementAnimateEnabled", Throws] Animation animate(object? keyframes, optional UnrestrictedDoubleOrKeyframeAnimationOptions options); - [Func="nsDocument::IsWebAnimationsEnabled"] + [Func="nsDocument::IsWebAnimationsGetAnimationsEnabled"] sequence getAnimations(optional AnimationFilter filter); }; diff --git a/dom/webidl/CSSPseudoElement.webidl b/dom/webidl/CSSPseudoElement.webidl index 96d191e3af..250bef03c5 100644 --- a/dom/webidl/CSSPseudoElement.webidl +++ b/dom/webidl/CSSPseudoElement.webidl @@ -15,7 +15,7 @@ // this interface. // What we implement here is a minimal subset of the two definitions which we // ship behind a pref until the specification issues have been resolved. -[Func="nsDocument::IsWebAnimationsEnabled"] +[Func="nsDocument::IsWebAnimationsGetAnimationsEnabled"] interface CSSPseudoElement { readonly attribute DOMString type; readonly attribute Element parentElement; diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index 46db008763..2ade9a2c9b 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -314,7 +314,7 @@ partial interface Document { partial interface Document { [Func="nsDocument::AreWebAnimationsTimelinesEnabled"] readonly attribute DocumentTimeline timeline; - [Func="nsDocument::IsWebAnimationsEnabled"] + [Func="nsDocument::IsWebAnimationsGetAnimationsEnabled"] sequence getAnimations(); }; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index b8cb114580..ae7f156775 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2710,17 +2710,16 @@ pref("layout.idle_period.required_quiescent_frames", 2); pref("layout.idle_period.time_limit", 1); // Is support for the Web Animations API enabled? -// Before enabling this by default, make sure also CSSPseudoElement interface -// has been spec'ed properly, or we should add a separate pref for -// CSSPseudoElement interface. See Bug 1174575 for further details. #ifdef RELEASE_OR_BETA pref("dom.animations-api.core.enabled", false); #else pref("dom.animations-api.core.enabled", true); #endif + pref("dom.animations-api.timelines.enabled", false); pref("dom.animations-api.implicit-keyframes.enabled", false); pref("dom.animations-api.compositing.enabled", false); +pref("dom.animations-api.getAnimations.enabled", false); // Is support for the Element.animate() function (a subset of the Web Animations // API) enabled? From de538211091f4e50257271db8f563e2b0f760a47 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 14 Jan 2021 19:04:25 +0000 Subject: [PATCH 06/10] Issue #1689 - Part 5: Enable DOM Animations API except the preffed-off parts. This enables the DOM Animations API core functions with the exception of those parts that are either unimplemented or not ready for use, which have been preffed off in this issue's previous parts. Also tag #1319 for enabling a previous RELEASE_OR_BETA shielded API. --- modules/libpref/init/all.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ae7f156775..d8f393e9c5 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2710,11 +2710,7 @@ pref("layout.idle_period.required_quiescent_frames", 2); pref("layout.idle_period.time_limit", 1); // Is support for the Web Animations API enabled? -#ifdef RELEASE_OR_BETA -pref("dom.animations-api.core.enabled", false); -#else pref("dom.animations-api.core.enabled", true); -#endif pref("dom.animations-api.timelines.enabled", false); pref("dom.animations-api.implicit-keyframes.enabled", false); From 82994ebc158e911e0568ffc817234a8796db06d1 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 18 Jan 2021 18:07:28 +0000 Subject: [PATCH 07/10] Issue #1715 - Handle errors when initializing print settings from the printer fails due to a bad printer name or O.S. error. Resolves #1715 --- toolkit/content/browser-content.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index 2276f8a0d1..d6185c5dd2 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -483,8 +483,18 @@ var Printing = { printSettings.printerName = PSSVC.defaultPrinterName; } // First get any defaults from the printer - PSSVC.initPrintSettingsFromPrinter(printSettings.printerName, - printSettings); + try { + PSSVC.initPrintSettingsFromPrinter(printSettings.printerName, + printSettings); + } catch(e) { + // The printer name specified was invalid or there was an O.S. error. + Components.utils.reportError("Invalid printer: " + printSettings.printerName); + Services.prefs.clearUserPref("print.print_printer"); + // Try again with default + printSettings.printerName = PSSVC.defaultPrinterName; + PSSVC.initPrintSettingsFromPrinter(printSettings.printerName, + printSettings); + } // now augment them with any values from last time PSSVC.initPrintSettingsFromPrefs(printSettings, true, printSettings.kInitSaveAll); From 1f54cfa6586288fc6f926e7f9c25a85b51295a5e Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 18 Jan 2021 14:56:32 -0500 Subject: [PATCH 08/10] [Media] Enable AV1 by default if built --- modules/libpref/init/all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index d8f393e9c5..3843d2cc3f 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -580,7 +580,7 @@ pref("media.mediasource.webm.enabled", true); pref("media.mediasource.webm.audio.enabled", true); #ifdef MOZ_AV1 -pref("media.av1.enabled", false); +pref("media.av1.enabled", true); #endif // Use new MediaFormatReader architecture for plain ogg. From 07ca4f6f0327296fd6058a9dfebccd9782a857e1 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 19 Jan 2021 10:04:24 +0000 Subject: [PATCH 09/10] Issue #1630 - Enable W3C pointer events by default. Resolves #1630 --- modules/libpref/init/all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 3843d2cc3f..f88b48f44c 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -4811,7 +4811,7 @@ pref("dom.w3c_touch_events.enabled", 2); #endif // W3C draft pointer events -pref("dom.w3c_pointer_events.enabled", false); +pref("dom.w3c_pointer_events.enabled", true); // W3C pointer events draft pref("dom.w3c_pointer_events.implicit_capture", false); From 78599bd8183e49e58da2e8899b7916ef11c756ac Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 19 Jan 2021 16:54:53 +0000 Subject: [PATCH 10/10] [Basilisk] [SSUAO] Updates for "mainstream" sniffers. --- .../basilisk/branding/shared/uaoverrides.inc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index fdee1c48a7..b53a7208aa 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -15,25 +15,21 @@ pref("@GUAO_PREF@.accounts.firefox.com", "Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@"); pref("@GUAO_PREF@.addons.mozilla.org", "Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@"); -// Required for domains that have proven unresponsive to requests from users +// Required for domains that have proven unresponsive to requests from users (notice a trend...? ;) ) pref("@GUAO_PREF@.youtube.com","Mozilla/5.0 (%OS_SLICE% rv:62.0) @GK_SLICE@ Firefox/62.0 @APP_SLICE@"); -pref("@GUAO_PREF@.gaming.youtube.com","Mozilla/5.0 (%OS_SLICE% rv:62.0) @GK_SLICE@ Firefox/62.0"); pref("@GUAO_PREF@.studio.youtube.com","Mozilla/5.0 (%OS_SLICE% rv:71.0) @GK_SLICE@ Firefox/71.0 @APP_SLICE@"); -pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (%OS_SLICE% rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@"); +pref("@GUAO_PREF@.gaming.youtube.com","Mozilla/5.0 (%OS_SLICE% rv:71.0) @GK_SLICE@ Firefox/71.0 @APP_SLICE@"); +pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (Windows NT 6.1; rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@"); +pref("@GUAO_PREF@.netflximg.net","Mozilla/5.0 (Windows NT 6.1; rv:42.0) @GK_SLICE@ Firefox/42.0 @APP_SLICE@"); +pref("@GUAO_PREF@.google.com","Mozilla/5.0 (%OS_SLICE% rv:71.0) @GK_SLICE@ Firefox/71.0 @APP_SLICE@"); +pref("@GUAO_PREF@.googlevideos.com","Mozilla/5.0 (%OS_SLICE% rv:52.9) @GK_SLICE@ @GRE_VERSION_SLICE@ Firefox/52.9"); -// The never-ending Facebook debacle... - -// UA-Sniffing domains below are pending responses from their operators - temp workaround // Daily motion only likes strict Firefox UAs pref("@GUAO_PREF@.dailymotion.com","Mozilla/5.0 (%OS_SLICE% rv:52.0) @GK_SLICE@ Firefox/52.0"); -// The following requires native mode. Or it blocks.. "too old firefox", breakage, etc. - -// UA-Sniffing domains below have indicated no interest in supporting Pale Moon (BOO!) +// UA-sniffing domains that are "app/vendor-specific" and do not like Basilisk pref("@GUAO_PREF@.whatsapp.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0"); -// UA-sniffing domains that are "app/vendor-specific" and do not like Pale Moon - // The following domains do not like the Goanna slice pref("@GUAO_PREF@.hitbox.tv","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@"); pref("@GUAO_PREF@.yuku.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ @APP_SLICE@");