Bug 1343596 - Part 1: Remove trailing whitespace r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Tue, 07 Mar 2017 11:29:19 +0100
changeset 347914 72067b245d41b3b45d0e09a0b6b5f68190ba1e61
parent 347913 0286599493ff51bcb8dc24b32683427383e6316d
child 347915 e2d9ac61dd7d8dbd7def184dafbf243f18eb557b
push id88120
push usercbook@mozilla.com
push dateThu, 16 Mar 2017 14:40:19 +0000
treeherdermozilla-inbound@0423d3fbfacf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1343596
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 1343596 - Part 1: Remove trailing whitespace r=mattwoodrow MozReview-Commit-ID: C3GgVaaou0j
layout/painting/nsDisplayList.h
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -72,44 +72,44 @@ class DisplayListBuilder;
 typedef mozilla::EnumSet<mozilla::gfx::CompositionOp> BlendModeSet;
 
 /*
  * An nsIFrame can have many different visual parts. For example an image frame
  * can have a background, border, and outline, the image itself, and a
  * translucent selection overlay. In general these parts can be drawn at
  * discontiguous z-levels; see CSS2.1 appendix E:
  * http://www.w3.org/TR/CSS21/zindex.html
- * 
+ *
  * We construct a display list for a frame tree that contains one item
  * for each visual part. The display list is itself a tree since some items
  * are containers for other items; however, its structure does not match
  * the structure of its source frame tree. The display list items are sorted
  * by z-order. A display list can be used to paint the frames, to determine
  * which frame is the target of a mouse event, and to determine what areas
  * need to be repainted when scrolling. The display lists built for each task
  * may be different for efficiency; in particular some frames need special
  * display list items only for event handling, and do not create these items
  * when the display list will be used for painting (the common case). For
  * example, when painting we avoid creating nsDisplayBackground items for
  * frames that don't display a visible background, but for event handling
  * we need those backgrounds because they are not transparent to events.
- * 
+ *
  * We could avoid constructing an explicit display list by traversing the
  * frame tree multiple times in clever ways. However, reifying the display list
  * reduces code complexity and reduces the number of times each frame must be
  * traversed to one, which seems to be good for performance. It also means
  * we can share code for painting, event handling and scroll analysis.
- * 
+ *
  * Display lists are short-lived; content and frame trees cannot change
  * between a display list being created and destroyed. Display lists should
  * not be created during reflow because the frame tree may be in an
  * inconsistent state (e.g., a frame's stored overflow-area may not include
  * the bounds of all its children). However, it should be fine to create
  * a display list while a reflow is pending, before it starts.
- * 
+ *
  * A display list covers the "extended" frame tree; the display list for a frame
  * tree containing FRAME/IFRAME elements can include frames from the subdocuments.
  *
  * Display item's coordinates are relative to their nearest reference frame ancestor.
  * Both the display root and any frame with a transform act as a reference frame
  * for their frame subtrees.
  */
 
@@ -406,24 +406,24 @@ public:
    */
   const nsIFrame* FindReferenceFrameFor(const nsIFrame *aFrame,
                                         nsPoint* aOffset = nullptr);
 
   /**
    * @return the root of the display list's frame (sub)tree, whose origin
    * establishes the coordinate system for the display list
    */
-  nsIFrame* RootReferenceFrame() 
+  nsIFrame* RootReferenceFrame()
   {
     return mReferenceFrame;
   }
 
   /**
    * @return a point pt such that adding pt to a coordinate relative to aFrame
-   * makes it relative to ReferenceFrame(), i.e., returns 
+   * makes it relative to ReferenceFrame(), i.e., returns
    * aFrame->GetOffsetToCrossDoc(ReferenceFrame()). The returned point is in
    * the appunits of aFrame.
    */
   const nsPoint ToReferenceFrame(const nsIFrame* aFrame) {
     nsPoint result;
     FindReferenceFrameFor(aFrame, &result);
     return result;
   }
@@ -546,18 +546,18 @@ public:
   void SetAncestorHasApzAwareEventHandler(bool aValue)
   {
     mAncestorHasApzAwareEventHandler = aValue;
   }
 
   bool HaveScrollableDisplayPort() const { return mHaveScrollableDisplayPort; }
   void SetHaveScrollableDisplayPort() { mHaveScrollableDisplayPort = true; }
 
-  bool SetIsCompositingCheap(bool aCompositingCheap) { 
-    bool temp = mIsCompositingCheap; 
+  bool SetIsCompositingCheap(bool aCompositingCheap) {
+    bool temp = mIsCompositingCheap;
     mIsCompositingCheap = aCompositingCheap;
     return temp;
   }
   bool IsCompositingCheap() const { return mIsCompositingCheap; }
   /**
    * Display the caret if needed.
    */
   void DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect,
@@ -1294,17 +1294,17 @@ public:
   }
   bool NeedToForceTransparentSurfaceForItem(nsDisplayItem* aItem);
 
   void SetContainsPluginItem() { mContainsPluginItem = true; }
   bool ContainsPluginItem() { return mContainsPluginItem; }
 
   /**
    * mContainsBlendMode is true if we processed a display item that
-   * has a blend mode attached. We do this so we can insert a 
+   * has a blend mode attached. We do this so we can insert a
    * nsDisplayBlendContainer in the parent stacking context.
    */
   void SetContainsBlendMode(bool aContainsBlendMode) { mContainsBlendMode = aContainsBlendMode; }
   bool ContainsBlendMode() const { return mContainsBlendMode; }
 
   uint32_t AllocatePerspectiveItemIndex() { return mPerspectiveItemIndex++; }
 
   DisplayListClipState& ClipState() { return mClipState; }
@@ -1552,33 +1552,33 @@ class nsDisplayList;
  * nsDisplayItemLink holds the link. The lists are linked from lowest to
  * highest in z-order.
  */
 class nsDisplayItemLink {
   // This is never instantiated directly, so no need to count constructors and
   // destructors.
 protected:
   nsDisplayItemLink() : mAbove(nullptr) {}
-  nsDisplayItem* mAbove;  
-  
+  nsDisplayItem* mAbove;
+
   friend class nsDisplayList;
 };
 
 /**
  * This is the unit of rendering and event testing. Each instance of this
  * class represents an entity that can be drawn on the screen, e.g., a
  * frame's CSS background, or a frame's text string.
- * 
+ *
  * nsDisplayItems can be containers --- i.e., they can perform hit testing
  * and painting by recursively traversing a list of child items.
- * 
+ *
  * These are arena-allocated during display list construction. A typical
  * subclass would just have a frame pointer, so its object would be just three
  * pointers (vtable, next-item, frame).
- * 
+ *
  * Display items belong to a list at all times (except temporarily as they
  * move from one list to another).
  */
 class nsDisplayItem : public nsDisplayItemLink {
 public:
   typedef mozilla::ContainerLayerParameters ContainerLayerParameters;
   typedef mozilla::DisplayItemClip DisplayItemClip;
   typedef mozilla::DisplayItemClipChain DisplayItemClipChain;
@@ -1724,52 +1724,52 @@ public:
   nsRect GetContentRect() {
     return Frame()->GetContentRectRelativeToSelf() + ToReferenceFrame();
   }
 
   /**
    * Checks if the frame(s) owning this display item have been marked as invalid,
    * and needing repainting.
    */
-  virtual bool IsInvalid(nsRect& aRect) { 
+  virtual bool IsInvalid(nsRect& aRect) {
     bool result = mFrame ? mFrame->IsInvalid(aRect) : false;
     aRect += ToReferenceFrame();
     return result;
   }
 
   /**
    * Creates and initializes an nsDisplayItemGeometry object that retains the current
    * areas covered by this display item. These need to retain enough information
-   * such that they can be compared against a future nsDisplayItem of the same type, 
+   * such that they can be compared against a future nsDisplayItem of the same type,
    * and determine if repainting needs to happen.
    *
    * Subclasses wishing to store more information need to override both this
    * and ComputeInvalidationRegion, as well as implementing an nsDisplayItemGeometry
    * subclass.
    *
    * The default implementation tracks both the display item bounds, and the frame's
    * border rect.
    */
   virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder)
   {
     return new nsDisplayItemGenericGeometry(this, aBuilder);
   }
 
   /**
-   * Compares an nsDisplayItemGeometry object from a previous paint against the 
-   * current item. Computes if the geometry of the item has changed, and the 
+   * Compares an nsDisplayItemGeometry object from a previous paint against the
+   * current item. Computes if the geometry of the item has changed, and the
    * invalidation area required for correct repainting.
    *
-   * The existing geometry will have been created from a display item with a 
+   * The existing geometry will have been created from a display item with a
    * matching GetPerFrameKey()/mFrame pair to the current item.
    *
    * The default implementation compares the display item bounds, and the frame's
    * border rect, and invalidates the entire bounds if either rect changes.
    *
-   * @param aGeometry The geometry of the matching display item from the 
+   * @param aGeometry The geometry of the matching display item from the
    * previous paint.
    * @param aInvalidRegion Output param, the region to invalidate, or
    * unchanged if none.
    */
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion* aInvalidRegion)
   {
@@ -1907,17 +1907,17 @@ public:
 #endif
 
   /**
    * Get the layer drawn by this display item. Call this only if
    * GetLayerState() returns something other than LAYER_NONE.
    * If GetLayerState returned LAYER_NONE then Paint will be called
    * instead.
    * This is called while aManager is in the construction phase.
-   * 
+   *
    * The caller (nsDisplayList) is responsible for setting the visible
    * region of the layer.
    *
    * @param aContainerParameters should be passed to
    * FrameLayerBuilder::BuildContainerLayerFor if a ContainerLayer is
    * constructed.
    */
   virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
@@ -2113,17 +2113,17 @@ public:
   virtual void DisableComponentAlpha() {}
 
   /**
    * Check if we can add async animations to the layer for this display item.
    */
   virtual bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) {
     return false;
   }
