diff --git a/mozilla/content/base/public/nsIDocument.h b/mozilla/content/base/public/nsIDocument.h index 376c6cffc7d..0901278676b 100644 --- a/mozilla/content/base/public/nsIDocument.h +++ b/mozilla/content/base/public/nsIDocument.h @@ -157,8 +157,4 @@ public: extern NS_LAYOUT nsresult NS_NewHTMLDocument(nsIDocument** aInstancePtrResult); -// XXX temporary - it's going away! -extern NS_LAYOUT void - NS_HackAppendContent(nsIDocument* aDoc); - #endif /* nsIDocument_h___ */ diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 0beeedc38f6..f9ba236cbf4 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -223,58 +223,3 @@ NS_IMETHODIMP nsHTMLDocument::AggIHTMLDocument::GetImageMap(const nsString& aMap nsIImageMap** aResult) { return GET_OUTER()->GetImageMap(aMapName, aResult); } - -//---------------------------------------------------------------------- - -#ifdef NS_DEBUG - -NS_LAYOUT void -NS_HackAppendContent(nsIDocument* aDoc) -{ - ((nsHTMLDocument*)aDoc)->HackAppendContent(); -} - -#include "nsIHTMLContent.h" -#include "nsIAtom.h" - -static const char* kBigParagraph = -"This is some text. It will be word wrapped because our container will " -"word wrap us. It will also be baseline aligned because our container " -"will do that too. "; - -#define NUM_BIG_TEXTS 114 - -nsresult nsHTMLDocument::HackAppendSimpleSpan(nsIContent* aContainer, - const char* aTag, - const char* aText) -{ - nsIHTMLContent* span; - nsIHTMLContent* text; - nsIAtom* atom = NS_NewAtom(aTag); - nsresult rv = NS_NewHTMLContainer(&span, atom); - if (NS_OK == rv) { - nsAutoString tmp; - for (PRIntn i = 0; i < NUM_BIG_TEXTS; i++) { - tmp.Append(aText); - } - rv = NS_NewHTMLText(&text, tmp.GetUnicode(), tmp.Length()); - if (NS_OK == rv) { - span->AppendChild(text); - NS_RELEASE(text); - } - aContainer->AppendChild(span); - NS_RELEASE(span); - } - NS_RELEASE(atom); - return rv; -} - -void nsHTMLDocument::HackAppendContent() -{ - nsIContent* body = mRootContent->ChildAt(0); - HackAppendSimpleSpan(body, "P", kBigParagraph); - NS_RELEASE(body); -} -#endif - - diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h index 2e1fc1e04d0..9505de62920 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.h +++ b/mozilla/content/html/document/src/nsHTMLDocument.h @@ -45,15 +45,6 @@ public: protected: virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet); -#ifdef NS_DEBUG -public: - void HackAppendContent(); - -protected: - nsresult HackAppendSimpleSpan(nsIContent* aContainer, const char* aTag, - const char* aText); -#endif - class AggIHTMLDocument : public nsIHTMLDocument { public: AggIHTMLDocument(); diff --git a/mozilla/layout/base/public/nsIDocument.h b/mozilla/layout/base/public/nsIDocument.h index 376c6cffc7d..0901278676b 100644 --- a/mozilla/layout/base/public/nsIDocument.h +++ b/mozilla/layout/base/public/nsIDocument.h @@ -157,8 +157,4 @@ public: extern NS_LAYOUT nsresult NS_NewHTMLDocument(nsIDocument** aInstancePtrResult); -// XXX temporary - it's going away! -extern NS_LAYOUT void - NS_HackAppendContent(nsIDocument* aDoc); - #endif /* nsIDocument_h___ */ diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index 0beeedc38f6..f9ba236cbf4 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -223,58 +223,3 @@ NS_IMETHODIMP nsHTMLDocument::AggIHTMLDocument::GetImageMap(const nsString& aMap nsIImageMap** aResult) { return GET_OUTER()->GetImageMap(aMapName, aResult); } - -//---------------------------------------------------------------------- - -#ifdef NS_DEBUG - -NS_LAYOUT void -NS_HackAppendContent(nsIDocument* aDoc) -{ - ((nsHTMLDocument*)aDoc)->HackAppendContent(); -} - -#include "nsIHTMLContent.h" -#include "nsIAtom.h" - -static const char* kBigParagraph = -"This is some text. It will be word wrapped because our container will " -"word wrap us. It will also be baseline aligned because our container " -"will do that too. "; - -#define NUM_BIG_TEXTS 114 - -nsresult nsHTMLDocument::HackAppendSimpleSpan(nsIContent* aContainer, - const char* aTag, - const char* aText) -{ - nsIHTMLContent* span; - nsIHTMLContent* text; - nsIAtom* atom = NS_NewAtom(aTag); - nsresult rv = NS_NewHTMLContainer(&span, atom); - if (NS_OK == rv) { - nsAutoString tmp; - for (PRIntn i = 0; i < NUM_BIG_TEXTS; i++) { - tmp.Append(aText); - } - rv = NS_NewHTMLText(&text, tmp.GetUnicode(), tmp.Length()); - if (NS_OK == rv) { - span->AppendChild(text); - NS_RELEASE(text); - } - aContainer->AppendChild(span); - NS_RELEASE(span); - } - NS_RELEASE(atom); - return rv; -} - -void nsHTMLDocument::HackAppendContent() -{ - nsIContent* body = mRootContent->ChildAt(0); - HackAppendSimpleSpan(body, "P", kBigParagraph); - NS_RELEASE(body); -} -#endif - - diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.h b/mozilla/layout/html/document/src/nsHTMLDocument.h index 2e1fc1e04d0..9505de62920 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.h +++ b/mozilla/layout/html/document/src/nsHTMLDocument.h @@ -45,15 +45,6 @@ public: protected: virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet); -#ifdef NS_DEBUG -public: - void HackAppendContent(); - -protected: - nsresult HackAppendSimpleSpan(nsIContent* aContainer, const char* aTag, - const char* aText); -#endif - class AggIHTMLDocument : public nsIHTMLDocument { public: AggIHTMLDocument(); diff --git a/mozilla/webshell/public/nsIWebWidget.h b/mozilla/webshell/public/nsIWebWidget.h index 087d2fdf775..2a94127e858 100644 --- a/mozilla/webshell/public/nsIWebWidget.h +++ b/mozilla/webshell/public/nsIWebWidget.h @@ -70,8 +70,6 @@ public: virtual nsIDocument* GetDocument() = 0; - virtual void HackAppendContent() = 0; - virtual void DumpContent(FILE* out = nsnull) = 0; virtual void DumpFrames(FILE* out = nsnull) = 0; diff --git a/mozilla/webshell/src/nsWebWidget.cpp b/mozilla/webshell/src/nsWebWidget.cpp index 1b05a9312f0..b0e9c071623 100644 --- a/mozilla/webshell/src/nsWebWidget.cpp +++ b/mozilla/webshell/src/nsWebWidget.cpp @@ -83,7 +83,6 @@ public: virtual nsIDocument* GetDocument(); - virtual void HackAppendContent(); virtual void DumpContent(FILE* out); virtual void DumpFrames(FILE* out); virtual void DumpStyle(FILE* out); @@ -626,21 +625,6 @@ nsresult WebWidgetImpl::CreateStyleSet(nsIDocument* aDocument, nsIStyleSet** aSt return rv; } -void WebWidgetImpl::HackAppendContent() -{ -#ifdef NS_DEBUG - - if (nsnull != mPresShell) { - nsIDocument* doc = mPresShell->GetDocument(); - if (nsnull != doc) { - NS_HackAppendContent(doc); - NS_RELEASE(doc); - } - } - -#endif -} - nsIWidget* WebWidgetImpl::GetWWWindow() { if (nsnull != mWindow) { diff --git a/mozilla/webshell/tests/viewer/resources.h b/mozilla/webshell/tests/viewer/resources.h index 97c9b602565..759e8d8987b 100644 --- a/mozilla/webshell/tests/viewer/resources.h +++ b/mozilla/webshell/tests/viewer/resources.h @@ -42,7 +42,6 @@ #define VIEWER_DUMP_FRAMES 40023 #define VIEWER_DUMP_VIEWS 40024 #define VIEWER_DUMP_STYLE 40025 -#define VIEWER_APPEND_CONTENT 40026 // Note: must be in ascending sequential order #define VIEWER_ONE_COLUMN 40031 diff --git a/mozilla/webshell/tests/viewer/viewer.rc b/mozilla/webshell/tests/viewer/viewer.rc index b780fab031c..45a80afe85c 100644 --- a/mozilla/webshell/tests/viewer/viewer.rc +++ b/mozilla/webshell/tests/viewer/viewer.rc @@ -54,8 +54,6 @@ VIEWER MENU DISCARDABLE MENUITEM "Dump &Frames", VIEWER_DUMP_FRAMES MENUITEM "Dump &Views", VIEWER_DUMP_VIEWS MENUITEM "Dump &Style", VIEWER_DUMP_STYLE - MENUITEM SEPARATOR - MENUITEM "&Append Content", VIEWER_APPEND_CONTENT } POPUP "&Tools" { diff --git a/mozilla/webshell/tests/viewer/winmain.cpp b/mozilla/webshell/tests/viewer/winmain.cpp index 06bbc4958b7..7746b266c0f 100644 --- a/mozilla/webshell/tests/viewer/winmain.cpp +++ b/mozilla/webshell/tests/viewer/winmain.cpp @@ -364,11 +364,6 @@ WndProc(HWND hWnd, UINT msg, WPARAM param, LPARAM lparam) } break; - case VIEWER_APPEND_CONTENT: - if ((nsnull != wd) && (nsnull != wd->ww)) { - wd->ww->HackAppendContent(); - } - break; case VIEWER_ONE_COLUMN: case VIEWER_TWO_COLUMN: case VIEWER_THREE_COLUMN: