Include the part number inside a multipart document in the state key, so that

state restoration works correctly on each part.  Bug 47350, patch by Hideo
Saito <saito@densan.co.jp>, r=bzbarsky, sr=js
This commit is contained in:
bzbarsky@mit.edu
2005-01-15 17:47:23 +00:00
parent 97bbdc4a97
commit 9e821bf62f
9 changed files with 78 additions and 13 deletions

View File

@@ -4705,6 +4705,22 @@ nsDocShell::CreateContentViewer(const char *aContentType,
mEODForCurrentDocument = PR_FALSE;
// if this document is part of a multipart document,
// the ID can be used to distinguish it from the other parts.
nsCOMPtr<nsIMultiPartChannel> multiPartChannel(do_QueryInterface(request));
if (multiPartChannel) {
nsCOMPtr<nsIPresShell> shell;
rv = GetPresShell(getter_AddRefs(shell));
if (NS_SUCCEEDED(rv) && shell) {
nsIDocument *doc = shell->GetDocument();
if (doc) {
PRUint32 partID;
multiPartChannel->GetPartID(&partID);
doc->SetPartID(partID);
}
}
}
// Give hint to native plevent dispatch mechanism. If a document
// is loading the native plevent dispatch mechanism should favor
// performance over normal native event dispatch priorities.