-  
+
   virtual bool SupportsOptimizingToImage() { return false; }
 
   const DisplayItemClip& GetClip()
   {
     return mClip ? *mClip : DisplayItemClip::NoClip();
   }
   void IntersectClip(nsDisplayListBuilder* aBuilder, const DisplayItemClipChain* aOther);
 
@@ -2169,22 +2169,22 @@ protected:
 #ifdef MOZ_DUMP_PAINTING
   // True if this frame has been painted.
   bool      mPainted;
 #endif
 };
 
 /**
  * Manages a singly-linked list of display list items.
- * 
+ *
  * mSentinel is the sentinel list value, the first value in the null-terminated
  * linked list of items. mTop is the last item in the list (whose 'above'
  * pointer is null). This class has no virtual methods. So list objects are just
  * two pointers.
- * 
+ *
  * Stepping upward through this list is very fast. Stepping downward is very
  * slow so we don't support it. The methods that need to step downward
  * (HitTest(), ComputeVisibility()) internally build a temporary array of all
  * the items while they do the downward traversal, so overall they're still
  * linear time. We have optimized for efficient AppendToTop() of both
  * items and lists, with minimal codesize. AppendToBottom() is efficient too.
  */
 class nsDisplayList {
@@ -2216,101 +2216,101 @@ public:
    * be in a list and cannot be null.
    */
   void AppendToTop(nsDisplayItem* aItem) {
     NS_ASSERTION(aItem, "No item to append!");
     NS_ASSERTION(!aItem->mAbove, "Already in a list!");
     mTop->mAbove = aItem;
     mTop = aItem;
   }
-  
+
   /**
    * Append a new item to the top of the list. The intended usage is
    * AppendNewToTop(new ...);
    */
   void AppendNewToTop(nsDisplayItem* aItem) {
     if (aItem) {
       AppendToTop(aItem);
     }
   }
-  
+
   /**
    * Append a new item to the bottom of the list. The intended usage is
    * AppendNewToBottom(new ...);
    */
   void AppendNewToBottom(nsDisplayItem* aItem) {
     if (aItem) {
       AppendToBottom(aItem);
     }
   }
-  
+
   /**
    * Append a new item to the bottom of the list. The item must be non-null
    * and not already in a list.
    */
   void AppendToBottom(nsDisplayItem* aItem) {
     NS_ASSERTION(aItem, "No item to append!");
     NS_ASSERTION(!aItem->mAbove, "Already in a list!");
     aItem->mAbove = mSentinel.mAbove;
     mSentinel.mAbove = aItem;
     if (mTop == &mSentinel) {
       mTop = aItem;
     }
   }
-  
+
   /**
    * Removes all items from aList and appends them to the top of this list
    */
   void AppendToTop(nsDisplayList* aList) {
     if (aList->mSentinel.mAbove) {
       mTop->mAbove = aList->mSentinel.mAbove;
       mTop = aList->mTop;
       aList->mTop = &aList->mSentinel;
       aList->mSentinel.mAbove = nullptr;
     }
   }
-  
+
   /**
    * Removes all items from aList and prepends them to the bottom of this list
    */
   void AppendToBottom(nsDisplayList* aList) {
     if (aList->mSentinel.mAbove) {
       aList->mTop->mAbove = mSentinel.mAbove;
       mSentinel.mAbove = aList->mSentinel.mAbove;
       if (mTop == &mSentinel) {
         mTop = aList->mTop;
       }
-           
+
       aList->mTop = &aList->mSentinel;
       aList->mSentinel.mAbove = nullptr;
     }
   }
-  
+
   /**
    * Remove an item from the bottom of the list and return it.
    */
   nsDisplayItem* RemoveBottom();
-  
+
   /**
    * Remove all items from the list and call their destructors.
    */
   void DeleteAll();
-  
+
   /**
    * @return the item at the top of the list, or null if the list is empty
    */
   nsDisplayItem* GetTop() const {
     return mTop != &mSentinel ? static_cast<nsDisplayItem*>(mTop) : nullptr;
   }
   /**
    * @return the item at the bottom of the list, or null if the list is empty
    */
   nsDisplayItem* GetBottom() const { return mSentinel.mAbove; }
   bool IsEmpty() const { return mTop == &mSentinel; }
-  
+
   /**
    * This is *linear time*!
    * @return the number of items in the list
    */
   uint32_t Count() const;
   /**
    * Stable sort the list by the z-order of GetUnderlyingFrame() on
    * each item. 'auto' is counted as zero.
@@ -2345,17 +2345,17 @@ public:
    * that must be applied to every display item. In particular, this
    * sets mVisibleRect on each display item.
    * This sets mIsOpaque if the entire visible area of this list has
    * been removed from aVisibleRegion when we return.
    * This does not remove any items from the list, so we can recompute
    * visiblity with different regions later (see
    * FrameLayerBuilder::DrawPaintedLayer).
    * This method needs to be idempotent.
-   * 
+   *
    * @param aVisibleRegion the area that is visible, relative to the
    * reference frame; on return, this contains the area visible under the list.
    * I.e., opaque contents of this list are subtracted from aVisibleRegion.
    * @param aListVisibleBounds must be equal to the bounds of the intersection
    * of aVisibleRegion and GetBounds() for this list.
    * @return true if any item in the list is visible.
    */
   bool ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
@@ -2387,23 +2387,23 @@ public:
     return mForceTransparentSurface;
   }
   /**
    * Paint the list to the rendering context. We assume that (0,0) in aCtx
    * corresponds to the origin of the reference frame. For best results,
    * aCtx's current transform should make (0,0) pixel-aligned. The
    * rectangle in aDirtyRect is painted, which *must* be contained in the
    * dirty rect used to construct the display list.
-   * 
+   *
    * If aFlags contains PAINT_USE_WIDGET_LAYERS and
    * ShouldUseWidgetLayerManager() is set, then we will paint using
    * the reference frame's widget's layer manager (and ctx may be null),
    * otherwise we will use a temporary BasicLayerManager and ctx must
    * not be null.
-   * 
+   *
    * If PAINT_EXISTING_TRANSACTION is set, the reference frame's widget's
    * layer manager has already had BeginTransaction() called on it and
    * we should not call it again.
    *
    * If PAINT_COMPRESSED is set, the FrameLayerBuilder should be set to compressed mode
    * to avoid short cut optimizations.
    *
    * This must only be called on the root display list of the display list
@@ -2462,17 +2462,17 @@ public:
   {
     mForceTransparentSurface = true;
   }
 
 private:
   // This class is only used on stack, so we don't have to worry about leaking
   // it.  Don't let us be heap-allocated!
   void* operator new(size_t sz) CPP_THROW_NEW;
-  
+
   nsDisplayItemLink  mSentinel;
   nsDisplayItemLink* mTop;
 
   // This is set to true by FrameLayerBuilder if the final visible region
   // is empty (i.e. everything that was visible is covered by some
   // opaque content in this list).
   bool mIsOpaque;
   // This is set to true by FrameLayerBuilder if any display item in this
@@ -2500,31 +2500,31 @@ public:
    */
   nsDisplayList* BlockBorderBackgrounds() const { return mBlockBorderBackgrounds; }
   /**
    * @return a list where one should place descendant floats (step 5 of
    * CSS 2.1 appendix E)
    */
   nsDisplayList* Floats() const { return mFloats; }
   /**
-   * @return a list where one should place the (pseudo) stacking contexts 
+   * @return a list where one should place the (pseudo) stacking contexts
    * for descendants of this frame (everything from steps 3, 7 and 8
    * of CSS 2.1 appendix E)
    */
   nsDisplayList* PositionedDescendants() const { return mPositioned; }
   /**
    * @return a list where one should place the outlines
    * for this frame and its descendants (step 9 of CSS 2.1 appendix E)
    */
   nsDisplayList* Outlines() const { return mOutlines; }
   /**
    * @return a list where one should place all other content
    */
   nsDisplayList* Content() const { return mContent; }
-  
+
   nsDisplayListSet(nsDisplayList* aBorderBackground,
                    nsDisplayList* aBlockBorderBackgrounds,
                    nsDisplayList* aFloats,
                    nsDisplayList* aContent,
                    nsDisplayList* aPositionedDescendants,
                    nsDisplayList* aOutlines) :
      mBorderBackground(aBorderBackground),
      mBlockBorderBackgrounds(aBlockBorderBackgrounds),
@@ -2532,27 +2532,27 @@ public:
      mContent(aContent),
      mPositioned(aPositionedDescendants),
      mOutlines(aOutlines) {
   }
 
   /**
    * A copy constructor that lets the caller override the BorderBackground
    * list.
-   */  
+   */
   nsDisplayListSet(const nsDisplayListSet& aLists,
                    nsDisplayList* aBorderBackground) :
      mBorderBackground(aBorderBackground),
      mBlockBorderBackgrounds(aLists.BlockBorderBackgrounds()),
      mFloats(aLists.Floats()),
      mContent(aLists.Content()),
      mPositioned(aLists.PositionedDescendants()),
      mOutlines(aLists.Outlines()) {
   }
-  
+
   /**
    * Move all display items in our lists to top of the corresponding lists in the
    * destination.
    */
   void MoveTo(const nsDisplayListSet& aDestination) const;
 
 private:
   // This class is only used on stack, so we don't have to worry about leaking
@@ -2577,17 +2577,17 @@ struct nsDisplayListCollection : public 
     nsDisplayListSet(&mLists[0], &mLists[1], &mLists[2], &mLists[3], &mLists[4],
                      &mLists[5]) {}
   explicit nsDisplayListCollection(nsDisplayList* aBorderBackground) :
     nsDisplayListSet(aBorderBackground, &mLists[1], &mLists[2], &mLists[3], &mLists[4],
                      &mLists[5]) {}
 
   /**
    * Sort all lists by content order.
-   */                     
+   */
   void SortAllByContentOrder(nsIContent* aCommonAncestor) {
     for (int32_t i = 0; i < 6; ++i) {
       mLists[i].SortByContentOrder(aCommonAncestor);
     }
   }
 
 private:
   // This class is only used on stack, so we don't have to worry about leaking
@@ -2628,17 +2628,17 @@ public:
 
   virtual bool SupportsOptimizingToImage() override { return true; }
 };
 
 /**
  * Use this class to implement not-very-frequently-used display items
  * that are not opaque, do not receive events, and are bounded by a frame's
  * border-rect.
- * 
+ *
  * This should not be used for display items which are created frequently,
  * because each item is one or two pointers bigger than an item from a
  * custom display item class could be, and fractionally slower. However it does
  * save code size. We use this for infrequently-used item types.
  */
 class nsDisplayGeneric : public nsDisplayItem {
 public:
   typedef void (* PaintCallback)(nsIFrame* aFrame, DrawTarget* aDrawTarget,
@@ -2670,17 +2670,17 @@ public:
   {
     MOZ_COUNT_CTOR(nsDisplayGeneric);
   }
 #ifdef NS_BUILD_REFCNT_LOGGING
   virtual ~nsDisplayGeneric() {
     MOZ_COUNT_DTOR(nsDisplayGeneric);
   }
 #endif
-  
+
   virtual void Paint(nsDisplayListBuilder* aBuilder,
                      nsRenderingContext* aCtx) override {
     MOZ_ASSERT(!!mPaint != !!mOldPaint);
     if (mPaint) {
       mPaint(mFrame, aCtx->GetDrawTarget(), mVisibleRect, ToReferenceFrame());
     } else {
       mOldPaint(mFrame, aCtx, mVisibleRect, ToReferenceFrame());
     }
@@ -3122,17 +3122,17 @@ public:
   virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override
   {
     return new nsDisplayBackgroundGeometry(this, aBuilder);
   }
 
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion* aInvalidRegion) override;
-  
+
   virtual bool CanOptimizeToImageLayer(LayerManager* aManager,
                                        nsDisplayListBuilder* aBuilder) override;
   virtual already_AddRefed<imgIContainer> GetImage() override;
   virtual nsRect GetDestRect() override;
 
   static nsRegion GetInsideClipRegion(nsDisplayItem* aItem,
                                       StyleGeometryBox aClip,
                                       const nsRect& aRect,
@@ -3362,21 +3362,21 @@ public:
 #endif
 
   virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
   virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
   virtual bool IsInvisibleInRect(const nsRect& aRect) override;
   virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                  nsRegion* aVisibleRegion) override;
   NS_DISPLAY_DECL_NAME("BoxShadowOuter", TYPE_BOX_SHADOW_OUTER)
-  
+
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion* aInvalidRegion) override;
-  
+
   virtual void ApplyOpacity(nsDisplayListBuilder* aBuilder,
                             float aOpacity,
                             const DisplayItemClipChain* aClip) override
   {
     NS_ASSERTION(CanApplyOpacity(), "ApplyOpacity should be allowed");
     mOpacity = aOpacity;
     IntersectClip(aBuilder, aClip);
   }
@@ -3422,17 +3422,17 @@ public:
     MOZ_COUNT_DTOR(nsDisplayBoxShadowInner);
   }
 #endif
 
   virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override;
   virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                  nsRegion* aVisibleRegion) override;
   NS_DISPLAY_DECL_NAME("BoxShadowInner", TYPE_BOX_SHADOW_INNER)
