зеркало из https://github.com/mozilla/pjs.git
added the call DoneAddingContent for the select after it has been created.
r=dcone,bug 18784,16821
This commit is contained in:
Родитель
b87b60347f
Коммит
d6847ac0e2
|
@ -115,6 +115,7 @@
|
|||
#include "rdf.h"
|
||||
#include "rdfutil.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsISelectElement.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
|
@ -4737,6 +4738,15 @@ nsXULDocument::CreateElement(nsXULPrototypeElement* aPrototype, nsIContent** aRe
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
htmlformctrl->SetForm(docform);
|
||||
|
||||
// check to see if the form element is a select
|
||||
// if it is, then tell it all the content is there,
|
||||
// even though the option haven't been added yet.
|
||||
nsresult srv;
|
||||
nsCOMPtr<nsISelectElement> select = do_QueryInterface(element, &srv);
|
||||
if (NS_SUCCEEDED(srv)) {
|
||||
srv = select->DoneAddingContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
#include "rdf.h"
|
||||
#include "rdfutil.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsISelectElement.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
|
@ -4737,6 +4738,15 @@ nsXULDocument::CreateElement(nsXULPrototypeElement* aPrototype, nsIContent** aRe
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
htmlformctrl->SetForm(docform);
|
||||
|
||||
// check to see if the form element is a select
|
||||
// if it is, then tell it all the content is there,
|
||||
// even though the option haven't been added yet.
|
||||
nsresult srv;
|
||||
nsCOMPtr<nsISelectElement> select = do_QueryInterface(element, &srv);
|
||||
if (NS_SUCCEEDED(srv)) {
|
||||
srv = select->DoneAddingContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче