Remove nsStyleContext::DumpRegressionData, code that uses it, and code that exists only for it. (Bug 477522) r+sr=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Mon, 09 Feb 2009 20:36:54 -0800
changeset 24806 66db3742d013ad20b906cdd6d604ad6b4aa1e25f
parent 24805 30fd045df7160fa214d9e9a2e37502770d09e636
child 24807 f0cf59f7f4b2de795022530d806572cd33e13e37
push id5259
push userdbaron@mozilla.com
push dateTue, 10 Feb 2009 04:37:36 +0000
treeherdermozilla-central@66db3742d013 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs477522
milestone1.9.2a1pre
Remove nsStyleContext::DumpRegressionData, code that uses it, and code that exists only for it. (Bug 477522) r+sr=bzbarsky
extensions/layout-debug/src/nsILayoutRegressionTester.idl
extensions/layout-debug/src/nsRegressionTester.cpp
extensions/layout-debug/ui/content/layoutdebug.js
layout/generic/nsFrame.cpp
layout/generic/nsFrame.h
layout/generic/nsIFrameDebug.h
layout/generic/nsSplittableFrame.cpp
layout/generic/nsSplittableFrame.h
layout/printing/nsPrintEngine.cpp
layout/style/nsStyleContext.cpp
layout/style/nsStyleContext.h
layout/style/nsStyleCoord.cpp
layout/style/nsStyleCoord.h
--- a/extensions/layout-debug/src/nsILayoutRegressionTester.idl
+++ b/extensions/layout-debug/src/nsILayoutRegressionTester.idl
@@ -51,18 +51,17 @@ interface nsILayoutRegressionTester : ns
    * @param aFile               the file to dump to. It will be created if necessary, otherwise
                                 truncated. If nil, write to stdout.
    * @param aFlagsMask          some flags that determine what to dump
    * @param aFlagsMask          some flags that determine what to dump
    * @param aResult             a status value indicating whether the dump happened, 
                                 whether the page was still loading, or whether some other error happened.
    */
   const short DUMP_FLAGS_MASK_DEFAULT        = 0;
-  const short DUMP_FLAGS_MASK_DUMP_STYLE     = 1;
-  const short DUMP_FLAGS_MASK_PRINT_MODE     = 2;
+  const short DUMP_FLAGS_MASK_PRINT_MODE     = 1;
   
   const long DUMP_RESULT_COMPLETED           = 0;   // loaded OK
   const long DUMP_RESULT_LOADING             = 1;   // still loading
   const long DUMP_RESULT_ERROR               = 2;   // an error occurred
   
   long dumpFrameModel(in nsIDOMWindow aWindowToDump, in nsILocalFile aFile, in unsigned long aFlagsMask);
 
   /**
--- a/extensions/layout-debug/src/nsRegressionTester.cpp
+++ b/extensions/layout-debug/src/nsRegressionTester.cpp
@@ -109,18 +109,16 @@ nsRegressionTester::DumpFrameModel(nsIDO
   nsCOMPtr<nsIPresShell> presShell;
   docShell->GetPresShell(getter_AddRefs(presShell));
 
   nsIFrame* root = presShell->GetRootFrame();
 
   nsIFrameDebug*  fdbg = do_QueryFrame(root);
   if (NS_FAILED(rv)) return rv;
 
-  PRBool  dumpStyle = (aFlagsMask & DUMP_FLAGS_MASK_DUMP_STYLE) != 0;
-
   FILE* fp = stdout;
   if (aDestFile)
   {
     rv = aDestFile->OpenANSIFileDesc("w", &fp);
     if (NS_FAILED(rv)) return rv;
   }
   if (aFlagsMask & DUMP_FLAGS_MASK_PRINT_MODE) {
     nsCOMPtr <nsIContentViewer> viewer;
@@ -128,17 +126,17 @@ nsRegressionTester::DumpFrameModel(nsIDO
     if (viewer){
       nsCOMPtr<nsIContentViewerFile> viewerFile = do_QueryInterface(viewer);
       if (viewerFile) {
          viewerFile->Print(PR_TRUE, fp, nsnull);
       }
     }
   }
   else {
-    fdbg->DumpRegressionData(presShell->GetPresContext(), fp, 0, dumpStyle);
+    fdbg->DumpRegressionData(presShell->GetPresContext(), fp, 0);
   }
   if (fp != stdout)
     fclose(fp);
   *aResult = DUMP_RESULT_COMPLETED;
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/extensions/layout-debug/ui/content/layoutdebug.js
+++ b/extensions/layout-debug/ui/content/layoutdebug.js
@@ -420,18 +420,17 @@ RTestURLList.prototype = {
 
     dump("Writing regression data to " +
          data.QueryInterface(nsILocalFile).persistentDescriptor + "\n");
     if (this.mIsPrinting) {
       this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data,
         nsILayoutRegressionTester.DUMP_FLAGS_MASK_PRINT_MODE);
     }
     else {
-       this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data,
-        nsILayoutRegressionTester.DUMP_FLAGS_MASK_DUMP_STYLE);
+       this.mRegressionTester.dumpFrameModel(gBrowser.contentWindow, data, 0);
     }
      
       
 
     if (!this.mIsBaseline) {
       var base_data = this.mCurrentURL.dir.clone();
       base_data.append("baseline");
       base_data.append(basename);
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4289,68 +4289,55 @@ nsIFrame::GetConstFrameSelection()
     frame = frame->GetParent();
   }
 
   return PresContext()->PresShell()->ConstFrameSelection();
 }
 
 #ifdef NS_DEBUG
 NS_IMETHODIMP
-nsFrame::DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData)
+nsFrame::DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
 {
   IndentBy(out, aIndent);
   fprintf(out, "<frame va=\"%ld\" type=\"", PRUptrdiff(this));
   nsAutoString name;
   GetFrameName(name);
   XMLQuote(name);
   fputs(NS_LossyConvertUTF16toASCII(name).get(), out);
   fprintf(out, "\" state=\"%d\" parent=\"%ld\">\n",
           GetDebugStateBits(), PRUptrdiff(mParent));
 
   aIndent++;
-  DumpBaseRegressionData(aPresContext, out, aIndent, aIncludeStyleData);
+  DumpBaseRegressionData(aPresContext, out, aIndent);
   aIndent--;
 
   IndentBy(out, aIndent);
   fprintf(out, "</frame>\n");
 
   return NS_OK;
 }
 
 void
-nsFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData)
+nsFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
 {
   if (nsnull != mNextSibling) {
     IndentBy(out, aIndent);
     fprintf(out, "<next-sibling va=\"%ld\"/>\n", PRUptrdiff(mNextSibling));
   }
 
   if (HasView()) {
     IndentBy(out, aIndent);
     fprintf(out, "<view va=\"%ld\">\n", PRUptrdiff(GetView()));
     aIndent++;
     // XXX add in code to dump out view state too...
     aIndent--;
     IndentBy(out, aIndent);
     fprintf(out, "</view>\n");
   }
 
-  if(aIncludeStyleData) {
-    if(mStyleContext) {
-      IndentBy(out, aIndent);
-      fprintf(out, "<stylecontext va=\"%ld\">\n", PRUptrdiff(mStyleContext));
-      aIndent++;
-      // Dump style context regression data
-      mStyleContext->DumpRegressionData(aPresContext, out, aIndent);
-      aIndent--;
-      IndentBy(out, aIndent);
-      fprintf(out, "</stylecontext>\n");
-    }
-  }
-
   IndentBy(out, aIndent);
   fprintf(out, "<bbox x=\"%d\" y=\"%d\" w=\"%d\" h=\"%d\"/>\n",
           mRect.x, mRect.y, mRect.width, mRect.height);
 
   // Now dump all of the children on all of the child lists
   nsIFrame* kid;
   nsIAtom* list = nsnull;
   PRInt32 listIndex = 0;
@@ -4368,17 +4355,17 @@ nsFrame::DumpBaseRegressionData(nsPresCo
       }
       else {
         fprintf(out, "<child-list>\n");
       }
       aIndent++;
       while (kid) {
         nsIFrameDebug* frameDebug = do_QueryFrame(kid);
         if (kid) {
-          frameDebug->DumpRegressionData(aPresContext, out, aIndent, aIncludeStyleData);
+          frameDebug->DumpRegressionData(aPresContext, out, aIndent);
         }
         kid = kid->GetNextSibling();
       }
       aIndent--;
       IndentBy(out, aIndent);
       fprintf(out, "</child-list>\n");
     }
     list = GetAdditionalChildListName(listIndex++);
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -229,17 +229,17 @@ public:
   NS_IMETHOD  SetNextInFlow(nsIFrame*);
   NS_IMETHOD  GetOffsetFromView(nsPoint& aOffset, nsIView** aView) const;
   virtual nsIAtom* GetType() const;
   virtual PRBool IsContainingBlock() const;
 #ifdef NS_DEBUG
   NS_IMETHOD  List(FILE* out, PRInt32 aIndent) const;
   NS_IMETHOD  GetFrameName(nsAString& aResult) const;
   NS_IMETHOD_(nsFrameState) GetDebugStateBits() const;
-  NS_IMETHOD  DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
+  NS_IMETHOD  DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent);
   NS_IMETHOD  VerifyTree() const;
 #endif
 
   NS_IMETHOD  SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread, SelectionType aType);
   NS_IMETHOD  GetSelected(PRBool *aSelected) const;
   NS_IMETHOD  IsSelectable(PRBool* aIsSelectable, PRUint8* aSelectStyle) const;
 
   NS_IMETHOD  GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon);
@@ -460,17 +460,17 @@ public:
    * Dump out the "base classes" regression data. This should dump
    * out the interior data, not the "frame" XML container. And it
    * should call the base classes same named method before doing
    * anything specific in a derived class. This means that derived
    * classes need not override DumpRegressionData unless they need
    * some custom behavior that requires changing how the outer "frame"
    * XML container is dumped.
    */
-  virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
+  virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent);
   
   nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
 
   // Display Reflow Debugging 
   static void* DisplayReflowEnter(nsPresContext*          aPresContext,
                                   nsIFrame*                aFrame,
                                   const nsHTMLReflowState& aReflowState);
   static void* DisplayLayoutEnter(nsIFrame* aFrame);
--- a/layout/generic/nsIFrameDebug.h
+++ b/layout/generic/nsIFrameDebug.h
@@ -72,20 +72,18 @@ public:
   NS_IMETHOD_(nsFrameState)  GetDebugStateBits() const = 0;
   /**
    * Called to dump out regression data that describes the layout
    * of the frame and its children, and so on. The format of the
    * data is dictated to be XML (using a specific DTD); the
    * specific kind of data dumped is up to the frame itself, with
    * the caveat that some base types are defined.
    * For more information, see XXX.
-   *
-   * Argument aIncludeStyleData: if PR_TRUE, style information is dumpted, otherwise it is not
    */
-  NS_IMETHOD  DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData) = 0;
+  NS_IMETHOD  DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent) = 0;
 
   NS_IMETHOD  VerifyTree() const = 0;
 
   /**
    * See if tree verification is enabled. To enable tree verification add
    * "frameverifytree:1" to your NSPR_LOG_MODULES environment variable
    * (any non-zero debug level will work). Or, call SetVerifyTreeEnable
    * with PR_TRUE.
--- a/layout/generic/nsSplittableFrame.cpp
+++ b/layout/generic/nsSplittableFrame.cpp
@@ -249,19 +249,19 @@ nsSplittableFrame::BreakFromPrevFlow(nsI
       prevInFlow->SetNextInFlow(nsnull);
     }
     aFrame->SetPrevInFlow(nsnull);
   }
 }
 
 #ifdef DEBUG
 void
-nsSplittableFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData)
+nsSplittableFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
 {
-  nsFrame::DumpBaseRegressionData(aPresContext, out, aIndent, aIncludeStyleData);
+  nsFrame::DumpBaseRegressionData(aPresContext, out, aIndent);
   if (nsnull != mNextContinuation) {
     IndentBy(out, aIndent);
     fprintf(out, "<next-continuation va=\"%ld\"/>\n", PRUptrdiff(mNextContinuation));
   }
   if (nsnull != mPrevContinuation) {
     IndentBy(out, aIndent);
     fprintf(out, "<prev-continuation va=\"%ld\"/>\n", PRUptrdiff(mPrevContinuation));
   }
--- a/layout/generic/nsSplittableFrame.h
+++ b/layout/generic/nsSplittableFrame.h
@@ -104,16 +104,16 @@ public:
   
   // Detach from previous frame in flow
   static void BreakFromPrevFlow(nsIFrame* aFrame);
 
 protected:
   nsSplittableFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
 
 #ifdef DEBUG
-  virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
+  virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent);
 #endif
 
   nsIFrame*   mPrevContinuation;
   nsIFrame*   mNextContinuation;
 };
 
 #endif /* nsSplittableFrame_h___ */
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -2142,17 +2142,17 @@ nsPrintEngine::DoPrint(nsPrintObject * a
 
     // mPrt->mDebugFilePtr this is onlu non-null when compiled for debugging
     if (nsnull != mPrt->mDebugFilePtr) {
 #ifdef NS_DEBUG
       // output the regression test
       nsIFrame* root = poPresShell->FrameManager()->GetRootFrame();
       nsIFrameDebug* fdbg = do_QueryFrame(root);
       if (fdbg) {
-        fdbg->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0, PR_TRUE);
+        fdbg->DumpRegressionData(poPresContext, mPrt->mDebugFilePtr, 0);
       }
       fclose(mPrt->mDebugFilePtr);
       SetIsPrinting(PR_FALSE);
 #endif
     } else {
 #ifdef EXTENDED_DEBUG_PRINTING
       nsIFrame* rootFrame = poPresShell->FrameManager()->GetRootFrame();
       if (aPO->IsPrintable()) {
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -485,54 +485,16 @@ nsStyleContext::Mark()
     do {
       child->Mark();
       child = child->mNextSibling;
     } while (mEmptyChild != child);
   }
 }
 
 #ifdef DEBUG
-
-class URICString : public nsCAutoString {
-public:
-  URICString(nsIURI* aURI) {
-    if (aURI) {
-      aURI->GetSpec(*this);
-    } else {
-      Assign("[none]");
-    }
-  }
-
-  URICString(imgIRequest* aImageRequest) {
-    nsCOMPtr<nsIURI> uri;
-    if (aImageRequest) {
-      aImageRequest->GetURI(getter_AddRefs(uri));
-    }
-    if (uri) {
-      uri->GetSpec(*this);
-    } else {
-      Assign("[none]");
-    }
-  }
-
-  URICString(nsCSSValue::URL* aURI) {
-    if (aURI) {
-      NS_ASSERTION(aURI->mURI, "Must have URI here!");
-      aURI->mURI->GetSpec(*this);
-    } else {
-      Assign("[none]");
-    }
-  }
-  
-  URICString& operator=(const URICString& aOther) {
-    Assign(aOther);
-    return *this;
-  }
-};
-
 void nsStyleContext::List(FILE* out, PRInt32 aIndent)
 {
   // Indent
   PRInt32 ix;
   for (ix = aIndent; --ix >= 0; ) fputs("  ", out);
   fprintf(out, "%p(%d) parent=%p ",
           (void*)this, mRefCnt, (void *)mParent);
   if (mPseudoTag) {
@@ -569,333 +531,16 @@ void nsStyleContext::List(FILE* out, PRI
   if (nsnull != mEmptyChild) {
     nsStyleContext* child = mEmptyChild;
     do {
       child->List(out, aIndent + 1);
       child = child->mNextSibling;
     } while (mEmptyChild != child);
   }
 }
-
-static void IndentBy(FILE* out, PRInt32 aIndent) {
-  while (--aIndent >= 0) fputs("  ", out);
-}
-// virtual 
-void nsStyleContext::DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
-{
-  nsAutoString str;
-
-  // FONT
-  IndentBy(out,aIndent);
-  const nsStyleFont* font = GetStyleFont();
-  fprintf(out, "<font %s %d %d %d />\n", 
-          NS_ConvertUTF16toUTF8(font->mFont.name).get(),
-          font->mFont.size,
-          font->mSize,
-          font->mGenericID);
-
-  // COLOR
-  IndentBy(out,aIndent);
-  const nsStyleColor* color = GetStyleColor();
-  fprintf(out, "<color data=\"%ld\"/>\n", 
-    (long)color->mColor);
-
-  // BACKGROUND
-  IndentBy(out,aIndent);
-  const nsStyleBackground* bg = GetStyleBackground();
-  fprintf(out, "<background data=\"%d %d %d %ld %ld %ld %s\"/>\n",
-    (int)bg->mBackgroundAttachment,
-    (int)bg->mBackgroundFlags,
-    (int)bg->mBackgroundRepeat,
-    (long)bg->mBackgroundColor,
-    // XXX These aren't initialized unless flags are set:
-    (long)bg->mBackgroundXPosition.mCoord, // potentially lossy on some platforms
-    (long)bg->mBackgroundYPosition.mCoord, // potentially lossy on some platforms
-    URICString(bg->mBackgroundImage).get());
- 
-  // SPACING (ie. margin, padding, border, outline)
-  IndentBy(out,aIndent);
-  fprintf(out, "<spacing data=\"");
-
-  const nsStyleMargin* margin = GetStyleMargin();
-  margin->mMargin.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  
-  const nsStylePadding* padding = GetStylePadding();
-  padding->mPadding.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  
-  const nsStyleBorder* border = GetStyleBorder();
-#ifdef NS_COORD_IS_FLOAT
-  const char format [] = "top: %ftw right: %ftw bottom: %ftw left: %ftw";
-#else
-  const char format [] = "top: %dtw right: %dtw bottom: %dtw left: %dtw";
-#endif
-  nsPrintfCString output(format,
-                         border->GetActualBorderWidth(NS_SIDE_TOP),
-                         border->GetActualBorderWidth(NS_SIDE_RIGHT),
-                         border->GetActualBorderWidth(NS_SIDE_BOTTOM),
-                         border->GetActualBorderWidth(NS_SIDE_LEFT));
-  fprintf(out, "%s ", output.get());
-  border->mBorderRadius.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  
-  const nsStyleOutline* outline = GetStyleOutline();
-  outline->mOutlineRadius.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  outline->mOutlineWidth.ToString(str);
-  fprintf(out, "%s", NS_ConvertUTF16toUTF8(str).get());
-  fprintf(out, "%d", (int)border->mFloatEdge);
-  fprintf(out, "\" />\n");
-
-  // LIST
-  IndentBy(out,aIndent);
-  const nsStyleList* list = GetStyleList();
-  fprintf(out, "<list data=\"%d %d %s\" />\n",
-    (int)list->mListStyleType,
-    (int)list->mListStyleType,
-    URICString(list->mListStyleImage).get());
-
-  // POSITION
-  IndentBy(out,aIndent);
-  const nsStylePosition* pos = GetStylePosition();
-  fprintf(out, "<position data=\"");
-  pos->mOffset.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  pos->mWidth.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  pos->mMinWidth.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  pos->mMaxWidth.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  pos->mHeight.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  pos->mMinHeight.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  pos->mMaxHeight.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  fprintf(out, "%d ", (int)pos->mBoxSizing);
-  pos->mZIndex.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  fprintf(out, "\" />\n");
-
-  // TEXT
-  IndentBy(out,aIndent);
-  const nsStyleText* text = GetStyleText();
-  fprintf(out, "<text data=\"%d %d %d %d",
-    (int)text->mTextAlign,
-    (int)text->mTextTransform,
-    (int)text->mWhiteSpace,
-    (int)text->mWordWrap);
-  text->mLetterSpacing.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  text->mLineHeight.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  text->mTextIndent.ToString(str);
-  fprintf(out, "%s %d", NS_ConvertUTF16toUTF8(str).get(),
-                        (int)text->mWordSpacing);
-  fprintf(out, "\" />\n");
-  
-  // TEXT RESET
-  IndentBy(out,aIndent);
-  const nsStyleTextReset* textReset = GetStyleTextReset();
-  fprintf(out, "<textreset data=\"%d ",
-    (int)textReset->mTextDecoration);
-  textReset->mVerticalAlign.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  fprintf(out, "\" />\n");
-
-  // DISPLAY
-  IndentBy(out,aIndent);
-  const nsStyleDisplay* disp = GetStyleDisplay();
-  fprintf(out, "<display data=\"%d %d %f %d %d %d %d %d %d %d %ld %ld %ld %ld %s\" />\n",
-    (int)disp->mPosition,
-    (int)disp->mDisplay,
-    (float)disp->mOpacity,      
-    (int)disp->mFloats,
-    (int)disp->mBreakType,
-    (int)disp->mBreakBefore,
-    (int)disp->mBreakAfter,
-    (int)disp->mOverflowX,
-    (int)disp->mOverflowY,
-    (int)disp->mClipFlags,
-    (long)disp->mClip.x,
-    (long)disp->mClip.y,
-    (long)disp->mClip.width,
-    (long)disp->mClip.height,
-    URICString(disp->mBinding).get()
-    );
-  
-  // VISIBILITY
-  IndentBy(out,aIndent);
-  const nsStyleVisibility* vis = GetStyleVisibility();
-  fprintf(out, "<visibility data=\"%d %d\" />\n",
-    (int)vis->mDirection,
-    (int)vis->mVisible
-    );
-
-  // TABLE
-  IndentBy(out,aIndent);
-  const nsStyleTable* table = GetStyleTable();
-  fprintf(out, "<table data=\"%d %d %d ",
-    (int)table->mLayoutStrategy,
-    (int)table->mFrame,
-    (int)table->mRules);
-  fprintf(out, "%ld %ld ",
-    (long)table->mCols,
-    (long)table->mSpan);
-  fprintf(out, "\" />\n");
-
-  // TABLEBORDER
-  IndentBy(out,aIndent);
-  const nsStyleTableBorder* tableBorder = GetStyleTableBorder();
-  fprintf(out, "<tableborder data=\"%d %d %d %d %d ",
-    (int)tableBorder->mBorderCollapse,
-    (int)tableBorder->mBorderSpacingX,
-    (int)tableBorder->mBorderSpacingY,
-    (int)tableBorder->mCaptionSide,
-    (int)tableBorder->mEmptyCells);
-  fprintf(out, "\" />\n");
-
-  // CONTENT
-  IndentBy(out,aIndent);
-  const nsStyleContent* content = GetStyleContent();
-  fprintf(out, "<content data=\"%ld %ld %ld ",
-    (long)content->ContentCount(),
-    (long)content->CounterIncrementCount(),
-    (long)content->CounterResetCount());
-  // XXX: iterate over the content and counters...
-  content->mMarkerOffset.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  fprintf(out, "\" />\n");
-
-  // QUOTES
-  IndentBy(out,aIndent);
-  const nsStyleQuotes* quotes = GetStyleQuotes();
-  fprintf(out, "<quotes data=\"%ld ",
-    (long)quotes->QuotesCount());
-  // XXX: iterate over the quotes...
-  fprintf(out, "\" />\n");
-
-  // UI
-  IndentBy(out,aIndent);
-  const nsStyleUserInterface* ui = GetStyleUserInterface();
-  fprintf(out, "<ui data=\"%d %d %d %d\" />\n",
-    (int)ui->mUserInput,
-    (int)ui->mUserModify,
-    (int)ui->mUserFocus, 
-    (int)ui->mCursor);
-
-  // UIReset
-  IndentBy(out,aIndent);
-  const nsStyleUIReset* uiReset = GetStyleUIReset();
-  fprintf(out, "<uireset data=\"%d %d %d\" />\n",
-    (int)uiReset->mUserSelect,
-    (int)uiReset->mIMEMode,
-    (int)uiReset->mWindowShadow);
-
-  // Column
-  IndentBy(out,aIndent);
-  const nsStyleColumn* column = GetStyleColumn();
-  fprintf(out, "<column data=\"%d ",
-    (int)column->mColumnCount);
-  column->mColumnWidth.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  column->mColumnGap.ToString(str);
-  fprintf(out, "%s ", NS_ConvertUTF16toUTF8(str).get());
-  fprintf(out, "%d %d %ld",
-    (int)column->GetComputedColumnRuleWidth(),
-    (int)column->mColumnRuleStyle,
-    (long)column->mColumnRuleColor);
-  fprintf(out, "\" />\n");
-
-  // XUL
-  IndentBy(out,aIndent);
-  const nsStyleXUL* xul = GetStyleXUL();
-  fprintf(out, "<xul data=\"%d %d %d %d %d %d",
-    (int)xul->mBoxAlign,
-    (int)xul->mBoxDirection,
-    (int)xul->mBoxFlex,
-    (int)xul->mBoxOrient,
-    (int)xul->mBoxPack,
-    (int)xul->mBoxOrdinal);
-  fprintf(out, "\" />\n");
-
-#ifdef MOZ_SVG
-  // SVG
-  IndentBy(out,aIndent);
-  const nsStyleSVG* svg = GetStyleSVG();
-  fprintf(out, "<svg data=\"%d ",(int)svg->mFill.mType);
-  if (svg->mFill.mType == eStyleSVGPaintType_Server)
-    fprintf(out, "%s %ld ", URICString(svg->mFill.mPaint.mPaintServer).get(),
-                            (long)svg->mFill.mFallbackColor);
-  else
-    fprintf(out, "%ld ", (long)svg->mFill.mPaint.mColor);
-
-  fprintf(out, "%d ", (int)svg->mStroke.mType);
-  if (svg->mStroke.mType == eStyleSVGPaintType_Server)
-    fprintf(out, "%s %ld ", URICString(svg->mStroke.mPaint.mPaintServer).get(),
-                            (long)svg->mStroke.mFallbackColor);
-  else
-    fprintf(out, "%ld ", (long)svg->mStroke.mPaint.mColor);
-
-  fprintf(out, "%s %s %s ",
-          URICString(svg->mMarkerEnd).get(),
-          URICString(svg->mMarkerMid).get(),
-          URICString(svg->mMarkerStart).get());
-
-  for (PRUint32 i = 0; i < svg->mStrokeDasharrayLength; i++) {
-    svg->mStrokeDasharray[i].ToString(str);
-    fprintf(out,
-            "%s%c",
-            NS_ConvertUTF16toUTF8(str).get(),
-            (i == svg->mStrokeDasharrayLength) ? ' ' : ',');
-  }
-
-  svg->mStrokeDashoffset.ToString(str);
-  fprintf(out, "%f %s %f %f ",
-          svg->mFillOpacity,
-          NS_ConvertUTF16toUTF8(str).get(),
-          svg->mStrokeMiterlimit,
-          svg->mStrokeOpacity);
-  svg->mStrokeWidth.ToString(str);
-  fprintf(out, "%s %d %d %d %d %d %d %d %d %d %d %d\" />\n",
-          NS_ConvertUTF16toUTF8(str).get(),
-          (int)svg->mStrokeDasharrayLength,
-          (int)svg->mClipRule,
-          (int)svg->mColorInterpolation,
-          (int)svg->mColorInterpolationFilters,
-          (int)svg->mFillRule,
-          (int)svg->mPointerEvents,
-          (int)svg->mShapeRendering,
-          (int)svg->mStrokeLinecap,
-          (int)svg->mStrokeLinejoin,
-          (int)svg->mTextAnchor,
-          (int)svg->mTextRendering);
-
-  // SVGReset
-  IndentBy(out,aIndent);
-  const nsStyleSVGReset* svgReset = GetStyleSVGReset();
-
-  fprintf(out, "<svgreset data=\"%ld ", (long)svgReset->mStopColor);
-
-  fprintf(out, "%ld ", (long)svgReset->mFloodColor);
-
-  fprintf(out, "%ld ", (long)svgReset->mLightingColor);
-
-  fprintf(out, "%s %s %s %f %f %d\" />\n",
-          URICString(svgReset->mClipPath).get(),
-          URICString(svgReset->mFilter).get(),
-          URICString(svgReset->mMask).get(),
-          svgReset->mStopOpacity,
-          svgReset->mFloodOpacity,
-          (int)svgReset->mDominantBaseline);
-#endif
-  //#insert new style structs here#
-}
 #endif
 
 // Overloaded new operator. Initializes the memory to 0 and relies on an arena
 // (which comes from the presShell) to perform the allocation.
 void* 
 nsStyleContext::operator new(size_t sz, nsPresContext* aPresContext) CPP_THROW_NEW
 {
   // Check the recycle list first.
--- a/layout/style/nsStyleContext.h
+++ b/layout/style/nsStyleContext.h
@@ -158,19 +158,16 @@ public:
 
   NS_HIDDEN_(const void*) PeekStyleData(nsStyleStructID aSID);
 
   NS_HIDDEN_(void*) GetUniqueStyleData(const nsStyleStructID& aSID);
 
   NS_HIDDEN_(nsChangeHint) CalcStyleDifference(nsStyleContext* aOther);
 
 #ifdef DEBUG
-  NS_HIDDEN_(void) DumpRegressionData(nsPresContext* aPresContext, FILE* out,
-                                      PRInt32 aIndent);
-
   NS_HIDDEN_(void) List(FILE* out, PRInt32 aIndent);
 #endif
 
 protected:
   NS_HIDDEN_(void) AddChild(nsStyleContext* aChild);
   NS_HIDDEN_(void) RemoveChild(nsStyleContext* aChild);
 
   NS_HIDDEN_(void) ApplyStyleFixups(nsPresContext* aPresContext);
--- a/layout/style/nsStyleCoord.cpp
+++ b/layout/style/nsStyleCoord.cpp
@@ -166,52 +166,16 @@ void nsStyleCoord::SetAutoValue(void)
 }
 
 void nsStyleCoord::SetNoneValue(void)
 {
   mUnit = eStyleUnit_None;
   mValue.mInt = 0;
 }
 
-#ifdef DEBUG
-void nsStyleCoord::AppendToString(nsString& aBuffer) const
-{
-  if ((eStyleUnit_Percent <= mUnit) && (mUnit < eStyleUnit_Coord)) {
-    aBuffer.AppendFloat(mValue.mFloat);
-  }
-  else if ((eStyleUnit_Coord == mUnit) || 
-           (eStyleUnit_Enumerated == mUnit) ||
-           (eStyleUnit_Integer == mUnit)) {
-    aBuffer.AppendInt(mValue.mInt, 10);
-    aBuffer.AppendLiteral("[0x");
-    aBuffer.AppendInt(mValue.mInt, 16);
-    aBuffer.Append(PRUnichar(']'));
-  }
-
-  switch (mUnit) {
-    case eStyleUnit_Null:         aBuffer.AppendLiteral("Null");     break;
-    case eStyleUnit_Coord:        aBuffer.AppendLiteral("tw");       break;
-    case eStyleUnit_Percent:      aBuffer.AppendLiteral("%");        break;
-    case eStyleUnit_Factor:       aBuffer.AppendLiteral("f");        break;
-    case eStyleUnit_Normal:       aBuffer.AppendLiteral("Normal");   break;
-    case eStyleUnit_Auto:         aBuffer.AppendLiteral("Auto");     break;
-    case eStyleUnit_None:         aBuffer.AppendLiteral("None");     break;
-    case eStyleUnit_Enumerated:   aBuffer.AppendLiteral("enum");     break;
-    case eStyleUnit_Integer:      aBuffer.AppendLiteral("int");      break;
-  }
-  aBuffer.Append(PRUnichar(' '));
-}
-
-void nsStyleCoord::ToString(nsString& aBuffer) const
-{
-  aBuffer.Truncate();
-  AppendToString(aBuffer);
-}
-#endif
-
 // used by nsStyleSides and nsStyleCorners
 #define COMPARE_INDEXED_COORD(i)                                              \
   PR_BEGIN_MACRO                                                              \
   if (mUnits[i] != aOther.mUnits[i])                                          \
     return PR_FALSE;                                                          \
   if ((eStyleUnit_Percent <= mUnits[i]) &&                                    \
       (mUnits[i] < eStyleUnit_Coord)) {                                       \
     if (mValues[i].mFloat != aOther.mValues[i].mFloat)                        \
@@ -237,39 +201,16 @@ PRBool nsStyleSides::operator==(const ns
   return PR_TRUE;
 }
 
 void nsStyleSides::Reset(void)
 {
   memset(this, 0x00, sizeof(nsStyleSides));
 }
 
-#ifdef DEBUG
-void nsStyleSides::AppendToString(nsString& aBuffer) const
-{
-  aBuffer.AppendLiteral("left: ");
-  GetLeft().AppendToString(aBuffer);
-
-  aBuffer.AppendLiteral("top: ");
-  GetTop().AppendToString(aBuffer);
-
-  aBuffer.AppendLiteral("right: ");
-  GetRight().AppendToString(aBuffer);
-
-  aBuffer.AppendLiteral("bottom: ");
-  GetBottom().AppendToString(aBuffer);
-}
-
-void nsStyleSides::ToString(nsString& aBuffer) const
-{
-  aBuffer.Truncate();
-  AppendToString(aBuffer);
-}
-#endif
-
 nsStyleCorners::nsStyleCorners()
 {
   memset(this, 0x00, sizeof(nsStyleCorners));
 }
 
 PRBool
 nsStyleCorners::operator==(const nsStyleCorners& aOther) const
 {
@@ -279,43 +220,16 @@ nsStyleCorners::operator==(const nsStyle
   return PR_TRUE;
 }
 
 void nsStyleCorners::Reset(void)
 {
   memset(this, 0x00, sizeof(nsStyleCorners));
 }
 
-#ifdef DEBUG
-void nsStyleCorners::AppendToString(nsString& aBuffer) const
-{
-  aBuffer.AppendLiteral("top-left: ");
-  Get(NS_CORNER_TOP_LEFT_X).AppendToString(aBuffer);
-  Get(NS_CORNER_TOP_LEFT_Y).AppendToString(aBuffer);
-  
-  aBuffer.AppendLiteral("top-right: ");
-  Get(NS_CORNER_TOP_RIGHT_X).AppendToString(aBuffer);
-  Get(NS_CORNER_TOP_RIGHT_Y).AppendToString(aBuffer);
-
-  aBuffer.AppendLiteral("bottom-right: ");
-  Get(NS_CORNER_BOTTOM_RIGHT_X).AppendToString(aBuffer);
-  Get(NS_CORNER_BOTTOM_RIGHT_Y).AppendToString(aBuffer);
-
-  aBuffer.AppendLiteral("bottom-left: ");
-  Get(NS_CORNER_BOTTOM_LEFT_X).AppendToString(aBuffer);
-  Get(NS_CORNER_BOTTOM_LEFT_Y).AppendToString(aBuffer);
-}
-
-void nsStyleCorners::ToString(nsString& aBuffer) const
-{
-  aBuffer.Truncate();
-  AppendToString(aBuffer);
-}
-#endif
-
 // Validation of NS_SIDE_IS_VERTICAL and NS_HALF_CORNER_IS_X.
 #define CASE(side, result)                                                    \
   PR_STATIC_ASSERT(NS_SIDE_IS_VERTICAL(side) == result)
 CASE(NS_SIDE_TOP,    PR_FALSE);
 CASE(NS_SIDE_RIGHT,  PR_TRUE);
 CASE(NS_SIDE_BOTTOM, PR_FALSE);
 CASE(NS_SIDE_LEFT,   PR_TRUE);
 #undef CASE
--- a/layout/style/nsStyleCoord.h
+++ b/layout/style/nsStyleCoord.h
@@ -98,21 +98,16 @@ public:
   void  SetCoordValue(nscoord aValue);
   void  SetIntValue(PRInt32 aValue, nsStyleUnit aUnit);
   void  SetPercentValue(float aValue);
   void  SetFactorValue(float aValue);
   void  SetNormalValue(void);
   void  SetAutoValue(void);
   void  SetNoneValue(void);
 
-#ifdef DEBUG
-  void  AppendToString(nsString& aBuffer) const;
-  void  ToString(nsString& aBuffer) const;
-#endif
-
 public:
   nsStyleUnit   mUnit;
   nsStyleUnion  mValue;
 };
 
 
 /**
  * Class that represents a set of top/right/bottom/left nsStyleCoords.
@@ -144,21 +139,16 @@ public:
   void  Reset(void);
 
   inline void Set(PRUint8 aSide, const nsStyleCoord& aCoord);
   inline void SetLeft(const nsStyleCoord& aCoord);
   inline void SetTop(const nsStyleCoord& aCoord);
   inline void SetRight(const nsStyleCoord& aCoord);
   inline void SetBottom(const nsStyleCoord& aCoord);
 
-#ifdef DEBUG
-  void  AppendToString(nsString& aBuffer) const;
-  void  ToString(nsString& aBuffer) const;
-#endif
-
 protected:
   PRUint8       mUnits[4];
   nsStyleUnion  mValues[4];
 };
 
 /**
  * Class that represents a set of top-left/top-right/bottom-left/bottom-right
  * nsStyleCoord pairs.  This is used to hold the dimensions of the
@@ -177,21 +167,16 @@ public:
   inline nsStyleUnit GetUnit(PRUint8 aHalfCorner) const;
 
   inline nsStyleCoord Get(PRUint8 aHalfCorner) const;
 
   void  Reset(void);
 
   inline void Set(PRUint8 aHalfCorner, const nsStyleCoord& aCoord);
 
-#ifdef DEBUG
-  void  AppendToString(nsString& aBuffer) const;
-  void  ToString(nsString& aBuffer) const;
-#endif
-
 protected:
   PRUint8       mUnits[8];
   nsStyleUnion  mValues[8];
 };
 
 
 // -------------------------
 // nsStyleCoord inlines