-  
+
   virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override
   {
     return new nsDisplayBoxShadowInnerGeometry(this, aBuilder);
   }
 
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion* aInvalidRegion) override
@@ -3618,23 +3618,23 @@ private:
   // this display item is overridden to be the largest z-index of the content
   // in the scroll frame. This ensures that the event regions item remains on
   // top of the content after sorting items by z-index.
   mozilla::Maybe<int32_t> mOverrideZIndex;
 };
 
 /**
  * A class that lets you wrap a display list as a display item.
- * 
+ *
  * GetUnderlyingFrame() is troublesome for wrapped lists because if the wrapped
  * list has many items, it's not clear which one has the 'underlying frame'.
  * Thus we force the creator to specify what the underlying frame is. The
  * underlying frame should be the root of a stacking context, because sorting
  * a list containing this item will not get at the children.
- * 
+ *
  * In some cases (e.g., clipping) we want to wrap a list but we don't have a
  * particular underlying frame that is a stacking context root. In that case
  * we allow the frame to be nullptr. Callers to GetUnderlyingFrame must
  * detect and handle this case.
  */
 class nsDisplayWrapList : public nsDisplayItem {
 public:
   /**
@@ -3702,17 +3702,17 @@ public:
       aRect = aRect.Union(temp);
     }
     aRect += ToReferenceFrame();
     return !aRect.IsEmpty();
   }
   NS_DISPLAY_DECL_NAME("WrapList", TYPE_WRAP_LIST)
 
   virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) override;
-                                    
+
   virtual nsDisplayList* GetSameCoordinateSystemChildren() override
   {
     NS_ASSERTION(mList.IsEmpty() || !ReferenceFrame() ||
                  !mList.GetBottom()->ReferenceFrame() ||
                  mList.GetBottom()->ReferenceFrame() == ReferenceFrame(),
                  "Children must have same reference frame");
     return &mList;
   }
@@ -3901,17 +3901,17 @@ public:
     static nsDisplayBlendContainer*
     CreateForBackgroundBlendMode(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
                                  nsDisplayList* aList,
                                  const ActiveScrolledRoot* aActiveScrolledRoot);
 
 #ifdef NS_BUILD_REFCNT_LOGGING
     virtual ~nsDisplayBlendContainer();
 #endif
-    
+
     virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
                                                LayerManager* aManager,
                                                const ContainerLayerParameters& aContainerParameters) override;
     virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                      LayerManager* aManager,
                                      const ContainerLayerParameters& aParameters) override;
     virtual bool TryMerge(nsDisplayItem* aItem) override;
     virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) override {
@@ -3968,17 +3968,17 @@ public:
                     const ActiveScrolledRoot* aActiveScrolledRoot,
                     uint32_t aFlags = 0,
                     ViewID aScrollTarget = mozilla::layers::FrameMetrics::NULL_SCROLL_ID,
                     float aScrollbarThumbRatio = 0.0f,
                     bool aForceActive = true);
 #ifdef NS_BUILD_REFCNT_LOGGING
   virtual ~nsDisplayOwnLayer();
 #endif
-  
+
   virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
                                              LayerManager* aManager,
                                              const ContainerLayerParameters& aContainerParameters) override;
   virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                    LayerManager* aManager,
                                    const ContainerLayerParameters& aParameters) override;
   virtual bool TryMerge(nsDisplayItem* aItem) override
   {
@@ -4196,17 +4196,17 @@ public:
    */
   nsDisplayZoom(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
                 nsDisplayList* aList,
                 int32_t aAPD, int32_t aParentAPD,
                 uint32_t aFlags = 0);
 #ifdef NS_BUILD_REFCNT_LOGGING
   virtual ~nsDisplayZoom();
 #endif
-  
+
   virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
   virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                        HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) override;
   virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                  nsRegion* aVisibleRegion) override;
   virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                    LayerManager* aManager,
                                    const ContainerLayerParameters& aParameters) override
