зеркало из https://github.com/mozilla/pjs.git
notifies the select content when all the children content is there
r=vidur, bug 17965
This commit is contained in:
Родитель
63760fca6d
Коммит
6f6e5b8b6b
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче