зеркало из https://github.com/mozilla/gecko-dev.git
bug 908347 - rm nsIDebugDumpContent r=mrbkap
This commit is contained in:
Родитель
15092f8b87
Коммит
b2a552be0c
|
@ -129,9 +129,6 @@ class HTMLContentSink;
|
|||
* Don't bother adding new stuff in this file.
|
||||
*/
|
||||
class HTMLContentSink : public nsContentSink,
|
||||
#ifdef DEBUG
|
||||
public nsIDebugDumpContent,
|
||||
#endif
|
||||
public nsIHTMLContentSink
|
||||
{
|
||||
public:
|
||||
|
@ -165,11 +162,6 @@ public:
|
|||
NS_IMETHOD OpenContainer(ElementType aNodeType);
|
||||
NS_IMETHOD CloseContainer(ElementType aTag);
|
||||
|
||||
#ifdef DEBUG
|
||||
// nsIDebugDumpContent
|
||||
NS_IMETHOD DumpContentModel();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
already_AddRefed<nsGenericHTMLElement>
|
||||
CreateContentObject(nsHTMLTag aNodeType);
|
||||
|
@ -1094,9 +1086,6 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLContentSink)
|
|||
NS_INTERFACE_TABLE_BEGIN
|
||||
NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIContentSink)
|
||||
NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIHTMLContentSink)
|
||||
#if DEBUG
|
||||
NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIDebugDumpContent)
|
||||
#endif
|
||||
NS_INTERFACE_TABLE_END
|
||||
NS_INTERFACE_TABLE_TAIL_INHERITING(nsContentSink)
|
||||
|
||||
|
@ -1655,40 +1644,3 @@ HTMLContentSink::IsScriptExecuting()
|
|||
{
|
||||
return IsScriptExecutingImpl();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* This will dump content model into the output file.
|
||||
*
|
||||
* @update harishd 05/25/00
|
||||
* @param
|
||||
* @return NS_OK all went well, error on failure
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::DumpContentModel()
|
||||
{
|
||||
FILE* out = ::fopen("rtest_html.txt", "a");
|
||||
if (out) {
|
||||
if (mDocument) {
|
||||
Element* root = mDocument->GetRootElement();
|
||||
if (root) {
|
||||
if (mDocumentURI) {
|
||||
nsAutoCString buf;
|
||||
mDocumentURI->GetSpec(buf);
|
||||
fputs(buf.get(), out);
|
||||
}
|
||||
|
||||
fputs(";", out);
|
||||
root->DumpContent(out, 0, false);
|
||||
fputs(";\n", out);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -58,23 +58,6 @@ enum eParserDocType {
|
|||
|
||||
enum eStreamState {eNone,eOnStart,eOnDataAvail,eOnStop};
|
||||
|
||||
/**
|
||||
* FOR DEBUG PURPOSE ONLY
|
||||
*
|
||||
* Use this interface to query objects that contain content information.
|
||||
* Ex. Parser can trigger dump content by querying the sink that has
|
||||
* access to the content.
|
||||
*
|
||||
* @update harishd 05/25/00
|
||||
*/
|
||||
class nsIDebugDumpContent : public nsISupports {
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEBUG_DUMP_CONTENT_IID)
|
||||
NS_IMETHOD DumpContentModel()=0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDebugDumpContent, NS_IDEBUG_DUMP_CONTENT_IID)
|
||||
|
||||
/**
|
||||
* This GECKO-INTERNAL interface is on track to being REMOVED (or refactored
|
||||
* to the point of being near-unrecognizable).
|
||||
|
|
|
@ -162,10 +162,6 @@ void nsParser::Shutdown()
|
|||
NS_IF_RELEASE(sCharsetConverterManager);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static bool gDumpContent=false;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* default constructor
|
||||
*/
|
||||
|
@ -182,12 +178,6 @@ nsParser::~nsParser()
|
|||
void
|
||||
nsParser::Initialize(bool aConstructor)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (!gDumpContent) {
|
||||
gDumpContent = PR_GetEnv("PARSER_DUMP_CONTENT") != nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aConstructor) {
|
||||
// Raw pointer
|
||||
mParserContext = 0;
|
||||
|
@ -215,20 +205,6 @@ nsParser::Initialize(bool aConstructor)
|
|||
void
|
||||
nsParser::Cleanup()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (gDumpContent) {
|
||||
if (mSink) {
|
||||
// Sink (HTMLContentSink at this time) supports nsIDebugDumpContent
|
||||
// interface. We can get to the content model through the sink.
|
||||
nsresult result = NS_OK;
|
||||
nsCOMPtr<nsIDebugDumpContent> trigger = do_QueryInterface(mSink, &result);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
trigger->DumpContentModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mParserContext && mParserContext->mPrevContext) {
|
||||
NS_WARNING("Extra parser contexts still on the parser stack");
|
||||
|
|
Загрузка…
Ссылка в новой задаче