Bug 682944 - Prevent snippets with iframes from breaking about:home. r=gavin

This commit is contained in:
Frank Yan 2012-04-24 13:43:38 -04:00
parent b0de9999fc
commit d841ed715a
2 changed files with 5 additions and 3 deletions

View File

@ -5229,9 +5229,11 @@ var TabsProgressListener = {
if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
Components.isSuccessCode(aStatus) &&
/^about:/.test(aWebProgress.DOMWindow.document.documentURI)) {
/^about:(?!newtab)/.test(aWebProgress.DOMWindow.document.documentURI)) {
aBrowser.addEventListener("click", BrowserOnClick, false);
aBrowser.addEventListener("pagehide", function onPageHide() {
aBrowser.addEventListener("pagehide", function onPageHide(event) {
if (aBrowser.contentDocument && event.target != aBrowser.contentDocument)
return;
aBrowser.removeEventListener("click", BrowserOnClick, false);
aBrowser.removeEventListener("pagehide", onPageHide, true);
}, true);

View File

@ -896,7 +896,7 @@ let AboutHomeUtils = {
loadSnippetsURL: function AHU_loadSnippetsURL()
{
const STARTPAGE_VERSION = 2;
const STARTPAGE_VERSION = 3;
let updateURL = Services.prefs
.getCharPref(this.SNIPPETS_URL_PREF)
.replace("%STARTPAGE_VERSION%", STARTPAGE_VERSION);