Make <form><p></form> actually close out the form, since <p> has an optional
end tag. Bug 22480, r=harishd, sr=heikki. git-svn-id: svn://10.0.0.236/trunk@143719 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3353,9 +3353,14 @@ HTMLContentSink::CloseForm()
|
||||
this);
|
||||
|
||||
if (mCurrentForm) {
|
||||
// If there is a <p> tag on the container stack, close it
|
||||
if (mCurrentContext->IsCurrentContainer(eHTMLTag_p)) {
|
||||
result = mCurrentContext->CloseContainer(eHTMLTag_p);
|
||||
}
|
||||
|
||||
// if this is a well-formed form, close it too
|
||||
if (mCurrentContext->IsCurrentContainer(eHTMLTag_form)) {
|
||||
mCurrentContext->FlushTextAndRelease();
|
||||
if (NS_SUCCEEDED(result) &&
|
||||
mCurrentContext->IsCurrentContainer(eHTMLTag_form)) {
|
||||
result = mCurrentContext->CloseContainer(eHTMLTag_form);
|
||||
mFlags &= ~NS_SINK_FLAG_FORM_ON_STACK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user