Backed out changeset 4909935f8081 (bug 1319626)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 24 Nov 2016 17:02:32 +0100
changeset 369145 2be7dfbc71592c3186f11d4dfa4987a4752325f6
parent 369144 5815da7bd4a277400da119d6a7ac0881d9c6b003
child 369146 bad312aefb42982f492ad2cf36f4c6c3d698f4f7
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1319626
milestone53.0a1
backs out4909935f808198cbcc81e44f0018d8d417414cba
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
Backed out changeset 4909935f8081 (bug 1319626)
gfx/ipc/GfxMessageUtils.h
gfx/layers/LayerTreeInvalidation.cpp
gfx/layers/Layers.cpp
gfx/layers/Layers.h
gfx/layers/LayersTypes.h
gfx/layers/basic/BasicBorderLayer.cpp
gfx/layers/basic/BasicLayers.h
gfx/layers/client/ClientBorderLayer.cpp
gfx/layers/client/ClientLayerManager.h
gfx/layers/composite/LayerManagerComposite.cpp
gfx/layers/composite/LayerManagerComposite.h
gfx/layers/ipc/LayerTransactionParent.cpp
gfx/layers/ipc/LayersMessages.ipdlh
gfx/layers/ipc/ShadowLayerParent.cpp
gfx/layers/ipc/ShadowLayerParent.h
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/ipc/ShadowLayers.h
gfx/layers/moz.build
mfbt/Array.h
--- a/gfx/ipc/GfxMessageUtils.h
+++ b/gfx/ipc/GfxMessageUtils.h
@@ -20,17 +20,16 @@
 #include "ipc/IPCMessageUtils.h"
 #include "mozilla/gfx/Matrix.h"
 #include "mozilla/layers/AsyncDragMetrics.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/GeckoContentController.h"
 #include "mozilla/layers/LayersTypes.h"
 #include "nsRect.h"
 #include "nsRegion.h"
-#include "mozilla/Array.h"
 
 #include <stdint.h>
 
 #ifdef _MSC_VER
 #pragma warning( disable : 4800 )
 #endif
 
 namespace mozilla {
@@ -1280,31 +1279,11 @@ struct ParamTraits<mozilla::gfx::Glyph>
 
   static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) {
     return (ReadParam(aMsg, aIter, &aResult->mIndex) &&
             ReadParam(aMsg, aIter, &aResult->mPosition)
       );
   }
 };
 
-template<typename T, size_t Length>
-struct ParamTraits<mozilla::Array<T, Length>>
-{
-  typedef mozilla::Array<T, Length> paramType;
-  static void Write(Message* aMsg, const paramType& aParam) {
-    for (size_t i = 0; i < Length; i++) {
-      WriteParam(aMsg, aParam[i]);
-    }
-  }
-
-  static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) {
-    for (size_t i = 0; i < Length; i++) {
-      if (!ReadParam(aMsg, aIter, &aResult[i])) {
-        return false;
-      }
-    }
-    return true;
-  }
-};
-
 } /* namespace IPC */
 
 #endif /* __GFXMESSAGEUTILS_H__ */
--- a/gfx/layers/LayerTreeInvalidation.cpp
+++ b/gfx/layers/LayerTreeInvalidation.cpp
@@ -605,17 +605,16 @@ CloneLayerTreePropertiesInternal(Layer* 
     case Layer::TYPE_IMAGE:
       return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot), aIsMask);
     case Layer::TYPE_CANVAS:
       return MakeUnique<CanvasLayerProperties>(static_cast<CanvasLayer*>(aRoot));
     case Layer::TYPE_READBACK:
     case Layer::TYPE_SHADOW:
     case Layer::TYPE_PAINTED:
     case Layer::TYPE_TEXT:
-    case Layer::TYPE_BORDER:
       return MakeUnique<LayerPropertiesBase>(aRoot);
   }
 
   MOZ_ASSERT_UNREACHABLE("Unexpected root layer type");
   return MakeUnique<LayerPropertiesBase>(aRoot);
 }
 
 /* static */ UniquePtr<LayerProperties>
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -2212,28 +2212,16 @@ TextLayer::DumpPacket(layerscope::Layers
 {
   Layer::DumpPacket(aPacket, aParent);
   // Get this layer data
   using namespace layerscope;
   LayersPacket::Layer* layer = aPacket->mutable_layer(aPacket->layer_size()-1);
   layer->set_type(LayersPacket::Layer::TextLayer);
 }
 
-void
-BorderLayer::PrintInfo(std::stringstream& aStream, const char* aPrefix)
-{
-  Layer::PrintInfo(aStream, aPrefix);
-}
-
-void
-BorderLayer::DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent)
-{
-  Layer::DumpPacket(aPacket, aParent);
-}
-
 CanvasLayer::CanvasLayer(LayerManager* aManager, void* aImplData)
   : Layer(aManager, aImplData)
   , mPreTransCallback(nullptr)
   , mPreTransCallbackData(nullptr)
   , mPostTransCallback(nullptr)
   , mPostTransCallbackData(nullptr)
   , mSamplingFilter(gfx::SamplingFilter::GOOD)
   , mDirty(false)
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -13,17 +13,16 @@
 #include "FrameMetrics.h"               // for FrameMetrics
 #include "Units.h"                      // for LayerMargin, LayerPoint, ParentLayerIntRect
 #include "gfxContext.h"
 #include "gfxTypes.h"
 #include "gfxPoint.h"                   // for gfxPoint
 #include "gfxRect.h"                    // for gfxRect
 #include "gfx2DGlue.h"
 #include "mozilla/Assertions.h"         // for MOZ_ASSERT_HELPER2, etc
-#include "mozilla/Array.h"
 #include "mozilla/DebugOnly.h"          // for DebugOnly
 #include "mozilla/EventForwards.h"      // for nsPaintEvent
 #include "mozilla/Maybe.h"              // for Maybe
 #include "mozilla/Poison.h"
 #include "mozilla/RefPtr.h"             // for already_AddRefed
 #include "mozilla/StyleAnimationValue.h" // for StyleAnimationValue, etc
 #include "mozilla/TimeStamp.h"          // for TimeStamp, TimeDuration
 #include "mozilla/UniquePtr.h"          // for UniquePtr
@@ -83,17 +82,16 @@ class ClientLayerManager;
 class Layer;
 class LayerMetricsWrapper;
 class PaintedLayer;
 class ContainerLayer;
 class ImageLayer;
 class ColorLayer;
 class TextLayer;
 class CanvasLayer;
-class BorderLayer;
 class ReadbackLayer;
 class ReadbackProcessor;
 class RefLayer;
 class HostLayer;
 class ShadowableLayer;
 class ShadowLayerForwarder;
 class LayerManagerComposite;
 class SpecificLayerAttributes;
@@ -406,21 +404,16 @@ public:
   virtual already_AddRefed<ColorLayer> CreateColorLayer() = 0;
   /**
    * CONSTRUCTION PHASE ONLY
    * Create a TextLayer for this manager's layer tree.
    */
   virtual already_AddRefed<TextLayer> CreateTextLayer() = 0;
   /**
    * CONSTRUCTION PHASE ONLY
-   * Create a BorderLayer for this manager's layer tree.
-   */
-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() { return nullptr; }
-  /**
-   * CONSTRUCTION PHASE ONLY
    * Create a CanvasLayer for this manager's layer tree.
    */
   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() = 0;
   /**
    * CONSTRUCTION PHASE ONLY
    * Create a ReadbackLayer for this manager's layer tree.
    */
   virtual already_AddRefed<ReadbackLayer> CreateReadbackLayer() { return nullptr; }