@@ -4371,17 +4371,17 @@ public:
  * The reason that a "bounds" rect is involved in transform calculations is
  * because CSS-transforms allow percentage values for the x and y components
  * of <translation-value>s, where percentages are percentages of the element's
  * border box.
  *
  * INVARIANT: The wrapped frame is transformed or we supplied a transform getter
  * function.
  * INVARIANT: The wrapped frame is non-null.
- */ 
+ */
 class nsDisplayTransform: public nsDisplayItem
 {
   typedef mozilla::gfx::Matrix4x4 Matrix4x4;
   typedef mozilla::gfx::Point3D Point3D;
 
   /*
    * Avoid doing UpdateBounds() during construction.
    */
@@ -4472,34 +4472,34 @@ public:
                                    const ContainerLayerParameters& aParameters) override;
   virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
                                              LayerManager* aManager,
                                              const ContainerLayerParameters& aContainerParameters) override;
   virtual bool ShouldBuildLayerEvenIfInvisible(nsDisplayListBuilder* aBuilder) override;
   virtual bool ComputeVisibility(nsDisplayListBuilder *aBuilder,
                                  nsRegion *aVisibleRegion) override;
   virtual bool TryMerge(nsDisplayItem *aItem) override;
-  
+
   virtual uint32_t GetPerFrameKey() override { return (mIndex << nsDisplayItem::TYPE_BITS) | nsDisplayItem::GetPerFrameKey(); }
-  
+
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion* aInvalidRegion) override
   {
     // We don't need to compute an invalidation region since we have LayerTreeInvalidation
   }
 
   virtual const nsIFrame* ReferenceFrameForChildren() const override {
     // If we were created using a transform-getter, then we don't
     // belong to a transformed frame, and aren't a reference frame
     // for our children.
     if (!mTransformGetter) {
       return mFrame;
     }
-    return nsDisplayItem::ReferenceFrameForChildren(); 
+    return nsDisplayItem::ReferenceFrameForChildren();
   }
 
   AnimatedGeometryRoot* AnimatedGeometryRootForScrollMetadata() const override {
     return mAnimatedGeometryRootForScrollMetadata;
   }
 
   virtual const nsRect& GetVisibleRectForChildren() const override
   {
@@ -4540,17 +4540,17 @@ public:
    *        function raises an assertion if aFrame is null or doesn't have a
    *        transform applied to it.
    * @param aOrigin The origin of the transform relative to aFrame's local
    *        coordinate space.
    * @param aBoundsOverride (optional) Rather than using the frame's computed
    *        bounding rect as frame bounds, use this rectangle instead.  Pass
    *        nullptr (or nothing at all) to use the default.
    */
-  static nsRect TransformRect(const nsRect &aUntransformedBounds, 
+  static nsRect TransformRect(const nsRect &aUntransformedBounds,
                               const nsIFrame* aFrame,
                               const nsRect* aBoundsOverride = nullptr);
 
   /* UntransformRect is like TransformRect, except that it inverts the
    * transform.
    */
   static bool UntransformRect(const nsRect &aTransformedBounds,
                               const nsRect &aChildBounds,