Bug 1516368 - Align boolean members in nsIPresShell. r=botond
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sun, 30 Dec 2018 02:17:12 +0000
changeset 452133 ff2870cad3e63128f93cbadc227ed6a7b3b2146e
parent 452132 a17c856e81b5ab876db8bc26bc89ebcf78dfaf30
child 452134 592d38d2892f86e768f64ffcbf93878a2d0e8b61
push id35286
push usercsabou@mozilla.com
push dateSun, 30 Dec 2018 09:30:25 +0000
treeherdermozilla-central@592d38d2892f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1516368
milestone66.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 1516368 - Align boolean members in nsIPresShell. r=botond Depends on D15341 Differential Revision: https://phabricator.services.mozilla.com/D15342
layout/base/PresShell.cpp
layout/base/nsIPresShell.h
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -791,25 +791,25 @@ nsIPresShell::nsIPresShell()
       mWasLastReflowInterrupted(false),
       mVisualViewportSizeSet(false),
       mNeedLayoutFlush(true),
       mNeedStyleFlush(true),
       mObservingStyleFlushes(false),
       mObservingLayoutFlushes(false),
       mResizeEventPending(false),
       mNeedThrottledAnimationFlush(true),
-      mPresShellId(0),
-      mFontSizeInflationEmPerLine(0),
-      mFontSizeInflationMinTwips(0),
-      mFontSizeInflationLineThreshold(0),
       mFontSizeInflationForceEnabled(false),
       mFontSizeInflationDisabledInMasterProcess(false),
       mFontSizeInflationEnabled(false),
       mPaintingIsFrozen(false),
       mIsNeverPainting(false),
+      mPresShellId(0),
+      mFontSizeInflationEmPerLine(0),
+      mFontSizeInflationMinTwips(0),
+      mFontSizeInflationLineThreshold(0),
       mInFlush(false),
       mCurrentEventFrame(nullptr) {
 }
 
 PresShell::PresShell()
     : mCaretEnabled(false),
 #ifdef DEBUG
       mInVerifyReflow(false),
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -1851,38 +1851,41 @@ class nsIPresShell : public nsStubDocume
   bool mObservingLayoutFlushes : 1;
 
   bool mResizeEventPending : 1;
 
   // True if there are throttled animations that would be processed when
   // performing a flush with mFlushAnimations == true.
   bool mNeedThrottledAnimationFlush : 1;
 
+  bool mFontSizeInflationForceEnabled : 1;
+  bool mFontSizeInflationDisabledInMasterProcess : 1;
+  bool mFontSizeInflationEnabled : 1;
+
+  bool mPaintingIsFrozen : 1;
+
+  // If a document belongs to an invisible DocShell, this flag must be set
+  // to true, so we can avoid any paint calls for widget related to this
+  // presshell.
+  bool mIsNeverPainting : 1;
+
   uint32_t mPresShellId;
 
   static nsIContent* gKeyDownTarget;
 
   // Cached font inflation values. This is done to prevent changing of font
   // inflation until a page is reloaded.
   uint32_t mFontSizeInflationEmPerLine;
   uint32_t mFontSizeInflationMinTwips;
   uint32_t mFontSizeInflationLineThreshold;
-  bool mFontSizeInflationForceEnabled;
-  bool mFontSizeInflationDisabledInMasterProcess;
-  bool mFontSizeInflationEnabled;
-
-  bool mPaintingIsFrozen;
-
-  // If a document belongs to an invisible DocShell, this flag must be set
-  // to true, so we can avoid any paint calls for widget related to this
-  // presshell.
-  bool mIsNeverPainting;
 
   // Whether we're currently under a FlushPendingNotifications.
   // This is used to handle flush reentry correctly.
+  // NOTE: This can't be a bitfield since AutoRestore has a reference to this
+  // variable.
   bool mInFlush;
 
   nsIFrame* mCurrentEventFrame;
   nsCOMPtr<nsIContent> mCurrentEventContent;
   nsTArray<nsIFrame*> mCurrentEventFrameStack;
   nsCOMArray<nsIContent> mCurrentEventContentStack;
 };