diff --git a/htmlparser/src/nsHTMLContentSinkStream.cpp b/htmlparser/src/nsHTMLContentSinkStream.cpp
index 666e5ccb788..e0da107952f 100644
--- a/htmlparser/src/nsHTMLContentSinkStream.cpp
+++ b/htmlparser/src/nsHTMLContentSinkStream.cpp
@@ -398,6 +398,32 @@ nsHTMLContentSinkStream::DoFragment(PRBool aFlag)
return NS_OK;
}
+/**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+NS_IMETHODIMP
+nsHTMLContentSinkStream::BeginContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
+/**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+NS_IMETHODIMP
+nsHTMLContentSinkStream::EndContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
void nsHTMLContentSinkStream::EnsureBufferSize(PRInt32 aNewSize)
{
diff --git a/htmlparser/src/nsHTMLContentSinkStream.h b/htmlparser/src/nsHTMLContentSinkStream.h
index 5f6fb9cd36c..8b105e6fe77 100644
--- a/htmlparser/src/nsHTMLContentSinkStream.h
+++ b/htmlparser/src/nsHTMLContentSinkStream.h
@@ -115,6 +115,8 @@ class nsHTMLContentSinkStream : public nsIHTMLContentSink {
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD DoFragment(PRBool aFlag);
+ NS_IMETHOD BeginContext(PRInt32 aPosition);
+ NS_IMETHOD EndContext(PRInt32 aPosition);
public:
diff --git a/htmlparser/src/nsHTMLToTXTSinkStream.cpp b/htmlparser/src/nsHTMLToTXTSinkStream.cpp
index 163672ede87..0a1a4f14b6d 100644
--- a/htmlparser/src/nsHTMLToTXTSinkStream.cpp
+++ b/htmlparser/src/nsHTMLToTXTSinkStream.cpp
@@ -371,6 +371,31 @@ nsHTMLToTXTSinkStream::DoFragment(PRBool aFlag)
return NS_OK;
}
+/**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+NS_IMETHODIMP
+nsHTMLToTXTSinkStream::BeginContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
+/**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+NS_IMETHODIMP
+nsHTMLToTXTSinkStream::EndContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
void nsHTMLToTXTSinkStream::EnsureBufferSize(PRInt32 aNewSize)
{
diff --git a/htmlparser/src/nsHTMLToTXTSinkStream.h b/htmlparser/src/nsHTMLToTXTSinkStream.h
index 6058c04c3fa..86311094629 100644
--- a/htmlparser/src/nsHTMLToTXTSinkStream.h
+++ b/htmlparser/src/nsHTMLToTXTSinkStream.h
@@ -107,6 +107,8 @@ class nsHTMLToTXTSinkStream : public nsIHTMLContentSink {
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD DoFragment(PRBool aFlag);
+ NS_IMETHOD BeginContext(PRInt32 aPosition);
+ NS_IMETHOD EndContext(PRInt32 aPosition);
protected:
diff --git a/htmlparser/src/nsIHTMLContentSink.h b/htmlparser/src/nsIHTMLContentSink.h
index 853b1239015..1729404a1bc 100644
--- a/htmlparser/src/nsIHTMLContentSink.h
+++ b/htmlparser/src/nsIHTMLContentSink.h
@@ -188,6 +188,24 @@ public:
NS_IMETHOD DoFragment(PRBool aFlag)=0;
+ /**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+ NS_IMETHOD BeginContext(PRInt32 aPosition)=0;
+
+ /**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+ NS_IMETHOD EndContext(PRInt32 aPosition)=0;
+
};
extern nsresult NS_NewHTMLNullSink(nsIContentSink** aInstancePtrResult);
diff --git a/htmlparser/src/nsLoggingSink.cpp b/htmlparser/src/nsLoggingSink.cpp
index 4a830518230..69b1dc92354 100644
--- a/htmlparser/src/nsLoggingSink.cpp
+++ b/htmlparser/src/nsLoggingSink.cpp
@@ -99,6 +99,8 @@ public:
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD DoFragment(PRBool aFlag);
+ NS_IMETHOD BeginContext(PRInt32 aPosition);
+ NS_IMETHOD EndContext(PRInt32 aPosition);
// nsILoggingSink
NS_IMETHOD SetOutputStream(ostream& aStream);
@@ -566,3 +568,28 @@ nsLoggingSink::DoFragment(PRBool aFlag)
return NS_OK;
}
+/**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+NS_IMETHODIMP
+nsLoggingSink::BeginContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
+/**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+NS_IMETHODIMP
+nsLoggingSink::EndContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
diff --git a/parser/htmlparser/src/nsHTMLContentSinkStream.cpp b/parser/htmlparser/src/nsHTMLContentSinkStream.cpp
index 666e5ccb788..e0da107952f 100644
--- a/parser/htmlparser/src/nsHTMLContentSinkStream.cpp
+++ b/parser/htmlparser/src/nsHTMLContentSinkStream.cpp
@@ -398,6 +398,32 @@ nsHTMLContentSinkStream::DoFragment(PRBool aFlag)
return NS_OK;
}
+/**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+NS_IMETHODIMP
+nsHTMLContentSinkStream::BeginContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
+/**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+NS_IMETHODIMP
+nsHTMLContentSinkStream::EndContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
void nsHTMLContentSinkStream::EnsureBufferSize(PRInt32 aNewSize)
{
diff --git a/parser/htmlparser/src/nsHTMLContentSinkStream.h b/parser/htmlparser/src/nsHTMLContentSinkStream.h
index 5f6fb9cd36c..8b105e6fe77 100644
--- a/parser/htmlparser/src/nsHTMLContentSinkStream.h
+++ b/parser/htmlparser/src/nsHTMLContentSinkStream.h
@@ -115,6 +115,8 @@ class nsHTMLContentSinkStream : public nsIHTMLContentSink {
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD DoFragment(PRBool aFlag);
+ NS_IMETHOD BeginContext(PRInt32 aPosition);
+ NS_IMETHOD EndContext(PRInt32 aPosition);
public:
diff --git a/parser/htmlparser/src/nsHTMLToTXTSinkStream.cpp b/parser/htmlparser/src/nsHTMLToTXTSinkStream.cpp
index 163672ede87..0a1a4f14b6d 100644
--- a/parser/htmlparser/src/nsHTMLToTXTSinkStream.cpp
+++ b/parser/htmlparser/src/nsHTMLToTXTSinkStream.cpp
@@ -371,6 +371,31 @@ nsHTMLToTXTSinkStream::DoFragment(PRBool aFlag)
return NS_OK;
}
+/**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+NS_IMETHODIMP
+nsHTMLToTXTSinkStream::BeginContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
+/**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+NS_IMETHODIMP
+nsHTMLToTXTSinkStream::EndContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
void nsHTMLToTXTSinkStream::EnsureBufferSize(PRInt32 aNewSize)
{
diff --git a/parser/htmlparser/src/nsHTMLToTXTSinkStream.h b/parser/htmlparser/src/nsHTMLToTXTSinkStream.h
index 6058c04c3fa..86311094629 100644
--- a/parser/htmlparser/src/nsHTMLToTXTSinkStream.h
+++ b/parser/htmlparser/src/nsHTMLToTXTSinkStream.h
@@ -107,6 +107,8 @@ class nsHTMLToTXTSinkStream : public nsIHTMLContentSink {
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD DoFragment(PRBool aFlag);
+ NS_IMETHOD BeginContext(PRInt32 aPosition);
+ NS_IMETHOD EndContext(PRInt32 aPosition);
protected:
diff --git a/parser/htmlparser/src/nsIHTMLContentSink.h b/parser/htmlparser/src/nsIHTMLContentSink.h
index 853b1239015..1729404a1bc 100644
--- a/parser/htmlparser/src/nsIHTMLContentSink.h
+++ b/parser/htmlparser/src/nsIHTMLContentSink.h
@@ -188,6 +188,24 @@ public:
NS_IMETHOD DoFragment(PRBool aFlag)=0;
+ /**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+ NS_IMETHOD BeginContext(PRInt32 aPosition)=0;
+
+ /**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+ NS_IMETHOD EndContext(PRInt32 aPosition)=0;
+
};
extern nsresult NS_NewHTMLNullSink(nsIContentSink** aInstancePtrResult);
diff --git a/parser/htmlparser/src/nsLoggingSink.cpp b/parser/htmlparser/src/nsLoggingSink.cpp
index 4a830518230..69b1dc92354 100644
--- a/parser/htmlparser/src/nsLoggingSink.cpp
+++ b/parser/htmlparser/src/nsLoggingSink.cpp
@@ -99,6 +99,8 @@ public:
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD DoFragment(PRBool aFlag);
+ NS_IMETHOD BeginContext(PRInt32 aPosition);
+ NS_IMETHOD EndContext(PRInt32 aPosition);
// nsILoggingSink
NS_IMETHOD SetOutputStream(ostream& aStream);
@@ -566,3 +568,28 @@ nsLoggingSink::DoFragment(PRBool aFlag)
return NS_OK;
}
+/**
+ * This gets called when handling illegal contents, especially
+ * in dealing with tables. This method creates a new context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - The position from where the new context begins.
+ */
+NS_IMETHODIMP
+nsLoggingSink::BeginContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}
+
+/**
+ * This method terminates any new context that got created by
+ * BeginContext and switches back to the main context.
+ *
+ * @update 04/04/99 harishd
+ * @param aPosition - Validates the end of a context.
+ */
+NS_IMETHODIMP
+nsLoggingSink::EndContext(PRInt32 aPosition)
+{
+ return NS_OK;
+}