зеркало из https://github.com/mozilla/gecko-dev.git
fixing session history for frames. I accidently broke the behavior in
my monday's checkin. No bug #. r=law
This commit is contained in:
Родитель
98ee25447f
Коммит
0cc268758c
|
@ -489,6 +489,9 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
cur = this;
|
cur = this;
|
||||||
prev = aPrevEntry;
|
prev = aPrevEntry;
|
||||||
|
|
||||||
|
if (!cur || !prev) {
|
||||||
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
if (prev) {
|
if (prev) {
|
||||||
prev->GetURL(&pURL);
|
prev->GetURL(&pURL);
|
||||||
pSURL = pURL;
|
pSURL = pURL;
|
||||||
|
@ -497,14 +500,10 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
if (cur) {
|
if (cur) {
|
||||||
cur->GetURL(&cURL);
|
cur->GetURL(&cURL);
|
||||||
cSURL = cURL;
|
cSURL = cURL;
|
||||||
Recycle(cURL);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NS_ADDREF(aPrevEntry);
|
// NS_ADDREF(aPrevEntry);
|
||||||
if (!cur || !prev) {
|
|
||||||
return NS_ERROR_NULL_POINTER;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Compare the URLs
|
//Compare the URLs
|
||||||
{
|
{
|
||||||
|
@ -514,10 +513,6 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
urlChanged = PR_TRUE;
|
urlChanged = PR_TRUE;
|
||||||
} // compareURLs
|
} // compareURLs
|
||||||
|
|
||||||
|
|
||||||
/* The URL to be loaded in it */
|
|
||||||
cur->GetURL(&cURL);
|
|
||||||
|
|
||||||
if (urlChanged || aIsReload) {
|
if (urlChanged || aIsReload) {
|
||||||
if (prev) {
|
if (prev) {
|
||||||
PRBool isInSHist=PR_FALSE, isLoadingDoc=PR_FALSE;
|
PRBool isInSHist=PR_FALSE, isLoadingDoc=PR_FALSE;
|
||||||
|
@ -567,8 +562,6 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
if (APP_DEBUG) printf("SessionHistory::Load URLs in webshells %x & %x match \n", (unsigned int) mWS, (unsigned int) prev);
|
if (APP_DEBUG) printf("SessionHistory::Load URLs in webshells %x & %x match \n", (unsigned int) mWS, (unsigned int) prev);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (pSURL) delete pSURL;
|
|
||||||
// if (cSURL) delete cSURL;
|
|
||||||
/* Make sure the child windows are in par */
|
/* Make sure the child windows are in par */
|
||||||
PRInt32 cnt=0, ccnt=0, pcnt=0;
|
PRInt32 cnt=0, ccnt=0, pcnt=0;
|
||||||
ccnt = cur->GetChildCnt();
|
ccnt = cur->GetChildCnt();
|
||||||
|
@ -632,7 +625,6 @@ nsHistoryEntry::Compare(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
if (cur) {
|
if (cur) {
|
||||||
cur->GetURL(&cURL);
|
cur->GetURL(&cURL);
|
||||||
cSURL = (cURL);
|
cSURL = (cURL);
|
||||||
Recycle(cURL);
|
|
||||||
}
|
}
|
||||||
//Compare the URLs
|
//Compare the URLs
|
||||||
{
|
{
|
||||||
|
@ -642,9 +634,6 @@ nsHistoryEntry::Compare(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
urlChanged = PR_TRUE;
|
urlChanged = PR_TRUE;
|
||||||
} // compareURLs
|
} // compareURLs
|
||||||
|
|
||||||
/* The URL to be loaded in it */
|
|
||||||
cur->GetURL(&cURL);
|
|
||||||
|
|
||||||
if (urlChanged /*|| aIsReload*/) {
|
if (urlChanged /*|| aIsReload*/) {
|
||||||
if (APP_DEBUG)
|
if (APP_DEBUG)
|
||||||
printf("SessionHistory::Compare URLs in webshells %x & %x don't match \n", (unsigned int) mWS, (unsigned int) prev);
|
printf("SessionHistory::Compare URLs in webshells %x & %x don't match \n", (unsigned int) mWS, (unsigned int) prev);
|
||||||
|
@ -656,8 +645,7 @@ nsHistoryEntry::Compare(nsIWebShell * aPrevEntry, PRBool aIsReload) {
|
||||||
/* Mark the changed flag to false. This is used in the end to determine
|
/* Mark the changed flag to false. This is used in the end to determine
|
||||||
* whether we are done with the whole loading process for this history
|
* whether we are done with the whole loading process for this history
|
||||||
*/
|
*/
|
||||||
if (APP_DEBUG) printf("SessionHistory::Compare URLs in webshells %x & %x match \n", (unsigned int) mWS, (unsigned int) prev);
|
if (APP_DEBUG) printf("SessionHistory::Compare URLs in webshells %x & %x match \n", (unsigned int) mWS, (unsigned int) prev);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure the child windows are in par */
|
/* Make sure the child windows are in par */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче