Bug 1381764 - style: More ComputedValuesInner cleanup. r=Manishearth on a CLOSED TREE
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 18 Jul 2017 16:47:13 +0200
changeset 418194 da7429cfbfa50fc74cc8c0f8751005e15e69756b
parent 418193 7c637424657fda5faa60df95464fca545da34df6
child 418195 451baf8146c69cdf34f7798e30ba7f869ed9504b
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersManishearth
bugs1381764
milestone56.0a1
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
Bug 1381764 - style: More ComputedValuesInner cleanup. r=Manishearth on a CLOSED TREE MozReview-Commit-ID: 8rkAP3pMEpD
dom/animation/KeyframeEffectReadOnly.cpp
dom/smil/nsSMILCSSProperty.cpp
layout/style/ServoBindingList.h
layout/style/nsTransitionManager.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -558,17 +558,17 @@ KeyframeEffectReadOnly::EnsureBaseStyle(
           mTarget->mElement,
           nullptr,
           aPresContext,
           nullptr,
           aPseudoType,
           aComputedStyle);
   }
   RefPtr<RawServoAnimationValue> baseValue =
-    Servo_ComputedValues_ExtractAnimationValue(aBaseStyleContext->ComputedValues(),
+    Servo_ComputedValues_ExtractAnimationValue(aBaseStyleContext,
                                                aProperty.mProperty).Consume();
   mBaseStyleValuesForServo.Put(aProperty.mProperty, baseValue);
 }
 
 void
 KeyframeEffectReadOnly::WillComposeStyle()
 {
   ComputedTiming computedTiming = GetComputedTiming();
--- a/dom/smil/nsSMILCSSProperty.cpp
+++ b/dom/smil/nsSMILCSSProperty.cpp
@@ -63,20 +63,18 @@ nsSMILCSSProperty::GetBaseValue() const
     // type, so as not to indicate failure).
     nsSMILValue tmpVal(&nsSMILCSSValueType::sSingleton);
     Swap(baseValue, tmpVal);
     return baseValue;
   }
 
   AnimationValue computedValue;
   if (mElement->IsStyledByServo()) {
-    const ServoComputedValues* currentStyle =
-      mBaseStyleContext->ComputedValues();
     computedValue.mServo =
-      Servo_ComputedValues_ExtractAnimationValue(currentStyle, mPropID)
+      Servo_ComputedValues_ExtractAnimationValue(mBaseStyleContext->AsServo(), mPropID)
       .Consume();
     if (!computedValue.mServo) {
       return baseValue;
     }
   } else if (!StyleAnimationValue::ExtractComputedValue(mPropID,
                                                         mBaseStyleContext,
                                                         computedValue.mGecko)) {
     return baseValue;
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -227,17 +227,17 @@ SERVO_BINDING_FUNC(Servo_ParseEasing, bo
 SERVO_BINDING_FUNC(Servo_GetComputedKeyframeValues, void,
                    RawGeckoKeyframeListBorrowed keyframes,
                    RawGeckoElementBorrowed element,
                    ServoStyleContextBorrowed style,
                    RawServoStyleSetBorrowed set,
                    RawGeckoComputedKeyframeValuesListBorrowedMut result)
 SERVO_BINDING_FUNC(Servo_ComputedValues_ExtractAnimationValue,
                    RawServoAnimationValueStrong,
-                   ServoComputedValuesBorrowed computed_values,
+                   ServoStyleContextBorrowed computed_values,
                    nsCSSPropertyID property)
 SERVO_BINDING_FUNC(Servo_ComputedValues_SpecifiesAnimationsOrTransitions, bool,
                    ServoComputedValuesBorrowed computed_values)
 SERVO_BINDING_FUNC(Servo_Property_IsAnimatable, bool,
                    nsCSSPropertyID property)
 SERVO_BINDING_FUNC(Servo_Property_IsTransitionable, bool,
                    nsCSSPropertyID property)
 SERVO_BINDING_FUNC(Servo_Property_IsDiscreteAnimatable, bool,
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -449,17 +449,17 @@ ExtractNonDiscreteComputedValue(nsCSSPro
                                 AnimationValue& aAnimationValue)
 {
   if (Servo_Property_IsDiscreteAnimatable(aProperty) &&
       aProperty != eCSSProperty_visibility) {
     return false;
   }
 
   aAnimationValue.mServo =
-    Servo_ComputedValues_ExtractAnimationValue(aComputedStyle->ComputedValues(),
+    Servo_ComputedValues_ExtractAnimationValue(aComputedStyle,
                                                aProperty).Consume();
   return !!aAnimationValue.mServo;
 }
 
 void
 nsTransitionManager::StyleContextChanged(dom::Element *aElement,
                                          nsStyleContext *aOldStyleContext,
                                          RefPtr<nsStyleContext>* aNewStyleContext /* inout */)