Bug 475621. Make saving an iframe which points to an image work when doing "save page, complete". r+sr=bzbarsky

This commit is contained in:
arno renevier 2009-02-03 22:28:02 +01:00
parent b2badb073f
commit 12f2869839

View File

@ -3834,11 +3834,17 @@ nsWebBrowserPersist::MakeAndStoreLocalFilenameInURIMap(
// Create a sensibly named filename for the URI and store in the URI map // Create a sensibly named filename for the URI and store in the URI map
nsCStringKey key(spec.get()); nsCStringKey key(spec.get());
URIData *data;
if (mURIMap.Exists(&key)) if (mURIMap.Exists(&key))
{ {
data = (URIData *) mURIMap.Get(&key);
if (aNeedsPersisting)
{
data->mNeedsPersisting = PR_TRUE;
}
if (aData) if (aData)
{ {
*aData = (URIData *) mURIMap.Get(&key); *aData = data;
} }
return NS_OK; return NS_OK;
} }
@ -3849,7 +3855,7 @@ nsWebBrowserPersist::MakeAndStoreLocalFilenameInURIMap(
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
// Store the file name // Store the file name
URIData *data = new URIData; data = new URIData;
NS_ENSURE_TRUE(data, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(data, NS_ERROR_OUT_OF_MEMORY);
data->mNeedsPersisting = aNeedsPersisting; data->mNeedsPersisting = aNeedsPersisting;