notifies the select content when all the children content is there

r=vidur, bug 17965
This commit is contained in:
rods%netscape.com 1999-11-11 22:15:02 +00:00
Родитель 63760fca6d
Коммит 6f6e5b8b6b
2 изменённых файлов: 28 добавлений и 2 удалений

Просмотреть файл

@ -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)) {

Просмотреть файл

@ -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)) {