Bug 1370802: Cleanup style and indentation in GenericSpecifiedValues.h and related files. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 16 Jun 2017 03:57:29 +0200
changeset 596620 41b8aa0330d951294b935dc99db25e3eb113ef55
parent 596619 ab3c142d6c5717e367daacf42e60add411554316
child 596621 76229cf62c46b8d6aa9a5dbeecec073dda5ee18b
push id64699
push userbmo:emilio+bugs@crisal.io
push dateMon, 19 Jun 2017 15:05:42 +0000
reviewersheycam
bugs1370802
milestone56.0a1
Bug 1370802: Cleanup style and indentation in GenericSpecifiedValues.h and related files. r?heycam This is all automated with clang-format. MozReview-Commit-ID: 5V17XJjQN3X
layout/style/GenericSpecifiedValues.h
layout/style/GenericSpecifiedValuesInlines.h
layout/style/ServoSpecifiedValues.cpp
layout/style/ServoSpecifiedValues.h
layout/style/nsRuleData.cpp
layout/style/nsRuleData.h
--- a/layout/style/GenericSpecifiedValues.h
+++ b/layout/style/GenericSpecifiedValues.h
@@ -22,97 +22,104 @@ struct nsRuleData;
 
 namespace mozilla {
 
 class ServoSpecifiedValues;
 
 // This provides a common interface for attribute mappers (MapAttributesIntoRule)
 // to use regardless of the style backend. If the style backend is Gecko,
 // this will contain an nsRuleData. If it is Servo, it will be a PropertyDeclarationBlock.
-class GenericSpecifiedValues {
+class GenericSpecifiedValues
+{
 protected:
-    explicit GenericSpecifiedValues(StyleBackendType aType, nsPresContext* aPresContext,
-                                    uint32_t aSIDs)
-        : mType(aType), mPresContext(aPresContext), mSIDs(aSIDs) {}
+  explicit GenericSpecifiedValues(StyleBackendType aType,
+                                  nsPresContext* aPresContext,
+                                  uint32_t aSIDs)
+    : mType(aType)
+    , mPresContext(aPresContext)
+    , mSIDs(aSIDs)
+  {}
 
 public:
-    MOZ_DECL_STYLO_METHODS(nsRuleData, ServoSpecifiedValues)
+  MOZ_DECL_STYLO_METHODS(nsRuleData, ServoSpecifiedValues)
 
-    // Check if we already contain a certain longhand
-    inline bool PropertyIsSet(nsCSSPropertyID aId);
-    // Check if we are able to hold longhands from a given
-    // style struct. Pass the result of NS_STYLE_INHERIT_BIT to this
-    // function. Can accept multiple inherit bits or'd together.
-    inline bool ShouldComputeStyleStruct(uint64_t aInheritBits) {
-        return aInheritBits & mSIDs;
-    }
+  // Check if we already contain a certain longhand
+  inline bool PropertyIsSet(nsCSSPropertyID aId);
+  // Check if we are able to hold longhands from a given
+  // style struct. Pass the result of NS_STYLE_INHERIT_BIT to this
+  // function. Can accept multiple inherit bits or'd together.
+  inline bool ShouldComputeStyleStruct(uint64_t aInheritBits)
+  {
+    return aInheritBits & mSIDs;
+  }
 
-    inline nsPresContext* PresContext() {
-        return mPresContext;
-    }
+  inline nsPresContext* PresContext() { return mPresContext; }
+
+  // Set a property to an identifier (string)
+  inline void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue);
+  inline void SetIdentStringValueIfUnset(nsCSSPropertyID aId,
+                                         const nsString& aValue);
 
-    // Set a property to an identifier (string)
-    inline void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue);
-    inline void SetIdentStringValueIfUnset(nsCSSPropertyID aId, const nsString& aValue);
+  inline void SetIdentAtomValue(nsCSSPropertyID aId, nsIAtom* aValue);
+  inline void SetIdentAtomValueIfUnset(nsCSSPropertyID aId, nsIAtom* aValue);
 
-    inline void SetIdentAtomValue(nsCSSPropertyID aId, nsIAtom* aValue);
-    inline void SetIdentAtomValueIfUnset(nsCSSPropertyID aId, nsIAtom* aValue);
-
-    // Set a property to a keyword (usually NS_STYLE_* or StyleFoo::*)
-    inline void SetKeywordValue(nsCSSPropertyID aId, int32_t aValue);
-    inline void SetKeywordValueIfUnset(nsCSSPropertyID aId, int32_t aValue);
+  // Set a property to a keyword (usually NS_STYLE_* or StyleFoo::*)
+  inline void SetKeywordValue(nsCSSPropertyID aId, int32_t aValue);
+  inline void SetKeywordValueIfUnset(nsCSSPropertyID aId, int32_t aValue);
 
-    template<typename T,
-             typename = typename std::enable_if<std::is_enum<T>::value>::type>
-    void SetKeywordValue(nsCSSPropertyID aId, T aValue) {
-        static_assert(mozilla::EnumTypeFitsWithin<T, int32_t>::value,
-                      "aValue must be an enum that fits within 32 bits");
-        SetKeywordValue(aId, static_cast<int32_t>(aValue));
-    }
-    template<typename T,
-             typename = typename std::enable_if<std::is_enum<T>::value>::type>
-    void SetKeywordValueIfUnset(nsCSSPropertyID aId, T aValue) {
-        static_assert(mozilla::EnumTypeFitsWithin<T, int32_t>::value,
-                      "aValue must be an enum that fits within 32 bits");
-        SetKeywordValueIfUnset(aId, static_cast<int32_t>(aValue));
-    }
+  template<typename T,
+           typename = typename std::enable_if<std::is_enum<T>::value>::type>
+  void SetKeywordValue(nsCSSPropertyID aId, T aValue)
+  {
+    static_assert(mozilla::EnumTypeFitsWithin<T, int32_t>::value,
+                  "aValue must be an enum that fits within 32 bits");
+    SetKeywordValue(aId, static_cast<int32_t>(aValue));
+  }
+  template<typename T,
+           typename = typename std::enable_if<std::is_enum<T>::value>::type>
+  void SetKeywordValueIfUnset(nsCSSPropertyID aId, T aValue)
+  {
+    static_assert(mozilla::EnumTypeFitsWithin<T, int32_t>::value,
+                  "aValue must be an enum that fits within 32 bits");
+    SetKeywordValueIfUnset(aId, static_cast<int32_t>(aValue));
+  }
 
-    // Set a property to an integer value
-    inline void SetIntValue(nsCSSPropertyID aId, int32_t aValue);
-    // Set a property to a pixel value
-    inline void SetPixelValue(nsCSSPropertyID aId, float aValue);
-    inline void SetPixelValueIfUnset(nsCSSPropertyID aId, float aValue);
+  // Set a property to an integer value
+  inline void SetIntValue(nsCSSPropertyID aId, int32_t aValue);
+  // Set a property to a pixel value
+  inline void SetPixelValue(nsCSSPropertyID aId, float aValue);
+  inline void SetPixelValueIfUnset(nsCSSPropertyID aId, float aValue);
 
-    inline void SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue);
-
-    // Set a property to a number value
-    inline void SetNumberValue(nsCSSPropertyID aId, float aValue);
+  inline void SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue);
 
-    // Set a property to a percent value
-    inline void SetPercentValue(nsCSSPropertyID aId, float aValue);
-    inline void SetPercentValueIfUnset(nsCSSPropertyID aId, float aValue);
+  // Set a property to a number value
+  inline void SetNumberValue(nsCSSPropertyID aId, float aValue);
 
-    // Set a property to `auto`
-    inline void SetAutoValue(nsCSSPropertyID aId);
-    inline void SetAutoValueIfUnset(nsCSSPropertyID aId);
+  // Set a property to a percent value
+  inline void SetPercentValue(nsCSSPropertyID aId, float aValue);
+  inline void SetPercentValueIfUnset(nsCSSPropertyID aId, float aValue);
 
-    // Set a property to `currentcolor`
-    inline void SetCurrentColor(nsCSSPropertyID aId);
-    inline void SetCurrentColorIfUnset(nsCSSPropertyID aId);
+  // Set a property to `auto`
+  inline void SetAutoValue(nsCSSPropertyID aId);
+  inline void SetAutoValueIfUnset(nsCSSPropertyID aId);
 
-    // Set a property to an RGBA nscolor value
-    inline void SetColorValue(nsCSSPropertyID aId, nscolor aValue);
-    inline void SetColorValueIfUnset(nsCSSPropertyID aId, nscolor aValue);
+  // Set a property to `currentcolor`
+  inline void SetCurrentColor(nsCSSPropertyID aId);
+  inline void SetCurrentColorIfUnset(nsCSSPropertyID aId);
+
+  // Set a property to an RGBA nscolor value
+  inline void SetColorValue(nsCSSPropertyID aId, nscolor aValue);
+  inline void SetColorValueIfUnset(nsCSSPropertyID aId, nscolor aValue);
 
-    // Set font-family to a string
-    inline void SetFontFamily(const nsString& aValue);
-    // Add a quirks-mode override to the decoration color of elements nested in <a>
-    inline void SetTextDecorationColorOverride();
-    inline void SetBackgroundImage(nsAttrValue& value);
+  // Set font-family to a string
+  inline void SetFontFamily(const nsString& aValue);
+  // Add a quirks-mode override to the decoration color of elements nested in <a>
+  inline void SetTextDecorationColorOverride();
+  inline void SetBackgroundImage(nsAttrValue& value);
 
-    const mozilla::StyleBackendType mType;
-    nsPresContext* const mPresContext;
-    const uint32_t mSIDs;
+  const mozilla::StyleBackendType mType;
+  nsPresContext* const mPresContext;
+  const uint32_t mSIDs;
 };
 
 } // namespace mozilla
 
 #endif // mozilla_GenericSpecifiedValues_h
--- a/layout/style/GenericSpecifiedValuesInlines.h
+++ b/layout/style/GenericSpecifiedValuesInlines.h
@@ -15,74 +15,82 @@
 #define mozilla_GenericSpecifiedValuesInlines_h
 
 #include "nsRuleData.h"
 #include "mozilla/GenericSpecifiedValues.h"
 #include "mozilla/ServoSpecifiedValues.h"
 
 namespace mozilla {
 
-MOZ_DEFINE_STYLO_METHODS(GenericSpecifiedValues, nsRuleData, ServoSpecifiedValues)
+MOZ_DEFINE_STYLO_METHODS(GenericSpecifiedValues,
+                         nsRuleData,
+                         ServoSpecifiedValues)
 
 bool
 GenericSpecifiedValues::PropertyIsSet(nsCSSPropertyID aId)
 {
   MOZ_STYLO_FORWARD(PropertyIsSet, (aId))
 }
 
 void
-GenericSpecifiedValues::SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue)
+GenericSpecifiedValues::SetIdentStringValue(nsCSSPropertyID aId,
+                                            const nsString& aValue)
 {
   MOZ_STYLO_FORWARD(SetIdentStringValue, (aId, aValue))
 }
 
 void
-GenericSpecifiedValues::SetIdentStringValueIfUnset(nsCSSPropertyID aId, const nsString& aValue)
+GenericSpecifiedValues::SetIdentStringValueIfUnset(nsCSSPropertyID aId,
+                                                   const nsString& aValue)
 {
   if (!PropertyIsSet(aId)) {
     SetIdentStringValue(aId, aValue);
   }
 }
 
 void
 GenericSpecifiedValues::SetIdentAtomValue(nsCSSPropertyID aId, nsIAtom* aValue)
 {
   MOZ_STYLO_FORWARD(SetIdentAtomValue, (aId, aValue))
 }
 
 void
-GenericSpecifiedValues::SetIdentAtomValueIfUnset(nsCSSPropertyID aId, nsIAtom* aValue)
+GenericSpecifiedValues::SetIdentAtomValueIfUnset(nsCSSPropertyID aId,
+                                                 nsIAtom* aValue)
 {
   if (!PropertyIsSet(aId)) {
     SetIdentAtomValue(aId, aValue);
   }
 }
 
 void
 GenericSpecifiedValues::SetKeywordValue(nsCSSPropertyID aId, int32_t aValue)
 {
   // there are some static asserts in MOZ_STYLO_FORWARD which
   // won't work with the overloaded SetKeywordValue function,
   // so we copy its expansion and use SetIntValue for decltype
   // instead
-  static_assert(!mozilla::IsSame<decltype(&MOZ_STYLO_THIS_TYPE::SetIntValue),
-                 decltype(&MOZ_STYLO_GECKO_TYPE::SetKeywordValue)>
-        ::value, "Gecko subclass should define its own SetKeywordValue");
-  static_assert(!mozilla::IsSame<decltype(&MOZ_STYLO_THIS_TYPE::SetIntValue),
-                 decltype(&MOZ_STYLO_SERVO_TYPE::SetKeywordValue)>
-        ::value, "Servo subclass should define its own SetKeywordValue");
+  static_assert(
+    !mozilla::IsSame<decltype(&MOZ_STYLO_THIS_TYPE::SetIntValue),
+                     decltype(&MOZ_STYLO_GECKO_TYPE::SetKeywordValue)>::value,
+    "Gecko subclass should define its own SetKeywordValue");
+  static_assert(
+    !mozilla::IsSame<decltype(&MOZ_STYLO_THIS_TYPE::SetIntValue),
+                     decltype(&MOZ_STYLO_SERVO_TYPE::SetKeywordValue)>::value,
+    "Servo subclass should define its own SetKeywordValue");
 
   if (IsServo()) {
     return AsServo()->SetKeywordValue(aId, aValue);
   }
   return AsGecko()->SetKeywordValue(aId, aValue);
 }
 
 void
-GenericSpecifiedValues::SetKeywordValueIfUnset(nsCSSPropertyID aId, int32_t aValue)
+GenericSpecifiedValues::SetKeywordValueIfUnset(nsCSSPropertyID aId,
+                                               int32_t aValue)
 {
   if (!PropertyIsSet(aId)) {
     SetKeywordValue(aId, aValue);
   }
 }
 
 void
 GenericSpecifiedValues::SetIntValue(nsCSSPropertyID aId, int32_t aValue)
