Bug 820864 - Fix new build warnings in nsTransitionManager.cpp; r=nrc
authorMs2ger <ms2ger@gmail.com>
Wed, 12 Dec 2012 20:32:29 +0100
changeset 115816 1b29d204d5ab792b0b94f211d9886e6caeb1750c
parent 115815 ec65853affc878329af4367147bd9c4d0ca29181
child 115817 d70010fceafa17bf8ab909ccd76c4f80af9ba71f
push id19557
push userMs2ger@gmail.com
push dateWed, 12 Dec 2012 19:35:22 +0000
treeherdermozilla-inbound@1b29d204d5ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnrc
bugs820864
milestone20.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 820864 - Fix new build warnings in nsTransitionManager.cpp; r=nrc
layout/style/nsTransitionManager.cpp
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -291,17 +291,17 @@ nsTransitionManager::UpdateThrottledStyl
       
       et->EnsureStyleRuleFor(mPresContext->RefreshDriver()->MostRecentRefresh());
       curRule->mRule = et->mStyleRule;
 
       ForceLayerRerendering(primaryFrame, et);
     } else {
       curRule->mRule = ruleNode->GetRule();
     }
-  } while (ruleNode = ruleNode->GetParent());
+  } while ((ruleNode = ruleNode->GetParent()));
 
   nsRefPtr<nsStyleContext> newStyle = mPresContext->PresShell()->StyleSet()->
     ResolveStyleForRules(aParentStyle, oldStyle, rules);
   primaryFrame->SetStyleContextWithoutNotification(newStyle);
 
   ReparentBeforeAndAfter(aElement, primaryFrame, newStyle, mPresContext->PresShell()->StyleSet());
 
   return newStyle;
@@ -341,20 +341,19 @@ nsTransitionManager::UpdateThrottledStyl
     newStyle = styleSet->ReparentStyleContext(primaryFrame->GetStyleContext(),
                                               aParentStyle, element);
     primaryFrame->SetStyleContextWithoutNotification(newStyle);
     ReparentBeforeAndAfter(element, primaryFrame, newStyle, styleSet);
   }
 
   // walk the children
   if (newStyle) {
-    nsIContent* child = aContent->GetFirstChild();
-    for (nsIContent *child = aContent->GetFirstChild(); child;
-         child = child->GetNextSibling()) {
-      UpdateThrottledStylesForSubtree(child, newStyle);
+    for (nsIContent *child = aContent->GetFirstChild(); child;
+         child = child->GetNextSibling()) {
+      UpdateThrottledStylesForSubtree(child, newStyle);
     }
   }
 }
 
 void
 nsTransitionManager::UpdateAllThrottledStyles()
 {
   if (PR_CLIST_IS_EMPTY(&mElementData)) {
@@ -386,17 +385,17 @@ nsTransitionManager::UpdateAllThrottledS
     // element is initialised to the starting element (i.e., one we know has
     // a transition) and ends up with the root-most transitioning ancestor,
     // that is, the element where we begin updates.
     dom::Element* element = et->mElement;
     // make a list of ancestors
     nsTArray<dom::Element*> ancestors;
     do {
       ancestors.AppendElement(element);
-    } while (element = element->GetElementParent());
+    } while ((element = element->GetElementParent()));
 
     // walk down the ancestors until we find one with a throttled transition
     for (int32_t i = ancestors.Length() - 1; i >= 0; --i) {
       if (GetElementTransitions(ancestors[i],
                                 nsCSSPseudoElements::ePseudo_NotPseudoElement,
                                 false)) {
         element = ancestors[i];
         break;