Give nsPageBreakFrame a frame name for DEBUGging code. (Bug 468645) r+sr=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Mon, 29 Dec 2008 10:07:36 -0500
changeset 23161 1b8061be91458f4eb2c5530622dcd1c7cb86ae93
parent 23160 f80b0bf9387009139a8866226a4f8af5f0f01758
child 23162 43391574f35f23bbe2885f09f20e22c53a8255be
push idunknown
push userunknown
push dateunknown
bugs468645
milestone1.9.2a1pre
Give nsPageBreakFrame a frame name for DEBUGging code. (Bug 468645) r+sr=bzbarsky
layout/generic/nsPageFrame.cpp
layout/generic/nsPageFrame.h
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -653,9 +653,15 @@ nsPageBreakFrame::Reflow(nsPresContext* 
 }
 
 nsIAtom*
 nsPageBreakFrame::GetType() const
 {
   return nsGkAtoms::pageBreakFrame; 
 }
 
-
+#ifdef DEBUG
+NS_IMETHODIMP
+nsPageBreakFrame::GetFrameName(nsAString& aResult) const
+{
+  return MakeFrameName(NS_LITERAL_STRING("PageBreak"), aResult);
+}
+#endif
--- a/layout/generic/nsPageFrame.h
+++ b/layout/generic/nsPageFrame.h
@@ -135,16 +135,20 @@ class nsPageBreakFrame : public nsLeafFr
 
   NS_IMETHOD Reflow(nsPresContext*          aPresContext,
                     nsHTMLReflowMetrics&     aDesiredSize,
                     const nsHTMLReflowState& aReflowState,
                     nsReflowStatus&          aStatus);
 
   virtual nsIAtom* GetType() const;
 
+#ifdef NS_DEBUG
+  NS_IMETHOD  GetFrameName(nsAString& aResult) const;
+#endif
+
 protected:
 
   virtual nscoord GetIntrinsicWidth();
   virtual nscoord GetIntrinsicHeight();
 
     PRBool mHaveReflowed;
 
     friend nsIFrame* NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);