зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1744397 - Simplify refresh code: remove aRepeat argument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132860
This commit is contained in:
Родитель
5b85b64443
Коммит
fd2d03af6a
|
@ -25,7 +25,7 @@ async function attemptFakeRefresh(browser, expectRefresh) {
|
|||
) {
|
||||
let URI = docShell.QueryInterface(Ci.nsIWebNavigation).currentURI;
|
||||
let refresher = docShell.QueryInterface(Ci.nsIRefreshURI);
|
||||
refresher.refreshURI(URI, null, 0, false, true);
|
||||
refresher.refreshURI(URI, null, 0, true);
|
||||
|
||||
Assert.equal(
|
||||
refresher.refreshPending,
|
||||
|
|
|
@ -5011,7 +5011,7 @@ void nsDocShell::SetScrollbarPreference(mozilla::ScrollbarPreference aPref) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::RefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDelay,
|
||||
bool aRepeat, bool aMetaRefresh) {
|
||||
bool aMetaRefresh) {
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
NS_ENSURE_ARG(aURI);
|
||||
|
@ -5040,7 +5040,7 @@ nsDocShell::RefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDelay,
|
|||
}
|
||||
|
||||
nsCOMPtr<nsITimerCallback> refreshTimer =
|
||||
new nsRefreshTimer(this, aURI, aPrincipal, aDelay, aRepeat, aMetaRefresh);
|
||||
new nsRefreshTimer(this, aURI, aPrincipal, aDelay, aMetaRefresh);
|
||||
|
||||
BusyFlags busyFlags = GetBusyFlags();
|
||||
|
||||
|
@ -5406,7 +5406,7 @@ nsresult nsDocShell::SetupRefreshURIFromHeader(nsIURI* aBaseURI,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
rv = RefreshURI(uri, aPrincipal, seconds * 1000, false, true);
|
||||
rv = RefreshURI(uri, aPrincipal, seconds * 1000, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,13 +22,10 @@ interface nsIRefreshURI : nsISupports {
|
|||
* May be null, in which case the principal of current document will be
|
||||
* applied.
|
||||
* @param aMillis The number of milliseconds to wait.
|
||||
* @param aRepeat Flag to indicate if the uri is to be
|
||||
* repeatedly refreshed every aMillis milliseconds.
|
||||
* @param aMetaRefresh Flag to indicate if this is a Meta refresh.
|
||||
*/
|
||||
void refreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal,
|
||||
in long aMillis, in boolean aRepeat,
|
||||
in boolean aMetaRefresh);
|
||||
in long aMillis, in boolean aMetaRefresh);
|
||||
|
||||
/**
|
||||
* Loads a URI immediately as if it were a refresh.
|
||||
|
|
|
@ -22,12 +22,11 @@ NS_INTERFACE_MAP_END
|
|||
|
||||
nsRefreshTimer::nsRefreshTimer(nsDocShell* aDocShell, nsIURI* aURI,
|
||||
nsIPrincipal* aPrincipal, int32_t aDelay,
|
||||
bool aRepeat, bool aMetaRefresh)
|
||||
bool aMetaRefresh)
|
||||
: mDocShell(aDocShell),
|
||||
mURI(aURI),
|
||||
mPrincipal(aPrincipal),
|
||||
mDelay(aDelay),
|
||||
mRepeat(aRepeat),
|
||||
mMetaRefresh(aMetaRefresh) {}
|
||||
|
||||
nsRefreshTimer::~nsRefreshTimer() {}
|
||||
|
|
|
@ -19,7 +19,7 @@ class nsIPrincipal;
|
|||
class nsRefreshTimer : public nsITimerCallback, public nsINamed {
|
||||
public:
|
||||
nsRefreshTimer(nsDocShell* aDocShell, nsIURI* aURI, nsIPrincipal* aPrincipal,
|
||||
int32_t aDelay, bool aRepeat, bool aMetaRefresh);
|
||||
int32_t aDelay, bool aMetaRefresh);
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSITIMERCALLBACK
|
||||
|
@ -31,7 +31,6 @@ class nsRefreshTimer : public nsITimerCallback, public nsINamed {
|
|||
nsCOMPtr<nsIURI> mURI;
|
||||
nsCOMPtr<nsIPrincipal> mPrincipal;
|
||||
int32_t mDelay;
|
||||
bool mRepeat;
|
||||
bool mMetaRefresh;
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче