notifies the select content when all the children content is there

r=vidur, bug 17965


git-svn-id: svn://10.0.0.236/trunk@53259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rods%netscape.com 1999-11-11 22:15:02 +00:00
parent d018396336
commit f999911691
2 changed files with 28 additions and 2 deletions

View File

@ -74,6 +74,7 @@
#include "nsIParserService.h"
#include "nsParserCIID.h"
#include "nsISelectElement.h"
// XXX Go through a factory for this one
#include "nsICSSParser.h"
@ -1252,7 +1253,6 @@ SinkContext::CloseContainer(const nsIParserNode& aNode)
DidAddContent(content, mSink->IsInScript());
NS_IF_RELEASE(content);
// Special handling for certain tags
switch (nodeType) {
@ -1276,10 +1276,23 @@ SinkContext::CloseContainer(const nsIParserNode& aNode)
mSink->mNumOpenIFRAMES--;
break;
case eHTMLTag_select:
{
nsCOMPtr<nsISelectElement> select = do_QueryInterface(content, &result);
if (NS_SUCCEEDED(result)) {
result = select->DoneAddingContent();
}
}
break;
default:
break;
}
NS_IF_RELEASE(content);
#ifdef DEBUG
if (mPreAppend &&
SINK_LOG_TEST(gSinkLogModuleInfo,SINK_ALWAYS_REFLOW)) {

View File

@ -74,6 +74,7 @@
#include "nsIParserService.h"
#include "nsParserCIID.h"
#include "nsISelectElement.h"
// XXX Go through a factory for this one
#include "nsICSSParser.h"
@ -1252,7 +1253,6 @@ SinkContext::CloseContainer(const nsIParserNode& aNode)
DidAddContent(content, mSink->IsInScript());
NS_IF_RELEASE(content);
// Special handling for certain tags
switch (nodeType) {
@ -1276,10 +1276,23 @@ SinkContext::CloseContainer(const nsIParserNode& aNode)
mSink->mNumOpenIFRAMES--;
break;
case eHTMLTag_select:
{
nsCOMPtr<nsISelectElement> select = do_QueryInterface(content, &result);
if (NS_SUCCEEDED(result)) {
result = select->DoneAddingContent();
}
}
break;
default:
break;
}
NS_IF_RELEASE(content);
#ifdef DEBUG
if (mPreAppend &&
SINK_LOG_TEST(gSinkLogModuleInfo,SINK_ALWAYS_REFLOW)) {