Bug 1365659 part 1. Change stylo element snapshot member ordering to pack a bit better. r=emilio
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 18 May 2017 11:30:42 -0400
changeset 359068 a6e31b43d76bf0a1139a2d8a14e04cd59fc2c70b
parent 359067 756d4609d48617cbfaa79ad0038c62e56430ac31
child 359069 296338483720809657faf01bbb8a65c7c3923ca9
push id31849
push userryanvm@gmail.com
push dateFri, 19 May 2017 15:38:10 +0000
treeherdermozilla-central@52b207e50972 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1365659
milestone55.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 1365659 part 1. Change stylo element snapshot member ordering to pack a bit better. r=emilio MozReview-Commit-ID: 4pe8JJAXiXz
layout/style/ServoElementSnapshot.cpp
layout/style/ServoElementSnapshot.h
--- a/layout/style/ServoElementSnapshot.cpp
+++ b/layout/style/ServoElementSnapshot.cpp
@@ -7,18 +7,18 @@
 #include "mozilla/ServoElementSnapshot.h"
 #include "mozilla/dom/Element.h"
 #include "nsIContentInlines.h"
 #include "nsContentUtils.h"
 
 namespace mozilla {
 
 ServoElementSnapshot::ServoElementSnapshot(const Element* aElement)
-  : mContains(Flags(0))
-  , mState(0)
+  : mState(0)
+  , mContains(Flags(0))
 {
   MOZ_COUNT_CTOR(ServoElementSnapshot);
   mIsHTMLElementInHTMLDocument =
     aElement->IsHTMLElement() && aElement->IsInHTMLDocument();
   mIsInChromeDocument =
     nsContentUtils::IsChromeDoc(aElement->OwnerDoc());
 }
 
--- a/layout/style/ServoElementSnapshot.h
+++ b/layout/style/ServoElementSnapshot.h
@@ -139,18 +139,18 @@ public:
 
   bool HasAny(Flags aFlags) const { return bool(mContains & aFlags); }
 
 private:
   // TODO: Profile, a 1 or 2 element AutoTArray could be worth it, given we know
   // we're dealing with attribute changes when we take snapshots of attributes,
   // though it can be wasted space if we deal with a lot of state-only
   // snapshots.
-  Flags mContains;
   nsTArray<ServoAttrSnapshot> mAttrs;
   ServoStateType mState;
+  Flags mContains;
   bool mIsHTMLElementInHTMLDocument;
   bool mIsInChromeDocument;
 };
 
 } // namespace mozilla
 
 #endif