зеркало из https://github.com/mozilla/pjs.git
[XForms] Cannot submit with replace=instance more than one time. Part of fix (for branch). Bug 338451, r=me+aaronr, patch by doronr
This commit is contained in:
Родитель
9572b9bcf0
Коммит
f82db2ddd8
|
@ -481,6 +481,14 @@ nsXFormsSubmissionElement::LoadReplaceInstance(nsIChannel *channel)
|
|||
PRUint32 contentLength;
|
||||
mPipeIn->Available(&contentLength);
|
||||
|
||||
// set the base uri so that the document can get the correct security
|
||||
// principal
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = channel->GetURI(getter_AddRefs(uri));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = parser->SetBaseURI(uri);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> newDoc;
|
||||
parser->ParseFromStream(mPipeIn, contentCharset.get(), contentLength,
|
||||
"application/xml", getter_AddRefs(newDoc));
|
||||
|
@ -511,7 +519,6 @@ nsXFormsSubmissionElement::LoadReplaceInstance(nsIChannel *channel)
|
|||
|
||||
// Get the appropriate instance node. If the "instance" attribute is set,
|
||||
// then get that instance node. Otherwise, get the one we are bound to.
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIModelElementPrivate> model = GetModel();
|
||||
NS_ENSURE_STATE(model);
|
||||
nsCOMPtr<nsIInstanceElementPrivate> instanceElement;
|
||||
|
|
Загрузка…
Ссылка в новой задаче