Bug 1358965 - Drop unnecessary static_cast. r?birtles
MozReview-Commit-ID: 1V1ISqv2uo1
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -452,62 +452,61 @@ Gecko_StyleAnimationsEquals(RawGeckoStyl
}
void
Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement,
nsIAtom* aPseudoTagOrNull,
ServoComputedValuesBorrowedOrNull aOldComputedValues,
ServoComputedValuesBorrowedOrNull aComputedValues,
ServoComputedValuesBorrowedOrNull aParentComputedValues,
- UpdateAnimationsTasks aTaskBits)
+ UpdateAnimationsTasks aTasks)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aElement);
MOZ_ASSERT(!aPseudoTagOrNull ||
aPseudoTagOrNull == nsCSSPseudoElements::before ||
aPseudoTagOrNull == nsCSSPseudoElements::after);
nsPresContext* presContext = nsContentUtils::GetContextForContent(aElement);
if (!presContext) {
return;
}
- UpdateAnimationsTasks tasks = static_cast<UpdateAnimationsTasks>(aTaskBits);
if (presContext->IsDynamic() && aElement->IsInComposedDoc()) {
const ServoComputedValuesWithParent servoValues =
{ aComputedValues, aParentComputedValues };
CSSPseudoElementType pseudoType =
nsCSSPseudoElements::GetPseudoType(aPseudoTagOrNull,
CSSEnabledState::eForAllContent);
- if (tasks & UpdateAnimationsTasks::CSSAnimations) {
+ if (aTasks & UpdateAnimationsTasks::CSSAnimations) {
presContext->AnimationManager()->
UpdateAnimations(const_cast<dom::Element*>(aElement), pseudoType,
servoValues);
}
// aComputedValues might be nullptr if the target element is now in a
// display:none subtree. We still call Gecko_UpdateAnimations in this case
// because we need to stop CSS animations in the display:none subtree.
// However, we don't need to update transitions since they are stopped by
// RestyleManager::AnimationsWithDestroyedFrame so we just return early
// here.
if (!aComputedValues) {
return;
}
- if (tasks & UpdateAnimationsTasks::CSSTransitions) {
+ if (aTasks & UpdateAnimationsTasks::CSSTransitions) {
MOZ_ASSERT(aOldComputedValues);
const ServoComputedValuesWithParent oldServoValues =
{ aOldComputedValues, nullptr };
presContext->TransitionManager()->
UpdateTransitions(const_cast<dom::Element*>(aElement), pseudoType,
oldServoValues, servoValues);
}
- if (tasks & UpdateAnimationsTasks::EffectProperties) {
+ if (aTasks & UpdateAnimationsTasks::EffectProperties) {
presContext->EffectCompositor()->UpdateEffectProperties(
servoValues, const_cast<dom::Element*>(aElement), pseudoType);
}
}
}
bool
Gecko_ElementHasAnimations(RawGeckoElementBorrowed aElement,
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -195,17 +195,17 @@ Gecko_GetAnimationRule(RawGeckoElementBo
RawServoAnimationValueMapBorrowed aAnimationValues);
bool Gecko_StyleAnimationsEquals(RawGeckoStyleAnimationListBorrowed,
RawGeckoStyleAnimationListBorrowed);
void Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement,
nsIAtom* aPseudoTagOrNull,
ServoComputedValuesBorrowedOrNull aOldComputedValues,
ServoComputedValuesBorrowedOrNull aComputedValues,
ServoComputedValuesBorrowedOrNull aParentComputedValues,
- mozilla::UpdateAnimationsTasks aTaskBits);
+ mozilla::UpdateAnimationsTasks aTasks);
bool Gecko_ElementHasAnimations(RawGeckoElementBorrowed aElement,
nsIAtom* aPseudoTagOrNull);
bool Gecko_ElementHasCSSAnimations(RawGeckoElementBorrowed aElement,
nsIAtom* aPseudoTagOrNull);
bool Gecko_ElementHasCSSTransitions(RawGeckoElementBorrowed aElement,
nsIAtom* aPseudoTagOrNull);
size_t Gecko_ElementTransitions_Length(RawGeckoElementBorrowed aElement,
nsIAtom* aPseudoTagOrNull);