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 486980 60db9b299c06923183b4f4ec8e3b1d1dc66af4f3
parent 486979 a2401754d3f2715a489e9ac11c3581044d8b0b2b
child 486981 e5c057002cca946db349e4e8d430bbb11f57d294
push id46109
push userbmo:boris.chiou@gmail.com
push dateMon, 20 Feb 2017 11:01:51 +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;