mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249542 - Remove the prefs for History API push/pop/replaceState; r=bzbarsky
These prefs don't even work properly, and they can break Web content in pretty bad ways for the users who have them set.
This commit is contained in:
parent
b2953f8fc6
commit
90da955373
@ -457,8 +457,6 @@ nsGlobalWindow::DOMMinTimeoutValue() const {
|
|||||||
// CIDs
|
// CIDs
|
||||||
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
|
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
|
||||||
|
|
||||||
static const char sPopStatePrefStr[] = "browser.history.allowPopState";
|
|
||||||
|
|
||||||
#define NETWORK_UPLOAD_EVENT_NAME NS_LITERAL_STRING("moznetworkupload")
|
#define NETWORK_UPLOAD_EVENT_NAME NS_LITERAL_STRING("moznetworkupload")
|
||||||
#define NETWORK_DOWNLOAD_EVENT_NAME NS_LITERAL_STRING("moznetworkdownload")
|
#define NETWORK_DOWNLOAD_EVENT_NAME NS_LITERAL_STRING("moznetworkdownload")
|
||||||
|
|
||||||
@ -9917,11 +9915,6 @@ nsGlobalWindow::DispatchSyncPopState()
|
|||||||
NS_ASSERTION(nsContentUtils::IsSafeToRunScript(),
|
NS_ASSERTION(nsContentUtils::IsSafeToRunScript(),
|
||||||
"Must be safe to run script here.");
|
"Must be safe to run script here.");
|
||||||
|
|
||||||
// Check that PopState hasn't been pref'ed off.
|
|
||||||
if (!Preferences::GetBool(sPopStatePrefStr, false)) {
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
// Bail if the window is frozen.
|
// Bail if the window is frozen.
|
||||||
|
@ -25,11 +25,6 @@
|
|||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
static const char* sAllowPushStatePrefStr =
|
|
||||||
"browser.history.allowPushState";
|
|
||||||
static const char* sAllowReplaceStatePrefStr =
|
|
||||||
"browser.history.allowReplaceState";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// History class implementation
|
// History class implementation
|
||||||
//
|
//
|
||||||
@ -304,12 +299,6 @@ nsHistory::PushOrReplaceState(JSContext* aCx, JS::Handle<JS::Value> aData,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that PushState hasn't been pref'ed off.
|
|
||||||
if (!Preferences::GetBool(aReplace ? sAllowReplaceStatePrefStr :
|
|
||||||
sAllowPushStatePrefStr, false)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// AddState might run scripts, so we need to hold a strong reference to the
|
// AddState might run scripts, so we need to hold a strong reference to the
|
||||||
// docShell here to keep it from going away.
|
// docShell here to keep it from going away.
|
||||||
nsCOMPtr<nsIDocShell> docShell = win->GetDocShell();
|
nsCOMPtr<nsIDocShell> docShell = win->GetDocShell();
|
||||||
|
@ -4486,9 +4486,6 @@ pref("html5.flushtimer.initialdelay", 120);
|
|||||||
pref("html5.flushtimer.subsequentdelay", 120);
|
pref("html5.flushtimer.subsequentdelay", 120);
|
||||||
|
|
||||||
// Push/Pop/Replace State prefs
|
// Push/Pop/Replace State prefs
|
||||||
pref("browser.history.allowPushState", true);
|
|
||||||
pref("browser.history.allowReplaceState", true);
|
|
||||||
pref("browser.history.allowPopState", true);
|
|
||||||
pref("browser.history.maxStateObjectSize", 655360);
|
pref("browser.history.maxStateObjectSize", 655360);
|
||||||
|
|
||||||
pref("browser.meta_refresh_when_inactive.disabled", false);
|
pref("browser.meta_refresh_when_inactive.disabled", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user