@@ -118,17 +126,18 @@ GenericSpecifiedValues::SetNumberValue(n
 
 void
 GenericSpecifiedValues::SetPercentValue(nsCSSPropertyID aId, float aValue)
 {
   MOZ_STYLO_FORWARD(SetPercentValue, (aId, aValue))
 }
 
 void
-GenericSpecifiedValues::SetPercentValueIfUnset(nsCSSPropertyID aId, float aValue)
+GenericSpecifiedValues::SetPercentValueIfUnset(nsCSSPropertyID aId,
+                                               float aValue)
 {
   if (!PropertyIsSet(aId)) {
     SetPercentValue(aId, aValue);
   }
 }
 
 void
 GenericSpecifiedValues::SetAutoValue(nsCSSPropertyID aId)
@@ -160,17 +169,18 @@ GenericSpecifiedValues::SetCurrentColorI
 
 void
 GenericSpecifiedValues::SetColorValue(nsCSSPropertyID aId, nscolor aValue)
 {
   MOZ_STYLO_FORWARD(SetColorValue, (aId, aValue))
 }
 
 void
-GenericSpecifiedValues::SetColorValueIfUnset(nsCSSPropertyID aId, nscolor aValue)
+GenericSpecifiedValues::SetColorValueIfUnset(nsCSSPropertyID aId,
+                                             nscolor aValue)
 {
   if (!PropertyIsSet(aId)) {
     SetColorValue(aId, aValue);
   }
 }
 
 void
 GenericSpecifiedValues::SetFontFamily(const nsString& aValue)
--- a/layout/style/ServoSpecifiedValues.cpp
+++ b/layout/style/ServoSpecifiedValues.cpp
@@ -6,44 +6,43 @@
 #include "mozilla/ServoBindings.h"
 #include "mozilla/ServoSpecifiedValues.h"
 
 namespace {
 
 #define STYLE_STRUCT(name, checkdata_cb) | NS_STYLE_INHERIT_BIT(name)
 const uint64_t ALL_SIDS = 0
 #include "nsStyleStructList.h"
-;
+  ;
 #undef STYLE_STRUCT
 
 } // anonymous namespace
 
 using namespace mozilla;
 
 ServoSpecifiedValues::ServoSpecifiedValues(nsPresContext* aContext,
                                            RawServoDeclarationBlock* aDecl)
 
   : GenericSpecifiedValues(StyleBackendType::Servo, aContext, ALL_SIDS)
-  ,  mDecl(aDecl)
-{
-
-}
+  , mDecl(aDecl)
+{}
 
 bool
 ServoSpecifiedValues::PropertyIsSet(nsCSSPropertyID aId)
 {
   // We always create fresh ServoSpecifiedValues for each property
   // mapping, so unlike Gecko there aren't existing properties from
   // the cascade that we wish to avoid overwriting.
   //
   // If a property is being overwritten, that's a bug. Check for it
   // in debug mode (this is O(n^2) behavior since Servo will traverse
   // the array each time you add a new property)
   MOZ_ASSERT(!Servo_DeclarationBlock_PropertyIsSet(mDecl, aId),
-             "Presentation attribute mappers should never attempt to set the same property twice");
+             "Presentation attribute mappers should never attempt to set the "
+             "same property twice");
   return false;
 }
 
 void
 ServoSpecifiedValues::SetIdentStringValue(nsCSSPropertyID aId,
                                           const nsString& aValue)
 {
   nsCOMPtr<nsIAtom> atom = NS_Atomize(aValue);
@@ -78,17 +77,18 @@ ServoSpecifiedValues::SetPixelValue(nsCS
 {
   Servo_DeclarationBlock_SetPixelValue(mDecl, aId, aValue);
 }
 
 void
 ServoSpecifiedValues::SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue)
 {
   MOZ_ASSERT(aValue.IsLengthUnit());
-  Servo_DeclarationBlock_SetLengthValue(mDecl, aId, aValue.GetFloatValue(), aValue.GetUnit());
+  Servo_DeclarationBlock_SetLengthValue(
+    mDecl, aId, aValue.GetFloatValue(), aValue.GetUnit());
 }
 
 void
 ServoSpecifiedValues::SetNumberValue(nsCSSPropertyID aId, float aValue)
 {
   Servo_DeclarationBlock_SetNumberValue(mDecl, aId, aValue);
 }
 
@@ -128,11 +128,11 @@ ServoSpecifiedValues::SetTextDecorationC
   Servo_DeclarationBlock_SetTextDecorationColorOverride(mDecl);
 }
 
 void
 ServoSpecifiedValues::SetBackgroundImage(nsAttrValue& aValue)
 {
   nsAutoString str;
   aValue.ToString(str);
-  Servo_DeclarationBlock_SetBackgroundImage(mDecl, str,
-        mPresContext->Document()->DefaultStyleAttrURLData());
+  Servo_DeclarationBlock_SetBackgroundImage(
+    mDecl, str, mPresContext->Document()->DefaultStyleAttrURLData());
 }
