diff --git a/extensions/layout-debug/src/nsILayoutRegressionTester.idl b/extensions/layout-debug/src/nsILayoutRegressionTester.idl
index f14568d79d9..56f310d7461 100644
--- a/extensions/layout-debug/src/nsILayoutRegressionTester.idl
+++ b/extensions/layout-debug/src/nsILayoutRegressionTester.idl
@@ -56,8 +56,7 @@ interface nsILayoutRegressionTester : nsISupports
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
diff --git a/extensions/layout-debug/src/nsRegressionTester.cpp b/extensions/layout-debug/src/nsRegressionTester.cpp
index 1353b042235..832292eb59f 100644
--- a/extensions/layout-debug/src/nsRegressionTester.cpp
+++ b/extensions/layout-debug/src/nsRegressionTester.cpp
@@ -114,8 +114,6 @@ nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump, nsILocalFile *aD
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)
{
@@ -133,7 +131,7 @@ nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump, nsILocalFile *aD
}
}
else {
- fdbg->DumpRegressionData(presShell->GetPresContext(), fp, 0, dumpStyle);
+ fdbg->DumpRegressionData(presShell->GetPresContext(), fp, 0);
}
if (fp != stdout)
fclose(fp);
diff --git a/extensions/layout-debug/ui/content/layoutdebug.js b/extensions/layout-debug/ui/content/layoutdebug.js
index e1e2136989f..5c5eeac02b5 100644
--- a/extensions/layout-debug/ui/content/layoutdebug.js
+++ b/extensions/layout-debug/ui/content/layoutdebug.js
@@ -425,8 +425,7 @@ RTestURLList.prototype = {
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);
}
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index 13e524fa6b8..5e375aeb23b 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4294,7 +4294,7 @@ nsIFrame::GetConstFrameSelection()
#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, "\n");
}
- if(aIncludeStyleData) {
- if(mStyleContext) {
- IndentBy(out, aIndent);
- fprintf(out, "\n", PRUptrdiff(mStyleContext));
- aIndent++;
- // Dump style context regression data
- mStyleContext->DumpRegressionData(aPresContext, out, aIndent);
- aIndent--;
- IndentBy(out, aIndent);
- fprintf(out, "\n");
- }
- }
-
IndentBy(out, aIndent);
fprintf(out, "\n",
mRect.x, mRect.y, mRect.width, mRect.height);
@@ -4373,7 +4360,7 @@ nsFrame::DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32
while (kid) {
nsIFrameDebug* frameDebug = do_QueryFrame(kid);
if (kid) {
- frameDebug->DumpRegressionData(aPresContext, out, aIndent, aIncludeStyleData);
+ frameDebug->DumpRegressionData(aPresContext, out, aIndent);
}
kid = kid->GetNextSibling();
}
diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h
index f464934b256..fd2cab20503 100644
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -234,7 +234,7 @@ public:
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
@@ -465,7 +465,7 @@ public:
* 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;
diff --git a/layout/generic/nsIFrameDebug.h b/layout/generic/nsIFrameDebug.h
index 7dc035a088d..46d8a9de773 100644
--- a/layout/generic/nsIFrameDebug.h
+++ b/layout/generic/nsIFrameDebug.h
@@ -77,10 +77,8 @@ public:
* 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;
diff --git a/layout/generic/nsSplittableFrame.cpp b/layout/generic/nsSplittableFrame.cpp
index cbf7f360038..f15943c3965 100644
--- a/layout/generic/nsSplittableFrame.cpp
+++ b/layout/generic/nsSplittableFrame.cpp
@@ -254,9 +254,9 @@ nsSplittableFrame::BreakFromPrevFlow(nsIFrame* aFrame)
#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, "\n", PRUptrdiff(mNextContinuation));
diff --git a/layout/generic/nsSplittableFrame.h b/layout/generic/nsSplittableFrame.h
index 45bf0d212e8..864d0ba9d03 100644
--- a/layout/generic/nsSplittableFrame.h
+++ b/layout/generic/nsSplittableFrame.h
@@ -109,7 +109,7 @@ 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;
diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp
index 7b1c076683a..227e96180aa 100644
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -2147,7 +2147,7 @@ nsPrintEngine::DoPrint(nsPrintObject * aPO)
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);
diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp
index 3aa93d7e95b..8b39f8f1349 100644
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -490,44 +490,6 @@ nsStyleContext::Mark()
}
#ifdef DEBUG
-
-class URICString : public nsCAutoString {
-public:
- URICString(nsIURI* aURI) {
- if (aURI) {
- aURI->GetSpec(*this);
- } else {
- Assign("[none]");
- }
- }
-
- URICString(imgIRequest* aImageRequest) {
- nsCOMPtr 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
@@ -574,323 +536,6 @@ void nsStyleContext::List(FILE* out, PRInt32 aIndent)
} 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, "\n",
- NS_ConvertUTF16toUTF8(font->mFont.name).get(),
- font->mFont.size,
- font->mSize,
- font->mGenericID);
-
- // COLOR
- IndentBy(out,aIndent);
- const nsStyleColor* color = GetStyleColor();
- fprintf(out, "\n",
- (long)color->mColor);
-
- // BACKGROUND
- IndentBy(out,aIndent);
- const nsStyleBackground* bg = GetStyleBackground();
- fprintf(out, "\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, "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, "
\n",
- (int)list->mListStyleType,
- (int)list->mListStyleType,
- URICString(list->mListStyleImage).get());
-
- // POSITION
- IndentBy(out,aIndent);
- const nsStylePosition* pos = GetStylePosition();
- fprintf(out, "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, "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, "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, "\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, "\n",
- (int)vis->mDirection,
- (int)vis->mVisible
- );
-
- // TABLE
- IndentBy(out,aIndent);
- const nsStyleTable* table = GetStyleTable();
- fprintf(out, "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, "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, "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, "QuotesCount());
- // XXX: iterate over the quotes...
- fprintf(out, "\" />\n");
-
- // UI
- IndentBy(out,aIndent);
- const nsStyleUserInterface* ui = GetStyleUserInterface();
- fprintf(out, "\n",
- (int)ui->mUserInput,
- (int)ui->mUserModify,
- (int)ui->mUserFocus,
- (int)ui->mCursor);
-
- // UIReset
- IndentBy(out,aIndent);
- const nsStyleUIReset* uiReset = GetStyleUIReset();
- fprintf(out, "\n",
- (int)uiReset->mUserSelect,
- (int)uiReset->mIMEMode,
- (int)uiReset->mWindowShadow);
-
- // Column
- IndentBy(out,aIndent);
- const nsStyleColumn* column = GetStyleColumn();
- fprintf(out, "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, "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, "