Bug 1334036 - Part 7: Skip EnsureBaseStyle to avoid using Gecko StyleSet. draft
authorBoris Chiou <boris.chiou@gmail.com>
Sun, 19 Feb 2017 16:38:27 +0800
changeset 486707 8afd73c66fc8ee5578c38aaece14d12ae1210147
parent 486706 f3b475a6304a59cfb51da376a6ef9ae4abc20ed6
child 486708 dfd936e63caa15f9497793250280c6de010303e6
child 486711 930c66eba3847bde797d15d1516c37674e1b65a8
push id46040
push userbmo:boris.chiou@gmail.com
push dateSun, 19 Feb 2017 11:09:25 +0000
bugs1334036
milestone54.0a1
Bug 1334036 - Part 7: Skip EnsureBaseStyle to avoid using Gecko StyleSet. MozReview-Commit-ID: 8DFxGSF91kp
dom/animation/KeyframeEffectReadOnly.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -281,19 +281,22 @@ KeyframeEffectReadOnly::UpdateProperties
   MOZ_DIAGNOSTIC_ASSERT(!mIsComposingStyle,
                         "Should not be called while processing ComposeStyle()");
   if (mIsComposingStyle) {
     return;
   }
 
   nsTArray<AnimationProperty> properties = BuildProperties(aStyleContext);
 
+  // FIXME (bug 1329878): Do this for servo too.
   // We need to update base styles even if any properties are not changed at all
   // since base styles might have been changed due to parent style changes, etc.
-  EnsureBaseStyles(aStyleContext, properties);
+  if (aStyleContext->PresContext()->StyleSet()->IsGecko()) {
+    EnsureBaseStyles(aStyleContext, properties);
+  }
 
   if (mProperties == properties) {
     return;
   }
 
   // Preserve the state of the mIsRunningOnCompositor flag.
   nsCSSPropertyIDSet runningOnCompositorProperties;