Bug 1322570 Part 4 - Use GetParentAllowServo() in KeyframeEffectReadOnly::UpdateProperties. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 20 Mar 2017 14:13:01 +0800
changeset 504312 0d7a157692c2e52d068cf600b6c1f2844c30c152
parent 504311 1fab92884b75b658a707f34d7b75eaf3967f5507
child 504313 af997c214f2861aab9d1666e22cf423a11fc85b9
push id50776
push userbmo:tlin@mozilla.com
push dateFri, 24 Mar 2017 06:09:16 +0000
bugs1322570
milestone55.0a1
Bug 1322570 Part 4 - Use GetParentAllowServo() in KeyframeEffectReadOnly::UpdateProperties. Per bug 1322570 Comment 7, we could drop the GetParentAllowServo() when we invoke UpdateProperties() from a SquentialTask, so allow it for now. MozReview-Commit-ID: 52NauGaz4Zv
dom/animation/KeyframeEffectReadOnly.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -301,19 +301,20 @@ KeyframeEffectReadOnly::UpdateProperties
 
   if (!mDocument->IsStyledByServo()) {
     DoUpdateProperties(Move(aStyleContext));
     return;
   }
 
   const ServoComputedValues* currentStyle =
     aStyleContext->StyleSource().AsServoComputedValues();
+  // FIXME: Remove GetParentAllowServo() in Bug 1349004.
   const ServoComputedValues* parentStyle =
-    aStyleContext->GetParent()
-      ? aStyleContext->GetParent()->StyleSource().AsServoComputedValues()
+    aStyleContext->GetParentAllowServo()
+      ? aStyleContext->GetParentAllowServo()->StyleSource().AsServoComputedValues()
       : nullptr;
 
   const ServoComputedValuesWithParent servoValues = { currentStyle, parentStyle };
   DoUpdateProperties(servoValues);
 }
 
 void
 KeyframeEffectReadOnly::UpdateProperties(