зеркало из https://github.com/mozilla/gecko-dev.git
bug 1549708: docshell: add nsIDocShell.isForceReloading; r=bzbarsky
Exposes a new nsIDocShell API, isForceReloading, to determine if the loaded document was force-reloaded or not. It relies on the underlying behaviour of nsDocShell::IsForceReloading(), which again relies on nsDocShell::IsForceReloadType(mLoadType). The getter is used in the remote agent to test that Page.reload({ignoreCache: true}) works as intended. Differential Revision: https://phabricator.services.mozilla.com/D51435 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
55deef9140
Коммит
243b658475
|
@ -13342,6 +13342,12 @@ nsDocShell::GetColorMatrix(nsTArray<float>& aMatrix) {
|
|||
|
||||
#undef MATRIX_LENGTH
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetIsForceReloading(bool* aForceReload) {
|
||||
*aForceReload = IsForceReloading();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool nsDocShell::IsForceReloading() { return IsForceReloadType(mLoadType); }
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -1074,6 +1074,12 @@ interface nsIDocShell : nsIDocShellTreeItem
|
|||
|
||||
void setColorMatrix(in Array<float> aMatrix);
|
||||
|
||||
/**
|
||||
* Returns true if the current load is a forced reload,
|
||||
* e.g. started by holding shift whilst triggering reload.
|
||||
*/
|
||||
readonly attribute bool isForceReloading;
|
||||
|
||||
Array<float> getColorMatrix();
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче