Bug 720124 - Remove dead code from HTMLContentSink: IsFormOnStack; r=hsivonen

This commit is contained in:
Ms2ger 2012-01-25 08:50:04 +01:00
parent 9d2a246cea
commit 05ed36cc33
7 changed files with 2 additions and 31 deletions

View File

@ -118,7 +118,6 @@ public:
NS_IMETHOD OpenHead();
NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
NS_IMETHOD_(bool) IsFormOnStack() { return false; }
NS_IMETHOD BeginContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD EndContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD DidProcessTokens(void) { return NS_OK; }

View File

@ -118,7 +118,6 @@ public:
NS_IMETHOD OpenHead();
NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
NS_IMETHOD_(bool) IsFormOnStack() { return false; }
NS_IMETHOD BeginContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD EndContext(PRInt32 aPosition) { return NS_OK; }

View File

@ -204,7 +204,6 @@ public:
NS_IMETHOD EndContext(PRInt32 aID);
NS_IMETHOD OpenHead();
NS_IMETHOD IsEnabled(PRInt32 aTag, bool* aReturn);
NS_IMETHOD_(bool) IsFormOnStack() { return false; }
#ifdef DEBUG
// nsIDebugDumpContent

View File

@ -83,8 +83,8 @@
#include "nsHTMLTags.h"
#define NS_IHTML_CONTENT_SINK_IID \
{ 0xa3aad227, 0xe137, 0x407c, \
{ 0xa4, 0xa0, 0x9e, 0x23, 0xb6, 0x38, 0xf3, 0x42 } }
{ 0xb6d6ae00, 0x0884, 0x4a30, \
{ 0xa8, 0xb4, 0xce, 0xca, 0x57, 0x27, 0x1a, 0x3e } }
#define MAX_REFLOW_DEPTH 200
@ -204,14 +204,6 @@ public:
* @param nsIParserNode reference to parser node interface
*/
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) = 0;
/**
* Call this method to determnine if a FORM is on the sink's stack
*
* @return true if found else false
*/
NS_IMETHOD_(bool) IsFormOnStack() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLContentSink, NS_IHTML_CONTENT_SINK_IID)

View File

@ -1747,16 +1747,6 @@ CNavDTD::HandleSavedTokens(PRInt32 anIndex)
PRInt32 attrCount;
PRInt32 theTopIndex = anIndex + 1;
PRInt32 theTagCount = mBodyContext->GetCount();
bool formWasOnStack = mSink->IsFormOnStack();
if (formWasOnStack) {
// Do this to synchronize dtd stack and the sink stack.
// Note: FORM is never on the dtd stack because its always
// considered as a leaf. However, in the sink FORM can either
// be a container or a leaf. Therefore, we have to check
// with the sink -- Ref: Bug 20087.
++anIndex;
}
// Pause the main context and switch to the new context.
result = mSink->BeginContext(anIndex);
@ -1822,12 +1812,6 @@ CNavDTD::HandleSavedTokens(PRInt32 anIndex)
true);
}
if (!formWasOnStack && mSink->IsFormOnStack()) {
// If a form has appeared on the sink context stack since the beginning of
// HandleSavedTokens, have the sink close it:
mSink->CloseContainer(eHTMLTag_form);
}
// Bad-contents were successfully processed. Now, itz time to get
// back to the original body context state.
mTempContext->MoveEntries(*mBodyContext, theTagCount - theTopIndex);

View File

@ -81,7 +81,6 @@ public:
/* Take the largest possible feature set. */
{ NS_ENSURE_ARG_POINTER(aReturn); *aReturn = true; return NS_OK; }
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
NS_IMETHOD_(bool) IsFormOnStack() { return false; }
NS_IMETHOD BeginContext(PRInt32 aPosition);
NS_IMETHOD EndContext(PRInt32 aPosition);

View File

@ -375,7 +375,6 @@ public:
NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) { return NS_OK; }
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
NS_IMETHOD_(bool) IsFormOnStack() { return false; }
protected:
nsCOMPtr<nsINavBookmarksService> mBookmarksService;