Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE
authorAndreea Pavel <apavel@mozilla.com>
Tue, 27 Nov 2018 15:33:29 +0200
changeset 507467 20898bcaaa0069be066b088fde0262169fc71261
parent 507466 2fd8827b99434692acfb05a0c5b82649936eb124
child 507468 1255d7d52439c8fbd3b3edaeddcb201036a575fa
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1504065
milestone65.0a1
backs out1291883702312b5ca9c44983121ac39fd2b8bdf6
359e81b35cfb72928457964fcf1c826db1404818
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE Backed out changeset 129188370231 (bug 1504065) Backed out changeset 359e81b35cfb (bug 1504065)
dom/animation/KeyframeEffect.cpp
dom/animation/test/chrome/test_running_on_compositor.html
dom/animation/test/mochitest.ini
dom/base/nsDOMWindowUtils.cpp
gfx/layers/AnimationHelper.cpp
gfx/layers/AnimationHelper.h
gfx/layers/composite/AsyncCompositionManager.cpp
gfx/layers/ipc/LayersMessages.ipdlh
layout/painting/nsDisplayList.cpp
layout/painting/nsDisplayList.h
layout/style/LayerAnimationInfo.cpp
layout/style/LayerAnimationInfo.h
layout/style/ServoBindings.h
layout/style/StyleAnimationValue.cpp
layout/style/StyleAnimationValue.h
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/test/animation_utils.js
layout/style/test/mochitest.ini
layout/style/test/test_animations_omta.html
modules/libpref/init/StaticPrefList.h
servo/components/style/properties/longhands/background.mako.rs
servo/ports/geckolib/glue.rs
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -1889,32 +1889,15 @@ KeyframeEffect::IsMatchForCompositor(
 
   // If we know that the animation is not visible, we don't need to send the
   // animation to the compositor.
   if (!aFrame->IsVisibleOrMayHaveVisibleDescendants() ||
       aFrame->IsScrolledOutOfView()) {
     return KeyframeEffect::MatchForCompositor::NoAndBlockThisProperty;
   }
 
-  if (aProperty == eCSSProperty_background_color) {
-    if (!StaticPrefs::gfx_omta_background_color()) {
-      return KeyframeEffect::MatchForCompositor::No;
-    }
-
-    if (nsIContent* content = aFrame->GetContent()) {
-      RefPtr<layers::LayerManager> layerManager =
-        nsContentUtils::LayerManagerForContent(content);
-      if (layerManager &&
-          layerManager->GetBackendType() == layers::LayersBackend::LAYERS_WR) {
-        // Bug 1510030: We don't yet support background-color animations on the
-        // compositor for WebRender.
-        return KeyframeEffect::MatchForCompositor::No;
-      }
-    }
-  }
-
   return mAnimation->IsPlaying()
          ? KeyframeEffect::MatchForCompositor::Yes
          : KeyframeEffect::MatchForCompositor::IfNeeded;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/animation/test/chrome/test_running_on_compositor.html
+++ b/dom/animation/test/chrome/test_running_on_compositor.html
@@ -45,19 +45,17 @@ div {
   target="_blank">Mozilla Bug 1045994</a>
 <div id="log"></div>
 <script>
 'use strict';
 
 /** Test for bug 1045994 - Add a chrome-only property to inspect if an
     animation is running on the compositor or not **/
 
-const omtaEnabled = isOMTAEnabled();
-const isWebRender =
-  SpecialPowers.DOMWindowUtils.layerManagerType == 'WebRender';
+var omtaEnabled = isOMTAEnabled();
 
 function assert_animation_is_running_on_compositor(animation, desc) {
   assert_equals(animation.isRunningOnCompositor, omtaEnabled,
                 desc + ' at ' + animation.currentTime + 'ms');
 }
 
 function assert_animation_is_not_running_on_compositor(animation, desc) {
   assert_equals(animation.isRunningOnCompositor, false,
@@ -985,46 +983,10 @@ promise_test(async t => {
   }
 
   await waitForPaints();
 
   assert_animation_is_running_on_compositor(animation,
     'Transform animation on table element should be running on the compositor');
 }, 'Transform animation on table element runs on the compositor');
 
-promise_test(async t => {
-  const div = addDiv(t);
-  const animation = div.animate({ backgroundColor: ['blue', 'green'] },
-                                100 * MS_PER_SEC);
-
-  await waitForAnimationReadyToRestyle(animation);
-  await waitForPaints();
-
-  if (!isWebRender) {
-    assert_animation_is_running_on_compositor(animation,
-      'background-color animation should be running on the compositor');
-  } else {
-    assert_animation_is_not_running_on_compositor(animation,
-      'background-color animation is not yet able to run on the compositor ' +
-      'on WebRender');
-  }
-}, 'backgound-color animation runs on the compositor');
-
-promise_test(async t => {
-  await SpecialPowers.pushPrefEnv({
-    set: [["gfx.omta.background-color", false]]
-  });
-
-  const div = addDiv(t);
-  const animation = div.animate({ backgroundColor: ['blue', 'green'] },
-                                100 * MS_PER_SEC);
-
-  await waitForAnimationReadyToRestyle(animation);
-  await waitForPaints();
-
-  assert_animation_is_not_running_on_compositor(animation,
-    'background-color animation should NOT be running on the compositor ' +
-    'if the pref is disabled');
-}, 'backgound-color animation does not run on the compositor if the pref ' +
-   'is disabled');
-
 </script>
 </body>
--- a/dom/animation/test/mochitest.ini
+++ b/dom/animation/test/mochitest.ini
@@ -1,16 +1,15 @@
 [DEFAULT]
 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
-  gfx.omta.background-color=true
   layout.css.motion-path.enabled=true
   layout.css.individual-transform.enabled=true
 # Support files for chrome tests that we want to load over HTTP need
 # to go in here, not chrome.ini.
 support-files =
   chrome/file_animate_xrays.html
   mozilla/xhr_doc.html
   mozilla/file_deferred_start.html
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -3715,24 +3715,16 @@ nsDOMWindowUtils::GetOMTAStyle(Element* 
       }
     } else if (aProperty.EqualsLiteral("transform")) {
       OMTAValue value = GetOMTAValue(frame,
                                      DisplayItemType::TYPE_TRANSFORM,
                                      GetWebRenderBridge());
       if (value.type() == OMTAValue::TMatrix4x4) {
         cssValue = nsComputedDOMStyle::MatrixToCSSValue(value.get_Matrix4x4());
       }
-    } else if (aProperty.EqualsLiteral("background-color")) {
-      OMTAValue value = GetOMTAValue(frame,
-                                     DisplayItemType::TYPE_BACKGROUND_COLOR,
-                                     GetWebRenderBridge());
-      if (value.type() == OMTAValue::Tnscolor) {
-        cssValue = new nsROCSSPrimitiveValue;
-        nsComputedDOMStyle::SetToRGBAColor(cssValue, value.get_nscolor());
-      }
     }
   }
 
   if (cssValue) {
     nsString text;
     ErrorResult rv;
     cssValue->GetCssText(text, rv);
     aResult.Assign(text);
--- a/gfx/layers/AnimationHelper.cpp
+++ b/gfx/layers/AnimationHelper.cpp
@@ -50,19 +50,16 @@ CompositorAnimationStorage::GetOMTAValue
 {
   OMTAValue omtaValue = mozilla::null_t();
   auto animatedValue = GetAnimatedValue(aId);
   if (!animatedValue) {
     return omtaValue;
   }
 
   switch (animatedValue->mType) {
-    case AnimatedValue::COLOR:
-      omtaValue = animatedValue->mColor;
-      break;
     case AnimatedValue::OPACITY:
       omtaValue = animatedValue->mOpacity;
       break;
     case AnimatedValue::TRANSFORM: {
       gfx::Matrix4x4 transform = animatedValue->mTransform.mFrameTransform;
       const TransformData& data = animatedValue->mTransform.mData;
       float scale = data.appUnitsPerDevPixel();
       gfx::Point3D transformOrigin = data.transformOrigin();
@@ -117,28 +114,16 @@ CompositorAnimationStorage::SetAnimatedV
   const TransformData dontCare = {};
   SetAnimatedValue(aId,
                    std::move(aTransformInDevSpace),
                    gfx::Matrix4x4(),
                    dontCare);
 }
 
 void
-CompositorAnimationStorage::SetAnimatedValue(uint64_t aId, nscolor aColor)
-{
-  MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
-  auto count = mAnimatedValues.Count();
-  AnimatedValue* value = mAnimatedValues.LookupOrAdd(aId, aColor);
-  if (count == mAnimatedValues.Count()) {
-    MOZ_ASSERT(value->mType == AnimatedValue::COLOR);
-    value->mColor = aColor;
-  }
-}
-
-void
 CompositorAnimationStorage::SetAnimatedValue(uint64_t aId,
                                              const float& aOpacity)
 {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
   auto count = mAnimatedValues.Count();
   AnimatedValue* value = mAnimatedValues.LookupOrAdd(aId, aOpacity);
   if (count == mAnimatedValues.Count()) {
     MOZ_ASSERT(value->mType == AnimatedValue::OPACITY);
@@ -529,17 +514,17 @@ CreateCSSValueList(const InfallibleTArra
   if (aFunctions.Length() == 0) {
     result = new nsCSSValueList();
     result->mValue.SetNoneValue();
   }
   return new nsCSSValueSharedList(result.forget());
 }
 
 static already_AddRefed<RawServoAnimationValue>
-ToAnimationValue(nsCSSPropertyID aProperty, const Animatable& aAnimatable)
+ToAnimationValue(const Animatable& aAnimatable)
 {
   RefPtr<RawServoAnimationValue> result;
 
   switch (aAnimatable.type()) {
     case Animatable::Tnull_t:
       break;
     case Animatable::TArrayOfTransformFunction: {
       const InfallibleTArray<TransformFunction>& transforms =
@@ -550,20 +535,16 @@ ToAnimationValue(nsCSSPropertyID aProper
         MOZ_ASSERT(list, "Transform list should be non null");
         result = Servo_AnimationValue_Transform(*list).Consume();
       }
       break;
     }
     case Animatable::Tfloat:
       result = Servo_AnimationValue_Opacity(aAnimatable.get_float()).Consume();
       break;
-    case Animatable::Tnscolor:
-      result = Servo_AnimationValue_Color(aProperty,
-                                          aAnimatable.get_nscolor()).Consume();
-      break;
     default:
       MOZ_ASSERT_UNREACHABLE("Unsupported type");
   }
   return result.forget();
 }
 
 void
 AnimationHelper::SetAnimations(
@@ -594,18 +575,17 @@ AnimationHelper::SetAnimations(
           animation.fillMode() = static_cast<uint8_t>(dom::FillMode::Both);
         }
         break;
       default:
         break;
     }
 
     if (animation.baseStyle().type() != Animatable::Tnull_t) {
-      aBaseAnimationStyle = ToAnimationValue(animation.property(),
-                                             animation.baseStyle());
+      aBaseAnimationStyle = ToAnimationValue(animation.baseStyle());
     }
 
     AnimData* data = aAnimData.AppendElement();
 
     data->mTiming = TimingParams {
       animation.duration(),
       animation.delay(),
       animation.endDelay(),
@@ -620,20 +600,18 @@ AnimationHelper::SetAnimations(
       data->mFunctions;
     InfallibleTArray<RefPtr<RawServoAnimationValue>>& startValues =
       data->mStartValues;
     InfallibleTArray<RefPtr<RawServoAnimationValue>>& endValues =
       data->mEndValues;
 
     const InfallibleTArray<AnimationSegment>& segments = animation.segments();
     for (const AnimationSegment& segment : segments) {
-      startValues.AppendElement(ToAnimationValue(animation.property(),
-                                                 segment.startState()));
-      endValues.AppendElement(ToAnimationValue(animation.property(),
-                                               segment.endState()));
+      startValues.AppendElement(ToAnimationValue(segment.startState()));
+      endValues.AppendElement(ToAnimationValue(segment.endState()));
 
       TimingFunction tf = segment.sampleFn();
       Maybe<ComputedTimingFunction> ctf =
         AnimationUtils::TimingFunctionToComputedTimingFunction(tf);
       functions.AppendElement(ctf);
     }
   }
 }
--- a/gfx/layers/AnimationHelper.h
+++ b/gfx/layers/AnimationHelper.h
@@ -50,24 +50,22 @@ struct AnimationTransform {
   gfx::Matrix4x4 mFrameTransform;
   TransformData mData;
 };
 
 struct AnimatedValue {
   enum {
     TRANSFORM,
     OPACITY,
-    COLOR,
     NONE
   } mType {NONE};
 
   union {
     AnimationTransform mTransform;
     float mOpacity;
-    nscolor mColor;
   };
 
   AnimatedValue(gfx::Matrix4x4&& aTransformInDevSpace,
                 gfx::Matrix4x4&& aFrameTransform,
                 const TransformData& aData)
     : mType(AnimatedValue::TRANSFORM)
     , mOpacity(0.0)
   {
@@ -77,22 +75,16 @@ struct AnimatedValue {
   }
 
   explicit AnimatedValue(const float& aValue)
     : mType(AnimatedValue::OPACITY)
     , mOpacity(aValue)
   {
   }
 
-  explicit AnimatedValue(nscolor aValue)
-    : mType(AnimatedValue::COLOR)
-    , mColor(aValue)
-  {
-  }
-
   ~AnimatedValue() {}
 
 private:
   AnimatedValue() = delete;
 };
 
 // CompositorAnimationStorage stores the animations and animated values
 // keyed by a CompositorAnimationsId. The "animations" are a representation of
@@ -132,21 +124,16 @@ public:
                         gfx::Matrix4x4&& aTransformInDevSpace);
 
   /**
    * Set the animation opacity based on the unique id
    */
   void SetAnimatedValue(uint64_t aId, const float& aOpacity);
 
   /**
-   * Set the animation color based on the unique id
-   */
-  void SetAnimatedValue(uint64_t aId, nscolor aColor);
-
-  /**
    * Return the animated value if a given id can map to its animated value
    */
   AnimatedValue* GetAnimatedValue(const uint64_t& aId) const;
 
   OMTAValue GetOMTAValue(const uint64_t& aId) const;
 
   /**
    * Return the iterator of animated value table
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -628,29 +628,16 @@ ApplyAnimatedValue(Layer* aLayer,
 {
   if (!aValue) {
     // Return gracefully if we have no valid AnimationValue.
     return;
   }
 
   HostLayer* layerCompositor = aLayer->AsHostLayer();
   switch (aProperty) {
-    case eCSSProperty_background_color: {
-      // We don't support 'color' animations on the compositor yet so we never
-      // meet currentColor on the compositor.
-      nscolor color = Servo_AnimationValue_GetColor(aValue, NS_RGBA(0, 0, 0, 0));
-      aLayer->AsColorLayer()->SetColor(gfx::Color::FromABGR(color));
-      aStorage->SetAnimatedValue(aLayer->GetCompositorAnimationsId(), color);
-
-      layerCompositor->SetShadowOpacity(aLayer->GetOpacity());
-      layerCompositor->SetShadowOpacitySetByAnimation(false);
-      layerCompositor->SetShadowBaseTransform(aLayer->GetBaseTransform());
-      layerCompositor->SetShadowTransformSetByAnimation(false);
-      break;
-    }
     case eCSSProperty_opacity: {
       float opacity = Servo_AnimationValue_GetOpacity(aValue);
       layerCompositor->SetShadowOpacity(opacity);
       layerCompositor->SetShadowOpacitySetByAnimation(true);
       aStorage->SetAnimatedValue(aLayer->GetCompositorAnimationsId(), opacity);
 
       layerCompositor->SetShadowBaseTransform(aLayer->GetBaseTransform());
       layerCompositor->SetShadowTransformSetByAnimation(false);
@@ -717,32 +704,29 @@ SampleAnimations(Layer* aLayer,
                                aStorage,
                                animation.property(),
                                animation.data(),
                                animationValue);
             break;
           }
           case AnimationHelper::SampleResult::Skipped:
             switch (animations[0].property()) {
-              case eCSSProperty_background_color:
               case eCSSProperty_opacity: {
-                if (animations[0].property() == eCSSProperty_opacity) {
-                  MOZ_ASSERT(
-                    layer->AsHostLayer()->GetShadowOpacitySetByAnimation());
+                MOZ_ASSERT(
+                  layer->AsHostLayer()->GetShadowOpacitySetByAnimation());
 #ifdef DEBUG
-                  // Disable this assertion until the root cause is fixed in bug
-                  // 1459775.
-                  // MOZ_ASSERT(FuzzyEqualsMultiplicative(
-                  //   Servo_AnimationValue_GetOpacity(animationValue),
-                  //   *(aStorage->GetAnimationOpacity(layer->GetCompositorAnimationsId()))));
+                // Disable this assertion until the root cause is fixed in bug
+                // 1459775.
+                // MOZ_ASSERT(FuzzyEqualsMultiplicative(
+                //   Servo_AnimationValue_GetOpacity(animationValue),
+                //   *(aStorage->GetAnimationOpacity(layer->GetCompositorAnimationsId()))));
 #endif
-                }
-                // Even if opacity or background-color  animation value has
-                // unchanged, we have to set the shadow base transform value
-                // here since the value might have been changed by APZC.
+                // Even if opacity animation value has unchanged, we have to set
+                // the shadow base transform value here since the value might
+                // have been changed by APZC.
                 HostLayer* layerCompositor = layer->AsHostLayer();
                 layerCompositor->SetShadowBaseTransform(
                   layer->GetBaseTransform());
                 layerCompositor->SetShadowTransformSetByAnimation(false);
                 break;
               }
               case eCSSProperty_transform: {
                 MOZ_ASSERT(
--- a/gfx/layers/ipc/LayersMessages.ipdlh
+++ b/gfx/layers/ipc/LayersMessages.ipdlh
@@ -14,17 +14,16 @@ include "mozilla/GfxMessageUtils.h";
 include "ImageLayers.h";
 
 using mozilla::gfx::Glyph from "mozilla/gfx/2D.h";
 using mozilla::gfx::SamplingFilter from "mozilla/gfx/2D.h";
 using struct mozilla::gfx::Color from "mozilla/gfx/2D.h";
 using struct mozilla::gfx::Point3D from "mozilla/gfx/Point.h";
 using mozilla::gfx::IntPoint from "mozilla/gfx/Point.h";
 using class mozilla::gfx::Matrix4x4 from "mozilla/gfx/Matrix.h";
-using nscolor from "nsColor.h";
 using nscoord from "nsCoord.h";
 using struct nsRect from "nsRect.h";
 using struct nsPoint from "nsPoint.h";
 using class mozilla::TimeDuration from "mozilla/TimeStamp.h";
 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
 using mozilla::ScreenRotation from "mozilla/WidgetUtils.h";
 using nsCSSPropertyID from "nsCSSPropertyID.h";
 using hal::ScreenOrientation from "mozilla/HalScreenConfiguration.h";
@@ -156,17 +155,16 @@ union TransformFunction {
 union MaybeTimeDuration {
   null_t;
   TimeDuration;
 };
 
 union Animatable {
   null_t;
   float;
-  nscolor;
   TransformFunction[];
 };
 
 struct AnimationSegment {
   Animatable startState;
   Animatable endState;
   float startPortion;
   float endPortion;
@@ -562,15 +560,14 @@ struct TransactionInfo
 
 union MaybeTransform {
   Matrix4x4;
   void_t;
 };
 
 union OMTAValue {
   null_t;
-  nscolor;
   float;
   Matrix4x4;
 };
 
 } // namespace
 } // namespace
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -433,33 +433,16 @@ SetAnimatable(nsCSSPropertyID aProperty,
   MOZ_ASSERT(aFrame);
 
   if (aAnimationValue.IsNull()) {
     aAnimatable = null_t();
     return;
   }
 
   switch (aProperty) {
-    case eCSSProperty_background_color: {
-      // We don't support color animation on the compositor yet so that we can
-      // resolve currentColor at this moment.
-      nscolor foreground;
-      if (aFrame->Style()->RelevantLinkVisited()) {
-        if (ComputedStyle* styleIfVisited =
-              aFrame->Style()->GetStyleIfVisited()) {
-          foreground = styleIfVisited->StyleColor()->mColor;
-        } else {
-          foreground = aFrame->Style()->StyleColor()->mColor;
-        }
-      } else {
-        foreground = aFrame->Style()->StyleColor()->mColor;
-      }
-      aAnimatable = aAnimationValue.GetColor(foreground);
-      break;
-    }
     case eCSSProperty_opacity:
       aAnimatable = aAnimationValue.GetOpacity();
       break;
     case eCSSProperty_transform: {
       aAnimatable = InfallibleTArray<TransformFunction>();
       MOZ_ASSERT(aAnimationValue.mServo);
       RefPtr<nsCSSValueSharedList> list;
       Servo_AnimationValue_GetTransform(aAnimationValue.mServo, &list);
@@ -685,17 +668,17 @@ AddAnimationsForProperty(nsIFrame* aFram
 
     data = TransformData(origin,
                          offsetToTransformOrigin,
                          bounds,
                          devPixelsToAppUnits,
                          scaleX,
                          scaleY,
                          hasPerspectiveParent);
-  } else {
+  } else if (aProperty == eCSSProperty_opacity) {
     data = null_t();
   }
 
   MOZ_ASSERT(
     nsCSSProps::PropHasFlags(aProperty, CSSPropFlags::CanAnimateOnCompositor),
     "inconsistent property flags");
 
   // Add from first to last (since last overrides)
@@ -3541,17 +3524,16 @@ nsDisplaySolidColor::GetBounds(nsDisplay
 LayerState
 nsDisplaySolidColor::GetLayerState(nsDisplayListBuilder* aBuilder,
                                    LayerManager* aManager,
                                    const ContainerLayerParameters& aParameters)
 {
   if (ForceActiveLayers()) {
     return LAYER_ACTIVE;
   }
-
   return LAYER_NONE;
 }
 
 already_AddRefed<Layer>
 nsDisplaySolidColor::BuildLayer(
   nsDisplayListBuilder* aBuilder,
   LayerManager* aManager,
   const ContainerLayerParameters& aContainerParameters)
@@ -5035,22 +5017,16 @@ nsDisplayBackgroundColor::GetLayerState(
   LayerManager* aManager,
   const ContainerLayerParameters& aParameters)
 {
   StyleGeometryBox clip =
     mBackgroundStyle->StyleBackground()->mImage.mLayers[0].mClip;
   if (ForceActiveLayers() && clip != StyleGeometryBox::Text) {
     return LAYER_ACTIVE;
   }
-
-  if (EffectCompositor::HasAnimationsForCompositor(
-        mFrame, eCSSProperty_background_color)) {
-    return LAYER_ACTIVE_FORCE;
-  }
-
   return LAYER_NONE;
 }
 
 already_AddRefed<Layer>
 nsDisplayBackgroundColor::BuildLayer(
   nsDisplayListBuilder* aBuilder,
   LayerManager* aManager,
   const ContainerLayerParameters& aContainerParameters)
@@ -5068,21 +5044,16 @@ nsDisplayBackgroundColor::BuildLayer(
   }
   layer->SetColor(mColor);
 
   int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
   layer->SetBounds(mBackgroundRect.ToNearestPixels(appUnitsPerDevPixel));
   layer->SetBaseTransform(gfx::Matrix4x4::Translation(
     aContainerParameters.mOffset.x, aContainerParameters.mOffset.y, 0));
 
-  nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(
-    layer, aBuilder,
-    this, mFrame,
-    eCSSProperty_background_color);
-
   return layer.forget();
 }
 
 bool
 nsDisplayBackgroundColor::CreateWebRenderCommands(
   mozilla::wr::DisplayListBuilder& aBuilder,
   mozilla::wr::IpcResourceUpdateQueue& aResources,
   const StackingContextHelper& aSc,
@@ -8595,24 +8566,16 @@ nsDisplayOpacity::CanUseAsyncAnimations(
 }
 
 bool
 nsDisplayTransform::CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder)
 {
   return mAllowAsyncAnimation;
 }
 
-bool
-nsDisplayBackgroundColor::CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder)
-{
-  LayerManager* layerManager = aBuilder->GetWidgetLayerManager();
-  return layerManager &&
-         layerManager->GetBackendType() != layers::LayersBackend::LAYERS_WR;
-}
-
 /* static */ auto
 nsDisplayTransform::ShouldPrerenderTransformedContent(
   nsDisplayListBuilder* aBuilder,
   nsIFrame* aFrame,
   nsRect* aDirtyRect) -> PrerenderDecision
 {
   // Elements whose transform has been modified recently, or which
   // have a compositor-animated transform, can be prerendered. An element
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -5069,18 +5069,16 @@ public:
     if (aFrame == mDependentFrame) {
       mDependentFrame = nullptr;
     }
     nsDisplayItem::RemoveFrame(aFrame);
   }
 
   void WriteDebugInfo(std::stringstream& aStream) override;
 
-  bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) override;
-
 protected:
   const nsRect mBackgroundRect;
   RefPtr<mozilla::ComputedStyle> mBackgroundStyle;
   nsIFrame* mDependentFrame;
   mozilla::gfx::Color mColor;
 
   struct
   {
--- a/layout/style/LayerAnimationInfo.cpp
+++ b/layout/style/LayerAnimationInfo.cpp
@@ -9,27 +9,24 @@
 #include "nsCSSProps.h" // For nsCSSProps::PropHasFlags
 #include "nsCSSPropertyIDSet.h" // For nsCSSPropertyIDSet::CompositorAnimatable
 
 namespace mozilla {
 
 /* static */ const Array<DisplayItemType,
                          nsCSSPropertyIDSet::CompositorAnimatableCount()>
   LayerAnimationInfo::sDisplayItemTypes = {
-    DisplayItemType::TYPE_BACKGROUND_COLOR,
     DisplayItemType::TYPE_OPACITY,
     DisplayItemType::TYPE_TRANSFORM,
   };
 
 /* static */ DisplayItemType
 LayerAnimationInfo::GetDisplayItemTypeForProperty(nsCSSPropertyID aProperty)
 {
   switch (aProperty) {
-    case eCSSProperty_background_color:
-      return DisplayItemType::TYPE_BACKGROUND_COLOR;
     case eCSSProperty_opacity:
       return DisplayItemType::TYPE_OPACITY;
     case eCSSProperty_transform:
       return DisplayItemType::TYPE_TRANSFORM;
     default:
       break;
   }
   return DisplayItemType::TYPE_ZERO;
--- a/layout/style/LayerAnimationInfo.h
+++ b/layout/style/LayerAnimationInfo.h
@@ -29,23 +29,19 @@ struct LayerAnimationInfo {
   // be animated on the compositor.
   static inline const nsCSSPropertyIDSet&
   GetCSSPropertiesFor(DisplayItemType aDisplayItemType)
   {
     static const nsCSSPropertyIDSet transformProperties =
       nsCSSPropertyIDSet{ eCSSProperty_transform };
     static const nsCSSPropertyIDSet opacityProperties =
       nsCSSPropertyIDSet{ eCSSProperty_opacity };
-    static const nsCSSPropertyIDSet backgroundColorProperties =
-      nsCSSPropertyIDSet{ eCSSProperty_background_color };
     static const nsCSSPropertyIDSet empty = nsCSSPropertyIDSet();
 
     switch (aDisplayItemType) {
-      case DisplayItemType::TYPE_BACKGROUND_COLOR:
-        return backgroundColorProperties;
       case DisplayItemType::TYPE_OPACITY:
         return opacityProperties;
       case DisplayItemType::TYPE_TRANSFORM:
         return transformProperties;
       default:
         MOZ_ASSERT_UNREACHABLE("Should not be called for display item types "
                                "that are not able to have animations on the "
                                "compositor");
@@ -57,18 +53,16 @@ struct LayerAnimationInfo {
   // |aDisplayItemType|.
   //
   // This function works only for display items tied to CSS properties that can
   // be animated on the compositor.
   static inline nsChangeHint
   GetChangeHintFor(DisplayItemType aDisplayItemType)
   {
     switch (aDisplayItemType) {
-      case DisplayItemType::TYPE_BACKGROUND_COLOR:
-        return nsChangeHint_RepaintFrame;
       case DisplayItemType::TYPE_OPACITY:
         return nsChangeHint_UpdateOpacityLayer;
       case DisplayItemType::TYPE_TRANSFORM:
         return nsChangeHint_UpdateTransformLayer;
       default:
         MOZ_ASSERT_UNREACHABLE("Should not be called for display item types "
                                "that are not able to have animations on the "
                                "compositor");
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -671,21 +671,16 @@ double Servo_AnimationValues_ComputeDist
   RawServoAnimationValueBorrowed from,
   RawServoAnimationValueBorrowed to);
 
 void Servo_AnimationValue_Serialize(
   RawServoAnimationValueBorrowed value,
   nsCSSPropertyID property,
   nsAString* buffer);
 
-nscolor Servo_AnimationValue_GetColor(RawServoAnimationValueBorrowed value,
-                                      nscolor foregroundColor);
-RawServoAnimationValueStrong Servo_AnimationValue_Color(nsCSSPropertyID,
-                                                        nscolor);
-
 float Servo_AnimationValue_GetOpacity(RawServoAnimationValueBorrowed value);
 RawServoAnimationValueStrong Servo_AnimationValue_Opacity(float);
 
 void Servo_AnimationValue_GetTransform(
   RawServoAnimationValueBorrowed value,
   RefPtr<nsCSSValueSharedList>* list);
 
 RawServoAnimationValueStrong Servo_AnimationValue_Transform(
--- a/layout/style/StyleAnimationValue.cpp
+++ b/layout/style/StyleAnimationValue.cpp
@@ -115,23 +115,16 @@ AnimationValue::operator!=(const Animati
 
 float
 AnimationValue::GetOpacity() const
 {
   MOZ_ASSERT(mServo);
   return Servo_AnimationValue_GetOpacity(mServo);
 }
 
-nscolor
-AnimationValue::GetColor(nscolor aForegroundColor) const
-{
-  MOZ_ASSERT(mServo);
-  return Servo_AnimationValue_GetColor(mServo, aForegroundColor);
-}
-
 already_AddRefed<const nsCSSValueSharedList>
 AnimationValue::GetTransformList() const
 {
   MOZ_ASSERT(mServo);
 
   RefPtr<nsCSSValueSharedList> transform;
   Servo_AnimationValue_GetTransform(mServo, &transform);
   return transform.forget();
--- a/layout/style/StyleAnimationValue.h
+++ b/layout/style/StyleAnimationValue.h
@@ -73,20 +73,16 @@ struct AnimationValue
 
   bool IsNull() const
   {
     return !mServo;
   }
 
   float GetOpacity() const;
 
-  // Returns nscolor value in this AnimationValue.
-  // Currently only background-color is supported.
-  nscolor GetColor(nscolor aForegroundColor) const;
-
   // Return the transform list as a RefPtr.
   already_AddRefed<const nsCSSValueSharedList> GetTransformList() const;
 
   // Return the scale for mServo, which is calculated with reference to aFrame.
   mozilla::gfx::Size GetScaleValue(const nsIFrame* aFrame) const;
 
   // Uncompute this AnimationValue and then serialize it.
   void SerializeSpecifiedValue(nsCSSPropertyID aProperty,
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1112,17 +1112,17 @@ nsComputedDOMStyle::DoGetBinding()
 }
 
 already_AddRefed<CSSValue>
 nsComputedDOMStyle::DoGetBottom()
 {
   return GetOffsetWidthFor(eSideBottom);
 }
 
-/* static */ void
+void
 nsComputedDOMStyle::SetToRGBAColor(nsROCSSPrimitiveValue* aValue,
                                    nscolor aColor)
 {
   nsAutoString string;
   const bool hasAlpha = NS_GET_A(aColor) != 255;
   if (hasAlpha) {
     string.AppendLiteral("rgba(");
   } else {
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -126,17 +126,16 @@ public:
                                      mozilla::MutationClosureData*) override;
   virtual nsIDocument* DocToUpdate() override;
 
   nsDOMCSSDeclaration::ParsingEnvironment
   GetParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
 
   static already_AddRefed<nsROCSSPrimitiveValue>
     MatrixToCSSValue(const mozilla::gfx::Matrix4x4& aMatrix);
-  static void SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor);
 
   static void RegisterPrefChangeCallbacks();
   static void UnregisterPrefChangeCallbacks();
 
   // nsIMutationObserver
   NS_DECL_NSIMUTATIONOBSERVER_PARENTCHAINCHANGED
 
 private:
@@ -424,16 +423,17 @@ private:
   already_AddRefed<CSSValue> DoGetPaintOrder();
 
 
   // For working around a MSVC bug. See related comment in
   // GenerateComputedDOMStyleGenerated.py.
   already_AddRefed<CSSValue> DummyGetter();
 
   /* Helper functions */
+  void SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor);
   void SetValueFromComplexColor(nsROCSSPrimitiveValue* aValue,
                                 const mozilla::StyleComplexColor& aColor);
   void SetValueToPositionCoord(const mozilla::Position::Coord& aCoord,
                                nsROCSSPrimitiveValue* aValue);
   void SetValueToPosition(const mozilla::Position& aPosition,
                           nsDOMCSSValueList* aValueList);
   void SetValueToURLValue(const mozilla::css::URLValue* aURL,
                           nsROCSSPrimitiveValue* aValue);
--- a/layout/style/test/animation_utils.js
+++ b/layout/style/test/animation_utils.js
@@ -417,40 +417,29 @@ const ExpectComparisonTo = {
   };
 
   // Many callers of this method will pass 'undefined' for
   // expectedComparisonResult.
   window.omta_is_approx = function(elem, property, expected, tolerance,
                                    runningOn, desc, expectedComparisonResult,
                                    pseudo) {
     // Check input
-    // FIXME: Auto generate this array.
-    const omtaProperties = [ "transform", "opacity", "background-color" ];
+    const omtaProperties = [ "transform", "opacity" ];
     if (!omtaProperties.includes(property)) {
       ok(false, property + " is not an OMTA property");
       return;
     }
-    var normalize;
-    var compare;
-    var normalizedToString = JSON.stringify;
-    switch (property) {
-      case "transform":
-        normalize = convertTo3dMatrix;
-        compare = matricesRoughlyEqual;
-        normalizedToString = convert3dMatrixToString;
-        break;
-      case "opacity":
-        normalize = parseFloat;
-        compare = function(a, b, error) { return Math.abs(a - b) <= error; };
-        break;
-      default:
-        normalize = function(value) { return value; };
-        compare = function(a, b, error) { return a == b; };
-        break;
-    }
+    var isTransform = property == "transform";
+    var normalize = isTransform ? convertTo3dMatrix : parseFloat;
+    var compare = isTransform ?
+                  matricesRoughlyEqual :
+                  function(a, b, error) { return Math.abs(a - b) <= error; };
+    var normalizedToString = isTransform ?
+                             convert3dMatrixToString :
+                             JSON.stringify;
 
     // Get actual values
     var compositorStr =
       SpecialPowers.DOMWindowUtils.getOMTAStyle(elem, property, pseudo);
     var computedStr = window.getComputedStyle(elem, pseudo)[property];
 
     // Prepare expected value
     var expectedValue = normalize(expected);
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -1,16 +1,15 @@
 [DEFAULT]
 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
-  gfx.omta.background-color=true
   layout.css.step-position-jump.enabled=true
 support-files =
   animation_utils.js
   ccd-quirks.html
   ccd.sjs
   ccd-standards.html
   chrome/bug418986-2.js
   chrome/match.png
--- a/layout/style/test/test_animations_omta.html
+++ b/layout/style/test/test_animations_omta.html
@@ -2386,127 +2386,10 @@ addAsyncAnimTest(async function() {
   // compositor thread.
   await waitForPaints();
   omta_is("transform", { tx: 200 }, RunningOn.MainThread,
           "transition runs on main thread at end of active interval");
 
   done_div();
 });
 
-if (SpecialPowers.DOMWindowUtils.layerManagerType != 'WebRender') {
-  // Normal background-color animation.
-  addAsyncAnimTest(async function() {
-    new_div("background-color: rgb(255, 0, 0); " +
-            "transition: background-color 10s linear");
-    await waitForPaintsFlushed();
-
-    gDiv.style.backgroundColor = "rgb(0, 255, 0)";
-    await waitForPaintsFlushed();
-
-    omta_is("background-color", "rgb(255, 0, 0)", RunningOn.Compositor,
-            "background-color transition runs on compositor thread");
-
-    advance_clock(5000);
-    omta_is("background-color", "rgb(128, 128, 0)", RunningOn.Compositor,
-            "background-color on compositor at 5s");
-
-    done_div();
-  });
-
-  // background-color animation with currentColor.
-  addAsyncAnimTest(async function() {
-    new_div("color: rgb(255, 0, 0); " +
-            "background-color: currentColor; " +
-            "transition: background-color 10s linear");
-    await waitForPaintsFlushed();
-
-    gDiv.style.backgroundColor = "rgb(0, 255, 0)";
-    await waitForPaintsFlushed();
-
-    omta_is("background-color", "rgb(255, 0, 0)", RunningOn.Compositor,
-            "background-color transition starting with current-color runs on " +
-            "compositor thread");
-
-    advance_clock(5000);
-    omta_is("background-color", "rgb(128, 128, 0)", RunningOn.Compositor,
-            "background-color on compositor at 5s");
-
-    done_div();
-  });
-
-  // Tests that a background-color animation from inherited currentColor to
-  // a normal color on the compositor is updated when the parent color is
-  // changed.
-  addAsyncAnimTest(async function() {
-    new_div("");
-    const parent = document.createElement("div");
-    gDiv.parentNode.insertBefore(parent, gDiv);
-    parent.style.color = "rgb(255, 0, 0)";
-    parent.appendChild(gDiv);
-
-    gDiv.animate({ backgroundColor: [ "currentColor", "rgb(0, 255, 0)" ] }, 1000);
-
-    await waitForPaintsFlushed();
-
-    omta_is("background-color", "rgb(255, 0, 0)", RunningOn.Compositor,
-            "background-color animation starting with current-color runs on " +
-            "compositor thread");
-
-    advance_clock(500);
-
-    omta_is("background-color", "rgb(128, 128, 0)", RunningOn.Compositor,
-            "background-color on compositor at 5s");
-
-    // Change the parent's color in the middle of the animation.
-    parent.style.color = "rgb(0, 0, 255)";
-    await waitForPaintsFlushed();
-
-    omta_is("background-color", "rgb(0, 128, 128)", RunningOn.Compositor,
-            "background-color on compositor is reflected by the parent's " +
-            "color change");
-
-    done_div();
-    parent.remove();
-  });
-
-  // Tests that a background-color animation from currentColor to a normal color
-  // on <a> element is updated when the link is visited.
-  addAsyncAnimTest(async function() {
-    [ gDiv ] = new_element("a", "display: block");
-    gDiv.setAttribute("href", "not-exist.html");
-    gDiv.classList.add("visited");
-
-    const extraStyle = document.createElement('style');
-    document.head.appendChild(extraStyle);
-    extraStyle.sheet.insertRule(".visited:visited { color: rgb(0, 0, 255); }", 0);
-    extraStyle.sheet.insertRule(".visited:link { color: rgb(255, 0, 0); }", 1);
-
-    gDiv.animate({ backgroundColor: [ "currentColor", "rgb(0, 255, 0)" ] }, 1000);
-    await waitForPaintsFlushed();
-
-    omta_is("background-color", "rgb(255, 0, 0)", RunningOn.Compositor,
-            "background-color animation starting with current-color runs on " +
-            "compositor thread");
-
-    advance_clock(500);
-
-    omta_is("background-color", "rgb(128, 128, 0)", RunningOn.Compositor,
-            "background-color on compositor at 5s");
-
-    gDiv.setAttribute("href", window.top.location.href);
-    await waitForVisitedLinkColoring(gDiv, "color", "rgb(0, 0, 255)");
-    await waitForPaintsFlushed();
-
-    // `omta_is` checks that the result on the compositor equals to the value by
-    // getComputedValue() but getComputedValue lies for visited link values so
-    // we use getOMTAStyle directly instead.
-    is(SpecialPowers.DOMWindowUtils.getOMTAStyle(gDiv, "background-color"),
-       "rgb(0, 128, 128)",
-       "background-color on <a> element after the link is visited");
-
-    extraStyle.remove();
-    done_element();
-    gDiv = null;
-  });
-}
-
 </script>
 </html>
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -489,28 +489,16 @@ VARCACHE_PREF(
 )
 
 VARCACHE_PREF(
   "gfx.font_ahem_antialias_none",
    gfx_font_ahem_antialias_none,
   RelaxedAtomicBool, false
 )
 
-#ifdef RELEASE_OR_BETA
-# define PREF_VALUE false
-#else
-# define PREF_VALUE true
-#endif
-VARCACHE_PREF(
-  "gfx.omta.background-color",
-   gfx_omta_background_color,
-  bool, PREF_VALUE
-)
-#undef PREF_VALUE
-
 //---------------------------------------------------------------------------
 // HTML5 parser prefs
 //---------------------------------------------------------------------------
 
 // Toggle which thread the HTML5 parser uses for stream parsing.
 VARCACHE_PREF(
   "html5.offmainthread",
    html5_offmainthread,
--- a/servo/components/style/properties/longhands/background.mako.rs
+++ b/servo/components/style/properties/longhands/background.mako.rs
@@ -10,18 +10,17 @@
     "background-color",
     "Color",
     "computed_value::T::transparent()",
     initial_specified_value="SpecifiedValue::transparent()",
     spec="https://drafts.csswg.org/css-backgrounds/#background-color",
     animation_value_type="AnimatedColor",
     ignored_when_colors_disabled=True,
     allow_quirks=True,
-    flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER \
-           CAN_ANIMATE_ON_COMPOSITOR",
+    flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
 )}
 
 ${helpers.predefined_type(
     "background-image",
     "ImageLayer",
     initial_value="Either::First(None_)",
     initial_specified_value="Either::First(None_)",
     spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -793,76 +793,31 @@ pub extern "C" fn Servo_AnimationValue_S
             buffer,
             None,
             None, /* No extra custom properties */
         );
     debug_assert!(rv.is_ok());
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_AnimationValue_GetColor(
-    value: RawServoAnimationValueBorrowed,
-    foreground_color: structs::nscolor,
-) -> structs::nscolor {
-    use style::gecko::values::convert_nscolor_to_rgba;
-    use style::gecko::values::convert_rgba_to_nscolor;
-    use style::values::animated::ToAnimatedValue;
-    use style::values::computed::color::Color as ComputedColor;
-
-    let value = AnimationValue::as_arc(&value);
-    match **value {
-        AnimationValue::BackgroundColor(color) => {
-            let computed: ComputedColor = ToAnimatedValue::from_animated_value(color);
-            let foreground_color = convert_nscolor_to_rgba(foreground_color);
-            convert_rgba_to_nscolor(&computed.to_rgba(foreground_color))
-        }
-        _ => panic!("Other color properties are not supported yet"),
-    }
-}
-
-#[no_mangle]
 pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueBorrowed) -> f32 {
     let value = AnimationValue::as_arc(&value);
     if let AnimationValue::Opacity(opacity) = **value {
         opacity
     } else {
         panic!("The AnimationValue should be Opacity");
     }
 }
 
 #[no_mangle]
 pub extern "C" fn Servo_AnimationValue_Opacity(opacity: f32) -> RawServoAnimationValueStrong {
     Arc::new(AnimationValue::Opacity(opacity)).into_strong()
 }
 
 #[no_mangle]
-pub extern "C" fn Servo_AnimationValue_Color(
-    color_property: nsCSSPropertyID,
-    color: structs::nscolor
-) -> RawServoAnimationValueStrong {
-    use style::gecko::values::convert_nscolor_to_rgba;
-    use style::values::animated::color::RGBA as AnimatedRGBA;
-
-    let property = LonghandId::from_nscsspropertyid(color_property)
-        .expect("We don't have shorthand property animation value");
-
-    let rgba = convert_nscolor_to_rgba(color);
-
-    let animatedRGBA = AnimatedRGBA::new(rgba.red_f32(),
-                                         rgba.green_f32(),
-                                         rgba.blue_f32(),
-                                         rgba.alpha_f32());
-    match property {
-        LonghandId::BackgroundColor =>
-            Arc::new(AnimationValue::BackgroundColor(animatedRGBA.into())).into_strong(),
-        _ => panic!("Should be background-color property"),
-    }
-}
-
-#[no_mangle]
 pub extern "C" fn Servo_AnimationValue_GetTransform(
     value: RawServoAnimationValueBorrowed,
     list: *mut structs::RefPtr<nsCSSValueSharedList>,
 ) {
     let value = AnimationValue::as_arc(&value);
     if let AnimationValue::Transform(ref servo_list) = **value {
         let list = unsafe { &mut *list };
         if servo_list.0.is_empty() {