@@ -754,17 +747,16 @@ class Layer {
 public:
   // Keep these in alphabetical order
   enum LayerType {
     TYPE_CANVAS,
     TYPE_COLOR,
     TYPE_CONTAINER,
     TYPE_IMAGE,
     TYPE_TEXT,
-    TYPE_BORDER,
     TYPE_READBACK,
     TYPE_REF,
     TYPE_SHADOW,
     TYPE_PAINTED
   };
 
   /**
    * Returns the LayerManager this Layer belongs to. Note that the layer
@@ -1540,22 +1532,16 @@ public:
 
   /**
     * Dynamic cast to a TextLayer. Returns null if this is not a
     * TextLayer.
     */
   virtual TextLayer* AsTextLayer() { return nullptr; }
 
   /**
-    * Dynamic cast to a Border. Returns null if this is not a
-    * ColorLayer.
-    */
-  virtual BorderLayer* AsBorderLayer() { return nullptr; }
-
-  /**
    * Dynamic cast to a LayerComposite.  Return null if this is not a
    * LayerComposite.  Can be used anytime.
    */
   virtual HostLayer* AsHostLayer() { return nullptr; }
 
   /**
    * Dynamic cast to a ShadowableLayer.  Return null if this is not a
    * ShadowableLayer.  Can be used anytime.
@@ -2401,83 +2387,16 @@ protected:
   virtual void DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent) override;
 
   gfx::IntRect mBounds;
   nsTArray<GlyphArray> mGlyphs;
   RefPtr<gfx::ScaledFont> mFont;
 };
 
 /**
- * A Layer which renders a rounded rect.
- */
-class BorderLayer : public Layer {
-public:
-  virtual BorderLayer* AsBorderLayer() override { return this; }
-
-  /**
-   * CONSTRUCTION PHASE ONLY
-   * Set the color of the layer.
-   */
-
-  // Colors of each side as in css::Side
-  virtual void SetColors(const BorderColors& aColors)
-  {
-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Colors", this));
-    PodCopy(&mColors[0], &aColors[0], 4);
-    Mutated();
-  }
-
-  virtual void SetRect(const LayerRect& aRect)
-  {
-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Rect", this));
-    mRect = aRect;
-    Mutated();
-  }
-
-  // Size of each rounded corner as in css::Corner, 0.0 means a
-  // rectangular corner.
-  virtual void SetCornerRadii(const BorderCorners& aCorners)
-  {
-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Corners", this));
-    PodCopy(&mCorners[0], &aCorners[0], 4);
-    Mutated();
-  }
-
-  virtual void SetWidths(const BorderWidths& aWidths)
-  {
-    MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) Widths", this));
-    PodCopy(&mWidths[0], &aWidths[0], 4);
-    Mutated();
-  }
-
-  MOZ_LAYER_DECL_NAME("BorderLayer", TYPE_BORDER)
-
-  virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) override
-  {
-    gfx::Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
-    mEffectiveTransform = SnapTransformTranslation(idealTransform, nullptr);
-    ComputeEffectiveTransformForMaskLayers(aTransformToSurface);
-  }
-
-protected:
-  BorderLayer(LayerManager* aManager, void* aImplData)
-    : Layer(aManager, aImplData)
-  {}
-
-  virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
-
-  virtual void DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent) override;
-
-  BorderColors mColors;
-  LayerRect mRect;
-  BorderCorners mCorners;
-  BorderWidths mWidths;
-};
-
-/**
  * A Layer for HTML Canvas elements.  It's backed by either a
  * gfxASurface or a GLContext (for WebGL layers), and has some control
  * for intelligent updating from the source if necessary (for example,
  * if hardware compositing is not available, for reading from the GL
  * buffer into an image surface that we can layer composite.)
  *
  * After Initialize is called, the underlying canvas Surface/GLContext
  * must not be modified during a layer transaction.
--- a/gfx/layers/LayersTypes.h
+++ b/gfx/layers/LayersTypes.h
@@ -237,16 +237,12 @@ typedef gfx::Matrix4x4Typed<LayerPixel, 
 // AsyncTransformComponentMatrix), and we represent the product of all of them
 // as a CSSTransformLayer -> ParentLayer transform (aliased as
 // AsyncTransformMatrix). To create an AsyncTransformMatrix from component
 // matrices, a ViewAs operation is needed. A MultipleAsyncTransforms
 // PixelCastJustification is provided for this purpose.
 typedef gfx::Matrix4x4Typed<ParentLayerPixel, ParentLayerPixel> AsyncTransformComponentMatrix;
 typedef gfx::Matrix4x4Typed<CSSTransformedLayerPixel, ParentLayerPixel> AsyncTransformMatrix;
 
-typedef Array<gfx::Color, 4> BorderColors;
-typedef Array<LayerSize, 4> BorderCorners;
-typedef Array<LayerCoord, 4> BorderWidths;
-
 } // namespace layers
 } // namespace mozilla
 
 #endif /* GFX_LAYERSTYPES_H */
