Bug 1339704 - Part 1 - Rename nsCSSPropertyIDSet::Invert as Inverse. draft
authorBoris Chiou <boris.chiou@gmail.com>
Tue, 14 Mar 2017 11:30:20 +0800
changeset 499338 e3b231c4f08cd0eb4a0cb94cf8f9d578707c9277
parent 499337 8c89d1991786625a64d868798281610872a2bc26
child 499339 a64f1660c20dcc3c25ee52985269d272a2bb5888
push id49366
push userbmo:boris.chiou@gmail.com
push dateWed, 15 Mar 2017 16:11:49 +0000
bugs1339704
milestone55.0a1
Bug 1339704 - Part 1 - Rename nsCSSPropertyIDSet::Invert as Inverse. This makes it more obvious that the object is not being modified but a new object is being returned. MozReview-Commit-ID: A6dH8f12h5A
dom/animation/EffectCompositor.cpp
layout/style/nsCSSPropertyIDSet.h
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -759,17 +759,17 @@ EffectCompositor::ComposeAnimationRule(d
   AnimationRule& animRule = effects->AnimationRule(aCascadeLevel);
   animRule.mGecko = nullptr;
 
   // If multiple animations affect the same property, animations with higher
   // composite order (priority) override or add or animations with lower
   // priority except properties in propertiesToSkip.
   const nsCSSPropertyIDSet& propertiesToSkip =
     aCascadeLevel == CascadeLevel::Animations
-    ? effects->PropertiesForAnimationsLevel().Invert()
+    ? effects->PropertiesForAnimationsLevel().Inverse()
     : effects->PropertiesForAnimationsLevel();
   for (KeyframeEffectReadOnly* effect : sortedEffectList) {
     effect->GetAnimation()->WillComposeStyle();
     effect->GetAnimation()->ComposeStyle(animRule, propertiesToSkip);
   }
 
   MOZ_ASSERT(effects == EffectSet::GetEffectSet(aElement, aPseudoType),
              "EffectSet should not change while composing style");
--- a/layout/style/nsCSSPropertyIDSet.h
+++ b/layout/style/nsCSSPropertyIDSet.h
@@ -63,17 +63,17 @@ public:
         }
     }
 
     bool Equals(const nsCSSPropertyIDSet& aOther) const {
       return mozilla::PodEqual(mProperties, aOther.mProperties);
     }
 
     // Return a new nsCSSPropertyIDSet which is the inverse of this set.
-    nsCSSPropertyIDSet Invert() const {
+    nsCSSPropertyIDSet Inverse() const {
       nsCSSPropertyIDSet result;
       for (size_t i = 0; i < mozilla::ArrayLength(mProperties); ++i) {
         result.mProperties[i] = ~mProperties[i];
       }
       return result;
     }
 
 private: