Bug 1354643 - Part 2: Stop calling Preferences::GetBool() from nsDocument::IsWebAnimationsEnabled(); r=mystor
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 07 Apr 2017 15:46:00 -0400
changeset 559355 9589d89a721f62a842b83f8144cc5981b214c7db
parent 559354 11d850f7f23f05dfdebd8f41c15e8478a0419e94
child 559356 243cca97ee124621d275d076f3d00b7ed68c3c82
push id53058
push userarchaeopteryx@coole-files.de
push dateSun, 09 Apr 2017 21:36:26 +0000
reviewersmystor
bugs1354643
milestone55.0a1
Bug 1354643 - Part 2: Stop calling Preferences::GetBool() from nsDocument::IsWebAnimationsEnabled(); r=mystor
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -3167,17 +3167,17 @@ nsDocument::IsElementAnimateEnabled(JSCo
 }
 
 bool
 nsDocument::IsWebAnimationsEnabled(JSContext* aCx, JSObject* /*unused*/)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   return nsContentUtils::IsSystemCaller(aCx) ||
-         Preferences::GetBool("dom.animations-api.core.enabled");
+         nsContentUtils::AnimationsAPICoreEnabled();
 }
 
 DocumentTimeline*
 nsDocument::Timeline()
 {
   if (!mDocumentTimeline) {
     mDocumentTimeline = new DocumentTimeline(this, TimeDuration(0));
   }