Bug 1113010 (part 2) - Shrink FrameConstructionItem by using bitfields. r=dholbert.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 18 Dec 2014 14:15:18 -0800
changeset 220561 9bc70d029f38d732676eb3477b6ad9939c22ea1f
parent 220560 6de36c22d51919734e0435e2e35acb63bbc46513
child 220562 adfa2efc886e612131e8a60c1273380c4a8c44a3
push id10503
push userryanvm@gmail.com
push dateFri, 19 Dec 2014 20:13:42 +0000
treeherderfx-team@98ee95ac6be5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1113010
milestone37.0a1
Bug 1113010 (part 2) - Shrink FrameConstructionItem by using bitfields. r=dholbert. This reduces its size from 168 bytes to 160 bytes on 64-bit platforms.
layout/base/nsCSSFrameConstructor.h
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -1123,49 +1123,49 @@ private:
     // insertion point before doing so and pop it afterward.
     PendingBinding* mPendingBinding;
     // The style context to use for creating the new frame.
     nsRefPtr<nsStyleContext> mStyleContext;
     // The XBL-resolved namespace to use for frame construction.
     int32_t mNameSpaceID;
     // Whether optimizations to skip constructing textframes around
     // this content need to be suppressed.
-    bool mSuppressWhiteSpaceOptimizations;
+    bool mSuppressWhiteSpaceOptimizations:1;
     // Whether this is a text content item.
-    bool mIsText;
+    bool mIsText:1;
     // Whether this is a generated content container.
     // If it is, mContent is a strong pointer.
-    bool mIsGeneratedContent;
+    bool mIsGeneratedContent:1;
     // Whether this is an item for nsIAnonymousContentCreator content.
-    bool mIsAnonymousContentCreatorContent;
+    bool mIsAnonymousContentCreatorContent:1;
     // Whether this is an item for the root popupgroup.
-    bool mIsRootPopupgroup;
+    bool mIsRootPopupgroup:1;
     // Whether construction from this item will create only frames that are
     // IsInlineOutside() in the principal child list.  This is not precise, but
     // conservative: if true the frames will really be inline, whereas if false
     // they might still all be inline.
-    bool mIsAllInline;
+    bool mIsAllInline:1;
     // Whether construction from this item will create only frames that are
     // IsBlockOutside() in the principal child list.  This is not precise, but
     // conservative: if true the frames will really be blocks, whereas if false
     // they might still be blocks (and in particular, out-of-flows that didn't
     // find a containing block).
-    bool mIsBlock;
+    bool mIsBlock:1;
     // Whether construction from this item will give leading and trailing
     // inline frames.  This is equal to mIsAllInline, except for inline frame
     // items, where it's always true, whereas mIsAllInline might be false due
     // to {ib} splits.
-    bool mHasInlineEnds;
+    bool mHasInlineEnds:1;
     // Whether construction from this item will create a popup that needs to
     // go into the global popup items.
-    bool mIsPopup;
+    bool mIsPopup:1;
     // Whether this item should be treated as a line participant
-    bool mIsLineParticipant;
+    bool mIsLineParticipant:1;
     // Whether this item is for an SVG <a> element
-    bool mIsForSVGAElement;
+    bool mIsForSVGAElement:1;
 
   private:
     FrameConstructionItem(const FrameConstructionItem& aOther) MOZ_DELETE; /* not implemented */
   };
 
   /**
    * Function to create the anonymous flex or grid items that we need.
    * If aParentFrame is not a nsFlexContainerFrame or nsGridContainerFrame then