зеркало из https://github.com/mozilla/pjs.git
Bug 766757 - Add LOAD_REPLACE_BYPASS_CACHE load type. r=bz
This commit is contained in:
Родитель
c4de1cc570
Коммит
4b275af5c2
|
@ -280,6 +280,8 @@ LogShellLoadType(nsIDocShell* aDocShell)
|
|||
case LOAD_PUSHSTATE:
|
||||
printf("load pushstate; ");
|
||||
break;
|
||||
case LOAD_REPLACE_BYPASS_CACHE:
|
||||
printf("replace bypass cache; ");
|
||||
case LOAD_ERROR_PAGE:
|
||||
printf("error page;");
|
||||
break;
|
||||
|
|
|
@ -648,6 +648,7 @@ ConvertLoadTypeToNavigationType(PRUint32 aLoadType)
|
|||
case LOAD_NORMAL_REPLACE:
|
||||
case LOAD_LINK:
|
||||
case LOAD_STOP_CONTENT:
|
||||
case LOAD_REPLACE_BYPASS_CACHE:
|
||||
result = nsIDOMPerformanceNavigation::TYPE_NAVIGATE;
|
||||
break;
|
||||
case LOAD_HISTORY:
|
||||
|
@ -1141,6 +1142,9 @@ ConvertDocShellLoadInfoToLoadType(nsDocShellInfoLoadType aDocShellLoadType)
|
|||
case nsIDocShellLoadInfo::loadPushState:
|
||||
loadType = LOAD_PUSHSTATE;
|
||||
break;
|
||||
case nsIDocShellLoadInfo::loadReplaceBypassCache:
|
||||
loadType = LOAD_REPLACE_BYPASS_CACHE;
|
||||
break;
|
||||
default:
|
||||
NS_NOTREACHED("Unexpected nsDocShellInfoLoadType value");
|
||||
}
|
||||
|
@ -1209,6 +1213,9 @@ nsDocShell::ConvertLoadTypeToDocShellLoadInfo(PRUint32 aLoadType)
|
|||
case LOAD_PUSHSTATE:
|
||||
docShellLoadType = nsIDocShellLoadInfo::loadPushState;
|
||||
break;
|
||||
case LOAD_REPLACE_BYPASS_CACHE:
|
||||
docShellLoadType = nsIDocShellLoadInfo::loadReplaceBypassCache;
|
||||
break;
|
||||
default:
|
||||
NS_NOTREACHED("Unexpected load type value");
|
||||
}
|
||||
|
@ -5923,6 +5930,7 @@ nsDocShell::Embed(nsIContentViewer * aContentViewer,
|
|||
case LOAD_RELOAD_BYPASS_CACHE:
|
||||
case LOAD_RELOAD_BYPASS_PROXY:
|
||||
case LOAD_RELOAD_BYPASS_PROXY_AND_CACHE:
|
||||
case LOAD_REPLACE_BYPASS_CACHE:
|
||||
updateHistory = false;
|
||||
break;
|
||||
default:
|
||||
|
@ -9226,6 +9234,7 @@ nsresult nsDocShell::DoChannelLoad(nsIChannel * aChannel,
|
|||
case LOAD_RELOAD_BYPASS_CACHE:
|
||||
case LOAD_RELOAD_BYPASS_PROXY:
|
||||
case LOAD_RELOAD_BYPASS_PROXY_AND_CACHE:
|
||||
case LOAD_REPLACE_BYPASS_CACHE:
|
||||
loadFlags |= nsIRequest::LOAD_BYPASS_CACHE |
|
||||
nsIRequest::LOAD_FRESH_CONNECTION;
|
||||
break;
|
||||
|
|
|
@ -60,6 +60,7 @@ enum LoadType {
|
|||
LOAD_STOP_CONTENT = MAKE_LOAD_TYPE(nsIDocShell::LOAD_CMD_NORMAL, nsIWebNavigation::LOAD_FLAGS_STOP_CONTENT),
|
||||
LOAD_STOP_CONTENT_AND_REPLACE = MAKE_LOAD_TYPE(nsIDocShell::LOAD_CMD_NORMAL, nsIWebNavigation::LOAD_FLAGS_STOP_CONTENT | nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY),
|
||||
LOAD_PUSHSTATE = MAKE_LOAD_TYPE(nsIDocShell::LOAD_CMD_PUSHSTATE, nsIWebNavigation::LOAD_FLAGS_NONE),
|
||||
LOAD_REPLACE_BYPASS_CACHE = MAKE_LOAD_TYPE(nsIDocShell::LOAD_CMD_NORMAL, nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY | nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE),
|
||||
/**
|
||||
* Load type for an error page. These loads are never triggered by users of
|
||||
* Docshell. Instead, Docshell triggers the load itself when a
|
||||
|
@ -91,6 +92,7 @@ static inline bool IsValidLoadType(PRUint32 aLoadType)
|
|||
case LOAD_STOP_CONTENT:
|
||||
case LOAD_STOP_CONTENT_AND_REPLACE:
|
||||
case LOAD_PUSHSTATE:
|
||||
case LOAD_REPLACE_BYPASS_CACHE:
|
||||
case LOAD_ERROR_PAGE:
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ interface nsIDocShellLoadInfo : nsISupports
|
|||
const long loadNormalBypassProxy = 15;
|
||||
const long loadNormalBypassProxyAndCache = 16;
|
||||
const long loadPushState = 17; // history.pushState or replaceState
|
||||
const long loadReplaceBypassCache = 18;
|
||||
|
||||
/** Contains a load type as specified by the load* constants */
|
||||
attribute nsDocShellInfoLoadType loadType;
|
||||
|
|
Загрузка…
Ссылка в новой задаче