зеркало из https://github.com/mozilla/pjs.git
unintentionally commited. Backing out
This commit is contained in:
Родитель
e650ab2c82
Коммит
c2494324e5
|
@ -1179,9 +1179,7 @@ SinkContext::OpenContainer(const nsIParserNode& aNode)
|
|||
rv = mSink->AddAttributes(aNode, content);
|
||||
|
||||
if (mPreAppend) {
|
||||
if (mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(mStackPos > 0, "container w/o parent");
|
||||
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
|
||||
if (mStack[mStackPos-1].mInsertionPoint != -1) {
|
||||
parent->InsertChildAt(content,
|
||||
|
@ -1254,9 +1252,7 @@ SinkContext::CloseContainer(const nsIParserNode& aNode)
|
|||
|
||||
// Add container to its parent if we haven't already done it
|
||||
if (0 == (mStack[mStackPos].mFlags & APPENDED)) {
|
||||
if (mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(mStackPos > 0, "container w/o parent");
|
||||
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
|
||||
// If the parent has an insertion point, insert rather than
|
||||
// append.
|
||||
|
@ -1567,11 +1563,7 @@ SinkContext::AddLeaf(const nsIParserNode& aNode)
|
|||
nsresult
|
||||
SinkContext::AddLeaf(nsIHTMLContent* aContent)
|
||||
{
|
||||
|
||||
if (mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mStackPos > 0, "leaf w/o container");
|
||||
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
|
||||
// If the parent has an insertion point, insert rather than
|
||||
// append.
|
||||
|
@ -1873,10 +1865,7 @@ SinkContext::FlushText(PRBool* aDidFlush, PRBool aReleaseLast)
|
|||
NS_RELEASE(text);
|
||||
|
||||
// Add text to its parent
|
||||
if (mStackPos<= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mStackPos > 0, "leaf w/o container");
|
||||
nsIHTMLContent* parent = mStack[mStackPos - 1].mContent;
|
||||
if (mStack[mStackPos-1].mInsertionPoint != -1) {
|
||||
parent->InsertChildAt(content,
|
||||
|
@ -2310,9 +2299,7 @@ HTMLContentSink::BeginContext(PRInt32 aPosition)
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (mCurrentContext == 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(mCurrentContext != nsnull," Non-existing context");
|
||||
|
||||
// Flush everything in the current context so that we don't have
|
||||
// to worry about insertions resulting in inconsistent frame creation.
|
||||
|
@ -3928,10 +3915,7 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode)
|
|||
}
|
||||
|
||||
// Create content object
|
||||
if (mCurrentContext->mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mCurrentContext->mStackPos > 0, "leaf w/o container");
|
||||
nsIHTMLContent* parent = mCurrentContext->mStack[mCurrentContext->mStackPos-1].mContent;
|
||||
nsAutoString tag("SCRIPT");
|
||||
nsIHTMLContent* element = nsnull;
|
||||
|
|
|
@ -1179,9 +1179,7 @@ SinkContext::OpenContainer(const nsIParserNode& aNode)
|
|||
rv = mSink->AddAttributes(aNode, content);
|
||||
|
||||
if (mPreAppend) {
|
||||
if (mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(mStackPos > 0, "container w/o parent");
|
||||
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
|
||||
if (mStack[mStackPos-1].mInsertionPoint != -1) {
|
||||
parent->InsertChildAt(content,
|
||||
|
@ -1254,9 +1252,7 @@ SinkContext::CloseContainer(const nsIParserNode& aNode)
|
|||
|
||||
// Add container to its parent if we haven't already done it
|
||||
if (0 == (mStack[mStackPos].mFlags & APPENDED)) {
|
||||
if (mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(mStackPos > 0, "container w/o parent");
|
||||
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
|
||||
// If the parent has an insertion point, insert rather than
|
||||
// append.
|
||||
|
@ -1567,11 +1563,7 @@ SinkContext::AddLeaf(const nsIParserNode& aNode)
|
|||
nsresult
|
||||
SinkContext::AddLeaf(nsIHTMLContent* aContent)
|
||||
{
|
||||
|
||||
if (mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mStackPos > 0, "leaf w/o container");
|
||||
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
|
||||
// If the parent has an insertion point, insert rather than
|
||||
// append.
|
||||
|
@ -1873,10 +1865,7 @@ SinkContext::FlushText(PRBool* aDidFlush, PRBool aReleaseLast)
|
|||
NS_RELEASE(text);
|
||||
|
||||
// Add text to its parent
|
||||
if (mStackPos<= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mStackPos > 0, "leaf w/o container");
|
||||
nsIHTMLContent* parent = mStack[mStackPos - 1].mContent;
|
||||
if (mStack[mStackPos-1].mInsertionPoint != -1) {
|
||||
parent->InsertChildAt(content,
|
||||
|
@ -2310,9 +2299,7 @@ HTMLContentSink::BeginContext(PRInt32 aPosition)
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (mCurrentContext == 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ASSERTION(mCurrentContext != nsnull," Non-existing context");
|
||||
|
||||
// Flush everything in the current context so that we don't have
|
||||
// to worry about insertions resulting in inconsistent frame creation.
|
||||
|
@ -3928,10 +3915,7 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode)
|
|||
}
|
||||
|
||||
// Create content object
|
||||
if (mCurrentContext->mStackPos <= 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mCurrentContext->mStackPos > 0, "leaf w/o container");
|
||||
nsIHTMLContent* parent = mCurrentContext->mStack[mCurrentContext->mStackPos-1].mContent;
|
||||
nsAutoString tag("SCRIPT");
|
||||
nsIHTMLContent* element = nsnull;
|
||||
|
|
Загрузка…
Ссылка в новой задаче