Bug 1367293 - Explicitly cast nsStyleContext* to nullptr. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 02 Jun 2017 09:37:55 +0900
changeset 588043 c161f6f4aec6cd9d9eb81d4d03122c083b29ef6b
parent 588042 fcf76659f264e52a535658aa826271e7b0559c3f
child 588044 6b8cde612394ab13f8ee2ca6e3a180cb1515764e
push id61886
push userhikezoe@mozilla.com
push dateFri, 02 Jun 2017 02:26:43 +0000
reviewersbirtles
bugs1367293
milestone55.0a1
Bug 1367293 - Explicitly cast nsStyleContext* to nullptr. r?birtles In subsequent patches, the servo version of KeyframeUtils::ApplySpacing() changes fifth argument to const ServoComputedValues*. If we still use nullptr for the fifth argument in caller side, compilers can't determine whether nsStyleContext* or const ServoComputedValues* should be used. MozReview-Commit-ID: 1bE2cA7gRdi
dom/animation/KeyframeUtils.cpp
--- a/dom/animation/KeyframeUtils.cpp
+++ b/dom/animation/KeyframeUtils.cpp
@@ -583,18 +583,19 @@ KeyframeUtils::ApplySpacing(nsTArray<Key
     keyframeA = keyframeB;
   }
 }
 
 /* static */ void
 KeyframeUtils::ApplyDistributeSpacing(nsTArray<Keyframe>& aKeyframes)
 {
   nsTArray<ComputedKeyframeValues> emptyArray;
+  // FIXME: Bug 1339690: below static_cast should be dropped.
   ApplySpacing(aKeyframes, SpacingMode::distribute, eCSSProperty_UNKNOWN,
-               emptyArray, nullptr);
+               emptyArray, static_cast<nsStyleContext*>(nullptr));
 }
 
 /* static */ nsTArray<ComputedKeyframeValues>
 KeyframeUtils::GetComputedKeyframeValues(
   const nsTArray<Keyframe>& aKeyframes,
   dom::Element* aElement,
   const ServoComputedValuesWithParent& aServoValues)
 {