deleted file mode 100644
--- a/gfx/layers/basic/BasicBorderLayer.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "BasicLayersImpl.h"            // for FillRectWithMask, etc
-#include "Layers.h"                     // for ColorLayer, etc
-#include "BasicImplData.h"              // for BasicImplData
-#include "BasicLayers.h"                // for BasicLayerManager
-#include "gfxContext.h"                 // for gfxContext, etc
-#include "gfxRect.h"                    // for gfxRect
-#include "gfx2DGlue.h"
-#include "mozilla/mozalloc.h"           // for operator new
-#include "nsCOMPtr.h"                   // for already_AddRefed
-#include "nsDebug.h"                    // for NS_ASSERTION
-#include "nsISupportsImpl.h"            // for Layer::AddRef, etc
-#include "nsRect.h"                     // for mozilla::gfx::IntRect
-#include "nsRegion.h"                   // for nsIntRegion
-#include "mozilla/gfx/PathHelpers.h"
-
-using namespace mozilla::gfx;
-
-namespace mozilla {
-namespace layers {
-
-class BasicBorderLayer : public BorderLayer, public BasicImplData {
-public:
-  explicit BasicBorderLayer(BasicLayerManager* aLayerManager) :
-    BorderLayer(aLayerManager, static_cast<BasicImplData*>(this))
-  {
-    MOZ_COUNT_CTOR(BasicBorderLayer);
-  }
-
-protected:
-  virtual ~BasicBorderLayer()
-  {
-    MOZ_COUNT_DTOR(BasicBorderLayer);
-  }
-
-public:
-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
-  {
-    NS_ASSERTION(BasicManager()->InConstruction(),
-                 "Can only set properties in construction phase");
-    BorderLayer::SetVisibleRegion(aRegion);
-  }
-
-  virtual void Paint(DrawTarget* aDT,
-                     const gfx::Point& aDeviceOffset,
-                     Layer* aMaskLayer) override
-  {
-    if (IsHidden()) {
-      return;
-    }
-
-    // We currently assume that we never have rounded corners,
-    // and that all borders have the same width and color.
-
-    ColorPattern color(mColors[0]);
-    StrokeOptions strokeOptions(mWidths[0]);
-
-    Rect rect = mRect.ToUnknownRect();
-    rect.Deflate(mWidths[0] / 2.0);
-    aDT->StrokeRect(rect, color, strokeOptions);
-  }
-
-protected:
-  BasicLayerManager* BasicManager()
-  {
-    return static_cast<BasicLayerManager*>(mManager);
-  }
-};
-
-already_AddRefed<BorderLayer>
-BasicLayerManager::CreateBorderLayer()
-{
-  NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
-  RefPtr<BorderLayer> layer = new BasicBorderLayer(this);
-  return layer.forget();
-}
-
-} // namespace layers
-} // namespace mozilla
--- a/gfx/layers/basic/BasicLayers.h
+++ b/gfx/layers/basic/BasicLayers.h
@@ -110,17 +110,16 @@ public:
   virtual void SetRoot(Layer* aLayer) override;
 
   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
   virtual already_AddRefed<ContainerLayer> CreateContainerLayer() override;
   virtual already_AddRefed<ImageLayer> CreateImageLayer() override;
   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
   virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
   virtual already_AddRefed<TextLayer> CreateTextLayer() override;
-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
   virtual already_AddRefed<ReadbackLayer> CreateReadbackLayer() override;
   virtual ImageFactory *GetImageFactory();
 
   virtual LayersBackend GetBackendType() override { return LayersBackend::LAYERS_BASIC; }
   virtual void GetBackendName(nsAString& name) override { name.AssignLiteral("Basic"); }
 
   bool InConstruction() { return mPhase == PHASE_CONSTRUCTION; }
 #ifdef DEBUG
deleted file mode 100644
--- a/gfx/layers/client/ClientBorderLayer.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "ClientLayerManager.h"         // for ClientLayerManager, etc
-#include "Layers.h"                     // for ColorLayer, etc
-#include "mozilla/layers/LayersMessages.h"  // for ColorLayerAttributes, etc
-#include "mozilla/mozalloc.h"           // for operator new
-#include "nsCOMPtr.h"                   // for already_AddRefed
-#include "nsDebug.h"                    // for NS_ASSERTION
-#include "nsISupportsImpl.h"            // for Layer::AddRef, etc
-#include "nsRegion.h"                   // for nsIntRegion
-
-namespace mozilla {
-namespace layers {
-
-using namespace mozilla::gfx;
-
-class ClientBorderLayer : public BorderLayer,
-                          public ClientLayer {
-public:
-  explicit ClientBorderLayer(ClientLayerManager* aLayerManager) :
-    BorderLayer(aLayerManager, static_cast<ClientLayer*>(this))
-  {
-    MOZ_COUNT_CTOR(ClientBorderLayer);
-  }
-
-protected:
-  virtual ~ClientBorderLayer()
-  {
-    MOZ_COUNT_DTOR(ClientBorderLayer);
-  }
-
-public:
-  virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
-  {
-    NS_ASSERTION(ClientManager()->InConstruction(),
-                 "Can only set properties in construction phase");
-    BorderLayer::SetVisibleRegion(aRegion);
-  }
-
-  virtual void RenderLayer()
-  {
-    RenderMaskLayers(this);
-  }
-
-  virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
-  {
-    aAttrs = BorderLayerAttributes(mRect, mColors, mCorners, mWidths);
-  }
-
-  virtual Layer* AsLayer() { return this; }
-  virtual ShadowableLayer* AsShadowableLayer() { return this; }
-
-  virtual void Disconnect()
-  {
-    ClientLayer::Disconnect();
-  }
-
-protected:
-  ClientLayerManager* ClientManager()
-  {
-    return static_cast<ClientLayerManager*>(mManager);
-  }
-};
-
-already_AddRefed<BorderLayer>
-ClientLayerManager::CreateBorderLayer()
-{
-  NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
-  RefPtr<ClientBorderLayer> layer =
-    new ClientBorderLayer(this);
-  CREATE_SHADOW(Border);
-  return layer.forget();
-}
-
-} // namespace layers
-} // namespace mozilla
--- a/gfx/layers/client/ClientLayerManager.h
+++ b/gfx/layers/client/ClientLayerManager.h
@@ -83,17 +83,16 @@ public:
   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
   virtual already_AddRefed<PaintedLayer> CreatePaintedLayerWithHint(PaintedLayerCreationHint aHint) override;
   virtual already_AddRefed<ContainerLayer> CreateContainerLayer() override;
   virtual already_AddRefed<ImageLayer> CreateImageLayer() override;
   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
   virtual already_AddRefed<ReadbackLayer> CreateReadbackLayer() override;
   virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
   virtual already_AddRefed<TextLayer> CreateTextLayer() override;
-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
   virtual already_AddRefed<RefLayer> CreateRefLayer() override;
 
   void UpdateTextureFactoryIdentifier(const TextureFactoryIdentifier& aNewIdentifier);
   TextureFactoryIdentifier GetTextureFactoryIdentifier()
   {
     return AsShadowForwarder()->GetTextureFactoryIdentifier();
   }
 
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -1159,59 +1159,16 @@ public:
 
   CompositableHost* GetCompositableHost() override { return nullptr; }
 
   virtual HostLayer* AsHostLayer() override { return this; }
 
   virtual const char* Name() const override { return "TextLayerComposite"; }
 };
 
-class BorderLayerComposite : public BorderLayer,
-                             public LayerComposite
-{
-public:
-  explicit BorderLayerComposite(LayerManagerComposite *aManager)
-    : BorderLayer(aManager, nullptr)
-    , LayerComposite(aManager)
-  {
-    MOZ_COUNT_CTOR(BorderLayerComposite);
-    mImplData = static_cast<LayerComposite*>(this);
-  }
-
-protected:
-  ~BorderLayerComposite()
-  {
-    MOZ_COUNT_DTOR(BorderLayerComposite);
-    Destroy();
-  }
-
-public:
-  // LayerComposite Implementation
-  virtual Layer* GetLayer() override { return this; }
-
-  virtual void SetLayerManager(HostLayerManager* aManager) override
-  {
-    LayerComposite::SetLayerManager(aManager);
-    mManager = aManager;
-  }
-
-  virtual void Destroy() override { mDestroyed = true; }
-
-  virtual void RenderLayer(const gfx::IntRect& aClipRect) override {}
-  virtual void CleanupResources() override {};
-
-  virtual void GenEffectChain(EffectChain& aEffect) override {}
-
-  CompositableHost* GetCompositableHost() override { return nullptr; }
-
-  virtual HostLayer* AsHostLayer() override { return this; }
-
-  virtual const char* Name() const override { return "BorderLayerComposite"; }
-};
-
 already_AddRefed<PaintedLayer>
 LayerManagerComposite::CreatePaintedLayer()
 {
   if (mDestroyed) {
     NS_WARNING("Call on destroyed layer manager");
     return nullptr;
   }
   return RefPtr<PaintedLayer>(new PaintedLayerComposite(this)).forget();
@@ -1272,26 +1229,16 @@ LayerManagerComposite::CreateTextLayer()
 {
   if (LayerManagerComposite::mDestroyed) {
     NS_WARNING("Call on destroyed layer manager");
     return nullptr;
   }
   return RefPtr<TextLayer>(new TextLayerComposite(this)).forget();
 }
 
-already_AddRefed<BorderLayer>
-LayerManagerComposite::CreateBorderLayer()
-{
-  if (LayerManagerComposite::mDestroyed) {
-    NS_WARNING("Call on destroyed layer manager");
-    return nullptr;
-  }
-  return RefPtr<BorderLayer>(new BorderLayerComposite(this)).forget();
-}
-
 LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer,
                                                             EffectChain& aEffects)
   : mCompositable(nullptr), mFailed(false)
 {
   if (!aMaskLayer) {
     return;
   }
 
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -235,17 +235,16 @@ public:
 
   virtual void ClearCachedResources(Layer* aSubtree = nullptr) override;
 
   virtual already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
   virtual already_AddRefed<ContainerLayer> CreateContainerLayer() override;
   virtual already_AddRefed<ImageLayer> CreateImageLayer() override;
   virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
   virtual already_AddRefed<TextLayer> CreateTextLayer() override;
-  virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
   virtual already_AddRefed<CanvasLayer> CreateCanvasLayer() override;
   virtual already_AddRefed<RefLayer> CreateRefLayer() override;
 
   virtual bool AreComponentAlphaLayersEnabled() override;
 
   virtual already_AddRefed<DrawTarget>
     CreateOptimalMaskDrawTarget(const IntSize &aSize) override;
 
--- a/gfx/layers/ipc/LayerTransactionParent.cpp
+++ b/gfx/layers/ipc/LayerTransactionParent.cpp
@@ -332,25 +332,16 @@ LayerTransactionParent::RecvUpdate(Infal
       MOZ_LAYERS_LOG(("[ParentSide] CreateTextLayer"));
 
       RefPtr<TextLayer> layer = layer_manager()->CreateTextLayer();
       AsLayerComposite(edit.get_OpCreateTextLayer())->Bind(layer);
 
       updateHitTestingTree = true;
       break;
     }
-    case Edit::TOpCreateBorderLayer: {
-      MOZ_LAYERS_LOG(("[ParentSide] CreateTextLayer"));
-
-      RefPtr<BorderLayer> layer = layer_manager()->CreateBorderLayer();
-      AsLayerComposite(edit.get_OpCreateBorderLayer())->Bind(layer);
-
-      updateHitTestingTree = true;
-      break;
-    }
     case Edit::TOpCreateCanvasLayer: {
       MOZ_LAYERS_LOG(("[ParentSide] CreateCanvasLayer"));
 
       RefPtr<CanvasLayer> layer =
         layer_manager()->CreateCanvasLayer();
       AsLayerComposite(edit.get_OpCreateCanvasLayer())->Bind(layer);
 
       updateHitTestingTree = true;
@@ -484,29 +475,16 @@ LayerTransactionParent::RecvUpdate(Infal
         if (!textLayer) {
           return IPC_FAIL_NO_REASON(this);
         }
         textLayer->SetBounds(specific.get_TextLayerAttributes().bounds());
         textLayer->SetGlyphs(Move(specific.get_TextLayerAttributes().glyphs()));
         textLayer->SetScaledFont(reinterpret_cast<gfx::ScaledFont*>(specific.get_TextLayerAttributes().scaledFont()));
         break;
       }
-      case Specific::TBorderLayerAttributes: {
-        MOZ_LAYERS_LOG(("[ParentSide]   border layer"));
-
-        BorderLayer* borderLayer = layerParent->AsBorderLayer();
-        if (!borderLayer) {
-          return IPC_FAIL_NO_REASON(this);
-        }
-        borderLayer->SetRect(specific.get_BorderLayerAttributes().rect());
-        borderLayer->SetColors(specific.get_BorderLayerAttributes().colors());
-        borderLayer->SetCornerRadii(specific.get_BorderLayerAttributes().corners());
-        borderLayer->SetWidths(specific.get_BorderLayerAttributes().widths());
-        break;
-      }
       case Specific::TCanvasLayerAttributes: {
         MOZ_LAYERS_LOG(("[ParentSide]   canvas layer"));
 
         CanvasLayer* canvasLayer = layerParent->AsCanvasLayer();
         if (!canvasLayer) {
           return IPC_FAIL_NO_REASON(this);
         }
         canvasLayer->SetSamplingFilter(specific.get_CanvasLayerAttributes().samplingFilter());
--- a/gfx/layers/ipc/LayersMessages.ipdlh
+++ b/gfx/layers/ipc/LayersMessages.ipdlh
@@ -28,34 +28,29 @@ using struct nsPoint from "nsPoint.h";
 using class mozilla::TimeDuration from "mozilla/TimeStamp.h";
 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
 using mozilla::ScreenRotation from "mozilla/WidgetUtils.h";
 using nsCSSPropertyID from "nsCSSPropertyID.h";
 using mozilla::dom::ScreenOrientationInternal from "mozilla/dom/ScreenOrientation.h";
 using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h";
 using mozilla::LayerMargin from "Units.h";
 using mozilla::LayerPoint from "Units.h";
-using mozilla::LayerCoord from "Units.h";
-using mozilla::LayerSize from "Units.h";
 using mozilla::LayerRect from "Units.h";
 using mozilla::LayerIntRegion from "Units.h";
 using mozilla::ParentLayerIntRect from "Units.h";
 using mozilla::LayoutDeviceIntRect from "Units.h";
 using mozilla::layers::ScaleMode from "mozilla/layers/LayersTypes.h";
 using mozilla::layers::EventRegions from "mozilla/layers/LayersTypes.h";
 using mozilla::layers::EventRegionsOverride from "mozilla/layers/LayersTypes.h";
 using mozilla::layers::DiagnosticTypes from "mozilla/layers/CompositorTypes.h";
 using struct mozilla::layers::ScrollMetadata from "FrameMetrics.h";
 using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
 using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
 using mozilla::layers::MaybeLayerClip from "FrameMetrics.h";
 using mozilla::gfx::Glyph from "Layers.h";
-using mozilla::layers::BorderColors from "mozilla/layers/LayersTypes.h";
-using mozilla::layers::BorderCorners from "mozilla/layers/LayersTypes.h";
-using mozilla::layers::BorderWidths from "mozilla/layers/LayersTypes.h";
 
 namespace mozilla {
 namespace layers {
 
 struct TargetConfig {
   IntRect naturalBounds;
   ScreenRotation rotation;
   ScreenOrientationInternal orientation;
@@ -63,17 +58,16 @@ struct TargetConfig {
 };
 
 // Create a shadow layer for |layer|
 struct OpCreatePaintedLayer    { PLayer layer; };
 struct OpCreateContainerLayer  { PLayer layer; };
 struct OpCreateImageLayer      { PLayer layer; };
 struct OpCreateColorLayer      { PLayer layer; };
 struct OpCreateTextLayer       { PLayer layer; };
-struct OpCreateBorderLayer       { PLayer layer; };
 struct OpCreateCanvasLayer     { PLayer layer; };
 struct OpCreateRefLayer        { PLayer layer; };
 
 struct OpAttachCompositable {
   PLayer layer;
   PCompositable compositable;
 };
 
@@ -277,33 +271,26 @@ struct ColorLayerAttributes     { LayerC
 struct CanvasLayerAttributes    { SamplingFilter samplingFilter; IntRect bounds; };
 struct RefLayerAttributes {
   int64_t id;
   // TODO: Once bug 1132895 is fixed we shouldn't need to propagate the override
   // explicitly here.
   EventRegionsOverride eventRegionsOverride;
 };
 struct ImageLayerAttributes     { SamplingFilter samplingFilter; IntSize scaleToSize; ScaleMode scaleMode; };
-struct BorderLayerAttributes {
-  LayerRect rect;
-  BorderColors colors;
-  BorderCorners corners;
-  BorderWidths widths;
-};
 
 union SpecificLayerAttributes {
   null_t;
   PaintedLayerAttributes;
   ContainerLayerAttributes;
   ColorLayerAttributes;
   CanvasLayerAttributes;
   TextLayerAttributes;
   RefLayerAttributes;
   ImageLayerAttributes;
-  BorderLayerAttributes;
 };
 
 struct LayerAttributes {
   CommonLayerAttributes common;
   SpecificLayerAttributes specific;
 };
 
 // See nsIWidget Configurations
@@ -461,17 +448,16 @@ struct CompositableOperation {
 // If adding a new edit type that requires the hit testing tree to be updated,
 // set the updateHitTestingTree flag to true in RecvUpdate()
 union Edit {
   OpCreatePaintedLayer;
   OpCreateContainerLayer;
   OpCreateImageLayer;
   OpCreateColorLayer;
   OpCreateTextLayer;
-  OpCreateBorderLayer;
   OpCreateCanvasLayer;
   OpCreateRefLayer;
 
   OpSetLayerAttributes;
   OpSetDiagnosticTypes;
   OpWindowOverlayChanged;
 
   OpSetRoot;
--- a/gfx/layers/ipc/ShadowLayerParent.cpp
+++ b/gfx/layers/ipc/ShadowLayerParent.cpp
@@ -107,24 +107,16 @@ ShadowLayerParent::AsPaintedLayer() cons
 TextLayer*
 ShadowLayerParent::AsTextLayer() const
 {
   return mLayer && mLayer->GetType() == Layer::TYPE_TEXT
          ? static_cast<TextLayer*>(mLayer.get())
          : nullptr;
 }
 
-BorderLayer*
-ShadowLayerParent::AsBorderLayer() const
-{
-  return mLayer && mLayer->GetType() == Layer::TYPE_BORDER
-         ? static_cast<BorderLayer*>(mLayer.get())
-         : nullptr;
-}
-
 void
 ShadowLayerParent::ActorDestroy(ActorDestroyReason why)
 {
   switch (why) {
   case AncestorDeletion:
     NS_RUNTIMEABORT("shadow layer deleted out of order!");
     return;                     // unreached
 
--- a/gfx/layers/ipc/ShadowLayerParent.h
+++ b/gfx/layers/ipc/ShadowLayerParent.h
@@ -38,17 +38,16 @@ public:
 
   Layer* AsLayer() const { return mLayer; }
 
   ContainerLayer* AsContainerLayer() const;
   CanvasLayer* AsCanvasLayer() const;
   ColorLayer* AsColorLayer() const;
   TextLayer* AsTextLayer() const;
   ImageLayer* AsImageLayer() const;
-  BorderLayer* AsBorderLayer() const;
   RefLayer* AsRefLayer() const;
   PaintedLayer* AsPaintedLayer() const;
 
 private:
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
   void Disconnect();
 
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -266,21 +266,16 @@ ShadowLayerForwarder::CreatedColorLayer(
   CreatedLayer<OpCreateColorLayer>(mTxn, aColor);
 }
 void
 ShadowLayerForwarder::CreatedTextLayer(ShadowableLayer* aColor)
 {
   CreatedLayer<OpCreateTextLayer>(mTxn, aColor);
 }
 void
-ShadowLayerForwarder::CreatedBorderLayer(ShadowableLayer* aBorder)
-{
-  CreatedLayer<OpCreateBorderLayer>(mTxn, aBorder);
-}
-void
 ShadowLayerForwarder::CreatedCanvasLayer(ShadowableLayer* aCanvas)
 {
   CreatedLayer<OpCreateCanvasLayer>(mTxn, aCanvas);
 }
 void
 ShadowLayerForwarder::CreatedRefLayer(ShadowableLayer* aRef)
 {
   CreatedLayer<OpCreateRefLayer>(mTxn, aRef);
--- a/gfx/layers/ipc/ShadowLayers.h
+++ b/gfx/layers/ipc/ShadowLayers.h
@@ -205,17 +205,16 @@ public:
    */
   void CreatedPaintedLayer(ShadowableLayer* aThebes);
   void CreatedContainerLayer(ShadowableLayer* aContainer);
   void CreatedImageLayer(ShadowableLayer* aImage);
   void CreatedColorLayer(ShadowableLayer* aColor);
   void CreatedCanvasLayer(ShadowableLayer* aCanvas);
   void CreatedRefLayer(ShadowableLayer* aRef);
   void CreatedTextLayer(ShadowableLayer* aRef);
-  void CreatedBorderLayer(ShadowableLayer* aRef);
 
   /**
    * At least one attribute of |aMutant| has changed, and |aMutant|
    * needs to sync to its shadow layer.  This initial implementation
    * forwards all attributes when any is mutated.
    */
   void Mutated(ShadowableLayer* aMutant);
 
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -269,32 +269,30 @@ UNIFIED_SOURCES += [
     'apz/util/ContentProcessController.cpp',
     'apz/util/DoubleTapToZoom.cpp',
     'apz/util/InputAPZContext.cpp',
     'apz/util/ScrollLinkedEffectDetector.cpp',
     'apz/util/TouchActionHelper.cpp',
     'AsyncCanvasRenderer.cpp',
     'AxisPhysicsModel.cpp',
     'AxisPhysicsMSDModel.cpp',
-    'basic/BasicBorderLayer.cpp',
     'basic/BasicCanvasLayer.cpp',
     'basic/BasicColorLayer.cpp',
     'basic/BasicCompositor.cpp',
     'basic/BasicContainerLayer.cpp',
     'basic/BasicImages.cpp',
     'basic/BasicLayerManager.cpp',
     'basic/BasicLayersImpl.cpp',
     'basic/BasicPaintedLayer.cpp',
     'basic/BasicTextLayer.cpp',
     'basic/TextureHostBasic.cpp',
     'BSPTree.cpp',
     'BufferTexture.cpp',
     'BufferUnrotate.cpp',
     'client/CanvasClient.cpp',
-    'client/ClientBorderLayer.cpp',
     'client/ClientCanvasLayer.cpp',
     'client/ClientColorLayer.cpp',
     'client/ClientContainerLayer.cpp',
     'client/ClientImageLayer.cpp',
     'client/ClientLayerManager.cpp',
     'client/ClientPaintedLayer.cpp',
     'client/ClientTextLayer.cpp',
     'client/ClientTiledPaintedLayer.cpp',
--- a/mfbt/Array.h
+++ b/mfbt/Array.h
@@ -41,26 +41,16 @@ public:
   }
 
   const T& operator[](size_t aIndex) const
   {
     MOZ_ASSERT(aIndex < Length);
     return mArr[aIndex];
   }
 
-  bool operator==(const Array<T, Length>& aOther) const
-  {
-    for (size_t i = 0; i < Length; i++) {
-      if (mArr[i] != aOther[i]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
   typedef T*                        iterator;
   typedef const T*                  const_iterator;
   typedef ReverseIterator<T*>       reverse_iterator;
   typedef ReverseIterator<const T*> const_reverse_iterator;
 
   // Methods for range-based for loops.
   iterator begin() { return mArr; }
   const_iterator begin() const { return mArr; }