Bug 1008969 - part 0, make nsGridContainerFrame final for now, and remove some unnecessary boilerplate code, etc. r=dholbert
authorMats Palmgren <matspal@gmail.com>
Mon, 12 May 2014 21:16:05 +0000
changeset 201976 6ad82809e623f11381ca1835431f69264491374f
parent 201975 fb0775864c896efa72118b60e362a7d699a19b14
child 201977 7048bc41993fc4e70898ad3623043260fec3255e
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1008969
milestone32.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 1008969 - part 0, make nsGridContainerFrame final for now, and remove some unnecessary boilerplate code, etc. r=dholbert
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsGridContainerFrame.h
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1,50 +1,45 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
-
 /* This Source Code is subject to the terms of the Mozilla Public License
  * version 2.0 (the "License"). You can obtain a copy of the License at
  * http://mozilla.org/MPL/2.0/. */
 
-/* rendering object for CSS "display: grid" */
+/* rendering object for CSS "display: grid | inline-grid" */
 
 #include "nsGridContainerFrame.h"
+
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
 
 //----------------------------------------------------------------------
 
 // Frame class boilerplate
 // =======================
 
 NS_QUERYFRAME_HEAD(nsGridContainerFrame)
   NS_QUERYFRAME_ENTRY(nsGridContainerFrame)
-NS_QUERYFRAME_TAIL_INHERITING(nsGridContainerFrameSuper)
+NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
 
 NS_IMPL_FRAMEARENA_HELPERS(nsGridContainerFrame)
 
 nsIFrame*
 NS_NewGridContainerFrame(nsIPresShell* aPresShell,
                          nsStyleContext* aContext)
 {
   return new (aPresShell) nsGridContainerFrame(aContext);
 }
 
 
 //----------------------------------------------------------------------
 
 // nsGridContainerFrame Method Implementations
 // ===========================================
 
-/* virtual */
-nsGridContainerFrame::~nsGridContainerFrame()
-{
-}
-
 nsIAtom*
 nsGridContainerFrame::GetType() const
 {
   return nsGkAtoms::gridContainerFrame;
 }
 
 #ifdef DEBUG_FRAME_DUMP
 nsresult
--- a/layout/generic/nsGridContainerFrame.h
+++ b/layout/generic/nsGridContainerFrame.h
@@ -1,43 +1,41 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
-
 /* This Source Code is subject to the terms of the Mozilla Public License
  * version 2.0 (the "License"). You can obtain a copy of the License at
  * http://mozilla.org/MPL/2.0/. */
 
-/* rendering object for CSS "display: grid" */
+/* rendering object for CSS "display: grid | inline-grid" */
 
 #ifndef nsGridContainerFrame_h___
 #define nsGridContainerFrame_h___
 
 #include "nsContainerFrame.h"
 
+/**
+ * Factory function.
+ * @return a newly allocated nsGridContainerFrame (infallible)
+ */
 nsIFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
                                    nsStyleContext* aContext);
 
-typedef nsContainerFrame nsGridContainerFrameSuper;
-
-class nsGridContainerFrame : public nsGridContainerFrameSuper {
-
+class nsGridContainerFrame MOZ_FINAL : public nsContainerFrame
+{
+public:
   NS_DECL_FRAMEARENA_HELPERS
   NS_DECL_QUERYFRAME_TARGET(nsGridContainerFrame)
   NS_DECL_QUERYFRAME
 
-  // Factory method:
-  friend nsIFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
-                                            nsStyleContext* aContext);
-
-public:
   // nsIFrame overrides
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
+
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
 #endif
 
 protected:
-  // Protected constructor & destructor
-  nsGridContainerFrame(nsStyleContext* aContext) : nsGridContainerFrameSuper(aContext) {}
-  virtual ~nsGridContainerFrame();
+  friend nsIFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
+                                            nsStyleContext* aContext);
+  nsGridContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 };
 
 #endif /* nsGridContainerFrame_h___ */