Bug 788549 Part 6: Remove a redundant if check r=dbaron
authorDavid Zbarsky <dzbarsky@gmail.com>
Thu, 30 May 2013 17:45:17 -0700
changeset 133551 0bf84683f9e1c765e2f360e006ff1f0b79c419a5
parent 133550 0b149bc52ebef9e8c448e2112c23c876e64cba2e
child 133552 3e6f8502d1af2fcc2798332304307e652f5286e6
push id24757
push userryanvm@gmail.com
push dateFri, 31 May 2013 20:11:58 +0000
treeherdermozilla-central@2222b07ab207 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs788549
milestone24.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 788549 Part 6: Remove a redundant if check r=dbaron
layout/style/nsTransitionManager.cpp
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -907,22 +907,20 @@ nsTransitionManager::WalkTransitionRule(
       !aData->mPresContext->IsProcessingAnimationStyleChange()) {
     // If we're processing a normal style change rather than one from
     // animation, don't add the transition rule.  This allows us to
     // compute the new style value rather than having the transition
     // override it, so that we can start transitioning differently.
 
     // We need to immediately restyle with animation
     // after doing this.
-    if (et) {
-      nsRestyleHint hint =
-        aPseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement ?
-        eRestyle_Self : eRestyle_Subtree;
-      mPresContext->PresShell()->RestyleForAnimation(aData->mElement, hint);
-    }
+    nsRestyleHint hint =
+      aPseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement ?
+      eRestyle_Self : eRestyle_Subtree;
+    mPresContext->PresShell()->RestyleForAnimation(aData->mElement, hint);
     return;
   }
 
   et->EnsureStyleRuleFor(
     aData->mPresContext->RefreshDriver()->MostRecentRefresh());
 
   aData->mRuleWalker->Forward(et->mStyleRule);
 }