--- a/layout/style/ServoSpecifiedValues.h
+++ b/layout/style/ServoSpecifiedValues.h
@@ -12,21 +12,21 @@
 #ifndef mozilla_ServoSpecifiedValues_h
 #define mozilla_ServoSpecifiedValues_h
 
 #include "mozilla/GenericSpecifiedValues.h"
 #include "mozilla/ServoBindingTypes.h"
 
 namespace mozilla {
 
-class ServoSpecifiedValues final: public GenericSpecifiedValues
+class ServoSpecifiedValues final : public GenericSpecifiedValues
 {
 public:
-
-  ServoSpecifiedValues(nsPresContext* aContext, RawServoDeclarationBlock* aDecl);
+  ServoSpecifiedValues(nsPresContext* aContext,
+                       RawServoDeclarationBlock* aDecl);
 
   // GenericSpecifiedValues overrides
   bool PropertyIsSet(nsCSSPropertyID aId);
 
   void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue);
 
   void SetIdentAtomValue(nsCSSPropertyID aId, nsIAtom* aValue);
 
--- a/layout/style/nsRuleData.cpp
+++ b/layout/style/nsRuleData.cpp
@@ -17,28 +17,29 @@ nsRuleData::GetPoisonOffset()
 {
   // Fill in mValueOffsets such that mValueStorage + mValueOffsets[i]
   // will yield the frame poison value for all uninitialized value
   // offsets.
   static_assert(sizeof(uintptr_t) == sizeof(size_t),
                 "expect uintptr_t and size_t to be the same size");
   static_assert(uintptr_t(-1) > uintptr_t(0),
                 "expect uintptr_t to be unsigned");
-  static_assert(size_t(-1) > size_t(0),
-                "expect size_t to be unsigned");
+  static_assert(size_t(-1) > size_t(0), "expect size_t to be unsigned");
   uintptr_t framePoisonValue = mozPoisonValue();
   return size_t(framePoisonValue - uintptr_t(mValueStorage)) /
          sizeof(nsCSSValue);
 }
 
-nsRuleData::nsRuleData(uint32_t aSIDs, nsCSSValue* aValueStorage,
-                       nsPresContext* aContext, nsStyleContext* aStyleContext)
-  : GenericSpecifiedValues(StyleBackendType::Gecko, aContext, aSIDs),
-    mStyleContext(aStyleContext),
-    mValueStorage(aValueStorage)
+nsRuleData::nsRuleData(uint32_t aSIDs,
+                       nsCSSValue* aValueStorage,
+                       nsPresContext* aContext,
+                       nsStyleContext* aStyleContext)
+  : GenericSpecifiedValues(StyleBackendType::Gecko, aContext, aSIDs)
+  , mStyleContext(aStyleContext)
+  , mValueStorage(aValueStorage)
 {
 #ifndef MOZ_VALGRIND
   size_t framePoisonOffset = GetPoisonOffset();
   for (size_t i = 0; i < nsStyleStructID_Length; ++i) {
     mValueOffsets[i] = framePoisonOffset;
   }
 #endif
 }
--- a/layout/style/nsRuleData.h
+++ b/layout/style/nsRuleData.h
@@ -21,17 +21,17 @@
 #include "nsStyleStructFwd.h"
 
 class nsPresContext;
 class nsStyleContext;
 struct nsRuleData;
 
 typedef void (*nsPostResolveFunc)(void* aStyleStruct, nsRuleData* aData);
 
-struct nsRuleData final: mozilla::GenericSpecifiedValues
+struct nsRuleData final : mozilla::GenericSpecifiedValues
 {
   mozilla::RuleNodeCacheConditions mConditions;
   bool mIsImportantRule;
   mozilla::SheetType mLevel;
   nsStyleContext* const mStyleContext;
 
   // We store nsCSSValues needed to compute the data for one or more
   // style structs (specified by the bitfield mSIDs).  These are stored
@@ -44,18 +44,20 @@ struct nsRuleData final: mozilla::Generi
   // nsRuleNode::HasAuthorSpecifiedRules; therefore some code that we
   // know is not called from HasAuthorSpecifiedRules assumes that the
   // mValueOffsets for the one struct in mSIDs is zero.
   nsCSSValue* const mValueStorage; // our user owns this array
   size_t mValueOffsets[nsStyleStructID_Length];
 
   nsAutoPtr<mozilla::CSSVariableDeclarations> mVariables;
 
-  nsRuleData(uint32_t aSIDs, nsCSSValue* aValueStorage,
-             nsPresContext* aContext, nsStyleContext* aStyleContext);
+  nsRuleData(uint32_t aSIDs,
+             nsCSSValue* aValueStorage,
+             nsPresContext* aContext,
+             nsStyleContext* aStyleContext);
 
 #ifdef DEBUG
   ~nsRuleData();
 #else
   ~nsRuleData() {}
 #endif
 
   /**
@@ -72,23 +74,23 @@ struct nsRuleData final: mozilla::Generi
 
     nsStyleStructID sid = nsCSSProps::kSIDTable[aProperty];
     size_t indexInStruct = nsCSSProps::PropertyIndexInStruct(aProperty);
 
     // This should really be nsCachedStyleData::GetBitForSID, but we can't
     // include that here since it includes us.
     MOZ_ASSERT(mSIDs & (1 << sid),
                "calling nsRuleData::ValueFor on property not in mSIDs");
-    MOZ_ASSERT(indexInStruct != size_t(-1),
-               "logical property");
+    MOZ_ASSERT(indexInStruct != size_t(-1), "logical property");
 
     return mValueStorage + mValueOffsets[sid] + indexInStruct;
   }
 
-  const nsCSSValue* ValueFor(nsCSSPropertyID aProperty) const {
+  const nsCSSValue* ValueFor(nsCSSPropertyID aProperty) const
+  {
     return const_cast<nsRuleData*>(this)->ValueFor(aProperty);
   }
 
   /**
    * Getters like ValueFor(aProperty), but for each property by name
    * (ValueForBackgroundColor, etc.), and more efficient than ValueFor.
    * These use the names used for the property on DOM interfaces (the
    * 'method' field in nsCSSPropList.h).
@@ -115,17 +117,18 @@ struct nsRuleData final: mozilla::Generi
     }
   #define CSS_PROP_LIST_EXCLUDE_LOGICAL
   #include "nsCSSPropList.h"
   #undef CSS_PROP_LIST_EXCLUDE_LOGICAL
   #undef CSS_PROP
   #undef CSS_PROP_PUBLIC_OR_PRIVATE
 
   // GenericSpecifiedValues overrides
-  bool PropertyIsSet(nsCSSPropertyID aId) {
+  bool PropertyIsSet(nsCSSPropertyID aId)
+  {
     return ValueFor(aId)->GetUnit() != eCSSUnit_Null;
   }
 
   void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue)
   {
     ValueFor(aId)->SetStringValue(aValue, eCSSUnit_Ident);
   }
 
@@ -165,27 +168,27 @@ struct nsRuleData final: mozilla::Generi
   {
     ValueFor(aId)->SetPercentValue(aValue);
   }
 
   void SetAutoValue(nsCSSPropertyID aId) {
     ValueFor(aId)->SetAutoValue();
   }
 
-  void SetCurrentColor(nsCSSPropertyID aId) {
+  void SetCurrentColor(nsCSSPropertyID aId)
+  {
     ValueFor(aId)->SetIntValue(NS_COLOR_CURRENTCOLOR, eCSSUnit_EnumColor);
   }
 
   void SetColorValue(nsCSSPropertyID aId, nscolor aValue)
   {
     ValueFor(aId)->SetColorValue(aValue);
   }
 
   void SetFontFamily(const nsString& aValue);
   void SetTextDecorationColorOverride();
   void SetBackgroundImage(nsAttrValue& aValue);
 
 private:
   inline size_t GetPoisonOffset();
-
 };
 
 #endif