Bug 960465 patch 13 - Remove the cover rule code, which became unused in the previous patch. r=birtles
authorL. David Baron <dbaron@dbaron.org>
Tue, 17 Feb 2015 11:15:04 +1300
changeset 229391 3b33596002e338d3f0c98722f48313a61ac9f74e
parent 229390 e65ef694c410daa549c96d8507ffe076c13fa252
child 229392 b2ee72589c18ee3ad7492ee08c3268d0fffe7878
push id11352
push userryanvm@gmail.com
push dateTue, 17 Feb 2015 19:29:37 +0000
treeherderfx-team@b6c56fab513d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs960465
milestone38.0a1
Bug 960465 patch 13 - Remove the cover rule code, which became unused in the previous patch. r=birtles
layout/style/nsTransitionManager.cpp
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -338,47 +338,16 @@ nsTransitionManager::StyleContextChanged
       collection->Destroy();
       collection = nullptr;
     }
   }
 
   MOZ_ASSERT(!startedAny || collection,
              "must have element transitions if we started any transitions");
 
-  // In the CSS working group discussion (2009 Jul 15 telecon,
-  // http://www.w3.org/mid/4A5E1470.4030904@inkedblade.net ) of
-  // http://lists.w3.org/Archives/Public/www-style/2009Jun/0121.html ,
-  // the working group decided that a transition property on an
-  // element should not cause any transitions if the property change
-  // is itself inheriting a value that is transitioning on an
-  // ancestor.  So, to get the correct behavior, we continue the
-  // restyle that caused this transition using a "covering" rule that
-  // covers up any changes on which we started transitions, so that
-  // descendants don't start their own transitions.  (In the case of
-  // negative transition delay, this covering rule produces different
-  // results than applying the transition rule immediately would).
-
-  nsRefPtr<css::AnimValuesStyleRule> coverRule = new css::AnimValuesStyleRule;
-
-  if (startedAny) {
-    AnimationPlayerPtrArray& players = collection->mPlayers;
-    for (size_t i = 0, i_end = players.Length(); i < i_end; ++i) {
-      dom::Animation* anim = players[i]->GetSource();
-      MOZ_ASSERT(anim && anim->Properties().Length() == 1,
-                 "Should have one animation property for a transition");
-      MOZ_ASSERT(anim && anim->Properties()[0].mSegments.Length() == 1,
-                 "Animation property should have one segment for a transition");
-      AnimationProperty& prop = anim->Properties()[0];
-      AnimationPropertySegment& segment = prop.mSegments[0];
-      if (whichStarted.HasProperty(prop.mProperty)) {
-        coverRule->AddValue(prop.mProperty, segment.mFromValue);
-      }
-    }
-  }
-
   if (collection) {
     // Set the style rule refresh time to null so that EnsureStyleRuleFor
     // creates a new style rule if we started *or* stopped transitions.
     collection->mStyleRuleRefreshTime = TimeStamp();
     collection->UpdateCheckGeneration(mPresContext);
     collection->mNeedsRefreshes = true;
     TimeStamp now = mPresContext->RefreshDriver()->MostRecentRefresh();
     collection->EnsureStyleRuleFor(now, EnsureStyleRule_IsNotThrottled);