Bug 1419695: Remove some unused style struct setters. r=xidorn
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 01 Jun 2018 17:24:37 +0200
changeset 475409 c4949db937f17a500b868514d0daae388846f56b
parent 475408 34e3e002cbea46b282e1fbf87cd791180da7443d
child 475410 abc034b4c57e262a0178f8db003b8e62746b6d2a
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1419695
milestone62.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 1419695: Remove some unused style struct setters. r=xidorn MozReview-Commit-ID: Lx9yLjb8ddB
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3421,39 +3421,16 @@ void
 StyleTransition::SetInitialValues()
 {
   mTimingFunction = nsTimingFunction(NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE);
   mDuration = 0.0;
   mDelay = 0.0;
   mProperty = eCSSPropertyExtra_all_properties;
 }
 
-void
-StyleTransition::SetUnknownProperty(nsCSSPropertyID aProperty,
-                                    const nsAString& aPropertyString)
-{
-  MOZ_ASSERT(nsCSSProps::LookupProperty(aPropertyString,
-                                        CSSEnabledState::eForAllContent) ==
-               aProperty,
-             "property and property string should match");
-  RefPtr<nsAtom> temp = NS_Atomize(aPropertyString);
-  SetUnknownProperty(aProperty, temp);
-}
-
-void
-StyleTransition::SetUnknownProperty(nsCSSPropertyID aProperty,
-                                    nsAtom* aPropertyString)
-{
-  MOZ_ASSERT(aProperty == eCSSProperty_UNKNOWN ||
-             aProperty == eCSSPropertyExtra_variable,
-             "should be either unknown or custom property");
-  mProperty = aProperty;
-  mUnknownProperty = aPropertyString;
-}
-
 bool
 StyleTransition::operator==(const StyleTransition& aOther) const
 {
   return mTimingFunction == aOther.mTimingFunction &&
          mDuration == aOther.mDuration &&
          mDelay == aOther.mDelay &&
          mProperty == aOther.mProperty &&
          (mProperty != eCSSProperty_UNKNOWN ||
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1908,32 +1908,16 @@ struct StyleTransition
   float GetDuration() const { return mDuration; }
   nsCSSPropertyID GetProperty() const { return mProperty; }
   nsAtom* GetUnknownProperty() const { return mUnknownProperty; }
 
   void SetTimingFunction(const nsTimingFunction& aTimingFunction)
     { mTimingFunction = aTimingFunction; }
   void SetDelay(float aDelay) { mDelay = aDelay; }
   void SetDuration(float aDuration) { mDuration = aDuration; }
-  void SetProperty(nsCSSPropertyID aProperty)
-    {
-      NS_ASSERTION(aProperty != eCSSProperty_UNKNOWN &&
-                   aProperty != eCSSPropertyExtra_variable,
-                   "invalid property");
-      mProperty = aProperty;
-    }
-  void SetUnknownProperty(nsCSSPropertyID aProperty,
-                          const nsAString& aPropertyString);
-  void SetUnknownProperty(nsCSSPropertyID aProperty,
-                          nsAtom* aPropertyString);
-  void CopyPropertyFrom(const StyleTransition& aOther)
-    {
-      mProperty = aOther.mProperty;
-      mUnknownProperty = aOther.mUnknownProperty;
-    }
 
   nsTimingFunction& TimingFunctionSlot() { return mTimingFunction; }
 
   bool operator==(const StyleTransition& aOther) const;
   bool operator!=(const StyleTransition& aOther) const
     { return !(*this == aOther); }
 
 private: