Bug 604419 - Selecting "Don't show this message..." should prevent pop-up blocked info bar from being displayed. r=gavin ui-r=faaborg a=blockingfinal
authorFrank Yan <fyan@mozilla.com>
Wed, 01 Dec 2010 00:06:54 -0800
changeset 58429 bacd5fbd6456709f64182e6d73afc9eb0f4a6a9a
parent 58428 76b44542c5c7c93a35555acbe3582c95f625cbe6
child 58430 2cd12351217c492068b233c8657840b167cc4390
push id17290
push userfyan@mozilla.com
push dateWed, 01 Dec 2010 08:07:51 +0000
treeherdermozilla-central@bacd5fbd6456 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, faaborg, blockingfinal
bugs604419
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 604419 - Selecting "Don't show this message..." should prevent pop-up blocked info bar from being displayed. r=gavin ui-r=faaborg a=blockingfinal
browser/app/profile/firefox.js
browser/base/content/browser.js
browser/base/content/pageReportFirstTime.xul
browser/base/jar.mn
browser/locales/en-US/chrome/browser/pageReportFirstTime.dtd
browser/locales/jar.mn
js/src/tests/e4x/Regress/regress-308111.js
testing/tests/memtest.py
testing/tinderbox-standalone-tests/Tests.pm
testing/tools/profiles/createTestingProfile.py
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -432,17 +432,16 @@ pref("dom.disable_window_open_feature.lo
 // allow JS to move and resize existing windows
 pref("dom.disable_window_move_resize",            false);
 // prevent JS from monkeying with window focus, etc
 pref("dom.disable_window_flip",                   true);
 
 // popups.policy 1=allow,2=reject
 pref("privacy.popups.policy",               1);
 pref("privacy.popups.usecustom",            true);
-pref("privacy.popups.firstTime",            true);
 pref("privacy.popups.showBrowserMessage",   true);
 
 pref("privacy.item.cookies",                false);
 
 pref("privacy.clearOnShutdown.history",     true);
 pref("privacy.clearOnShutdown.formdata",    true);
 pref("privacy.clearOnShutdown.passwords",   false);
 pref("privacy.clearOnShutdown.downloads",   true);
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -580,37 +580,19 @@ const gPopupBlockerObserver = {
     }
     else
       window.openDialog("chrome://browser/content/preferences/permissions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
   dontShowMessage: function ()
   {
-#if 0 
-    // Disabled until bug 594294 is fixed.
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
-    var firstTime = gPrefService.getBoolPref("privacy.popups.firstTime");
-
-    // If the info message is showing at the top of the window, and the user has never
-    // hidden the message before, show an info box telling the user where the info
-    // will be displayed.
-    if (showMessage && firstTime)
-      this._displayPageReportFirstTime();
-
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
-#endif
-
     gBrowser.getNotificationBox().removeCurrentNotification();
-  },
-
-  _displayPageReportFirstTime: function ()
-  {
-    window.openDialog("chrome://browser/content/pageReportFirstTime.xul", "_blank",
-                      "dependent");
   }
 };
 
 const gXPInstallObserver = {
   _findChildShell: function (aDocShell, aSoughtShell)
   {
     if (aDocShell == aSoughtShell)
       return aDocShell;
deleted file mode 100644
--- a/browser/base/content/pageReportFirstTime.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?> 
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla Communicator client code, released
-# March 31, 1998.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998-1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#   David Hyatt (hyatt@apple.com)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
-
-<!DOCTYPE dialog [
-  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
-  %brandDTD;
-  <!ENTITY % pageReportFirstTimeDTD SYSTEM "chrome://browser/locale/pageReportFirstTime.dtd" >
-  %pageReportFirstTimeDTD;
-]>            
- 
-<dialog id="pageReportFirstTime"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        title="&caption.label;"
-        onload="setTimeout(function() { window.sizeToContent(); }, 100);"
-        style="width: 40em;"
-        buttons="accept"
-        persist="screenX screenY"
-        screenX="24" screenY="24">
-              
-  <description>
-    &startDescriptionText.label;
-  </description>
-
-  <separator class="thin"/>
-
-  <hbox pack="center">
-    <!-- insert example here! (bug 594294) -->
-  </hbox>
-
-  <separator class="thin"/>
-
-  <description>
-    &endDescription.label;
-  </description>
-
- </dialog>
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -33,17 +33,16 @@ browser.jar:
 *       content/browser/pageinfo/pageInfo.css         (content/pageinfo/pageInfo.css)
 *       content/browser/pageinfo/pageInfo.xml         (content/pageinfo/pageInfo.xml)
 *       content/browser/pageinfo/feeds.js             (content/pageinfo/feeds.js)
 *       content/browser/pageinfo/feeds.xml            (content/pageinfo/feeds.xml)
 *       content/browser/pageinfo/permissions.js       (content/pageinfo/permissions.js)
 *       content/browser/pageinfo/security.js          (content/pageinfo/security.js)
 *       content/browser/openLocation.js               (content/openLocation.js)
 *       content/browser/openLocation.xul              (content/openLocation.xul)
-*       content/browser/pageReportFirstTime.xul       (content/pageReportFirstTime.xul)
 *       content/browser/safeMode.js                   (content/safeMode.js)
 *       content/browser/safeMode.xul                  (content/safeMode.xul)
 *       content/browser/sanitize.js                   (content/sanitize.js)
 *       content/browser/sanitize.xul                  (content/sanitize.xul)
 *       content/browser/sanitizeDialog.js             (content/sanitizeDialog.js)
         content/browser/sanitizeDialog.css            (content/sanitizeDialog.css)
 *       content/browser/tabbrowser.css                (content/tabbrowser.css)
 *       content/browser/tabbrowser.xml                (content/tabbrowser.xml)
deleted file mode 100644
--- a/browser/locales/en-US/chrome/browser/pageReportFirstTime.dtd
+++ /dev/null
@@ -1,7 +0,0 @@
-<!ENTITY startDescriptionText.label        "A web site has attempted to open a pop-up window without your permission. &brandShortName; has automatically closed the pop-up window.">
-
-<!ENTITY endDescription.label              "You can click on this icon to see which sites &brandShortName; blocked and to allow those sites to open pop-ups if they are required for the site to function correctly.">
-
-<!ENTITY caption.label                     "About Pop-up Blocking">
-
-<!ENTITY done.label "Done">
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -14,17 +14,16 @@
 *   locale/browser/browser.dtd                     (%chrome/browser/browser.dtd)
     locale/browser/baseMenuOverlay.dtd             (%chrome/browser/baseMenuOverlay.dtd)
     locale/browser/browser.properties              (%chrome/browser/browser.properties)
     locale/browser/inspector.properties            (%chrome/browser/inspector.properties)
     locale/browser/openLocation.dtd                (%chrome/browser/openLocation.dtd)
     locale/browser/openLocation.properties         (%chrome/browser/openLocation.properties)
 *   locale/browser/pageInfo.dtd                    (%chrome/browser/pageInfo.dtd)
     locale/browser/pageInfo.properties             (%chrome/browser/pageInfo.properties)
-    locale/browser/pageReportFirstTime.dtd         (%chrome/browser/pageReportFirstTime.dtd)
     locale/browser/quitDialog.properties           (%chrome/browser/quitDialog.properties)
 *   locale/browser/safeMode.dtd                    (%chrome/browser/safeMode.dtd)
     locale/browser/sanitize.dtd                    (%chrome/browser/sanitize.dtd)
     locale/browser/search.properties               (%chrome/browser/search.properties)
     locale/browser/searchbar.dtd                   (%chrome/browser/searchbar.dtd)
     locale/browser/engineManager.dtd               (%chrome/browser/engineManager.dtd)
     locale/browser/engineManager.properties        (%chrome/browser/engineManager.properties)
     locale/browser/setDesktopBackground.dtd        (%chrome/browser/setDesktopBackground.dtd)
--- a/js/src/tests/e4x/Regress/regress-308111.js
+++ b/js/src/tests/e4x/Regress/regress-308111.js
@@ -276,17 +276,16 @@ var xml = <prefs>
 <pref><name>font.size.fixed.x-gujr</name></pref>
 <pref><name>security.ssl2.des_ede3_192</name></pref>
 <pref><name>browser.visited_color</name></pref>
 <pref><name>capability.policy.mailnews.*.nodeValue.get</name></pref>
 <pref><name>font.default.x-beng</name></pref>
 <pref><name>intl.charsetmenu.browser.more4</name></pref>
 <pref><name>network.http.keep-alive</name></pref>
 <pref><name>ui.key.accelKey</name></pref>
-<pref><name>privacy.popups.firstTime</name></pref>
 <pref><name>browser.fixup.alternate.enabled</name></pref>
 <pref><name>font.name-list.serif.x-cans</name></pref>
 <pref><name>security.enable_ssl3</name></pref>
 <pref><name>print.print_headerright</name></pref>
 <pref><name>network.IDN.whitelist.th</name></pref>
 <pref><name>capability.policy.mailnews.SOAPEncoding.unmapSchemaURI</name></pref>
 <pref><name>capability.policy.mailnews.Range.toString</name></pref>
 <pref><name>print.print_edge_bottom</name></pref>
--- a/testing/tests/memtest.py
+++ b/testing/tests/memtest.py
@@ -191,17 +191,16 @@ class Firefox_runner:
                 "    return \"PROXY localhost\";\n"
                 "}\n")
         p.close()
 
     def write_user_prefs(this):
         userprefs = open(os.path.join(this.profile_dir, "user.js"), "w")
         userprefs.write("user_pref(\"network.proxy.autoconfig_url\", \"file://%s\");\n" % this.proxypac)
         userprefs.write("user_pref(\"network.proxy.type\", 2);\n")
-        userprefs.write("user_pref(\"privacy.popups.firstTime\", false);\n")
         userprefs.write("user_pref(\"dom.max_script_run_time\", 0);\n")
         userprefs.write("user_pref(\"dom.max_script_run_time\", 0);\n")
         userprefs.write("user_pref(\"dom.allow_scripts_to_close_windows\", true);\n")
         userprefs.close()
 
     def perform_initial_registration(this):
         dummy_file = os.path.join(this.tmpdir, "dummy.html")
         f = open(dummy_file, "w")
--- a/testing/tinderbox-standalone-tests/Tests.pm
+++ b/testing/tinderbox-standalone-tests/Tests.pm
@@ -45,17 +45,16 @@ sub global_prefs {
 
     # Set prefs to allow us to move, resize, and raise/lower the
     # current window. Tgfx needs this.
     Prefs::set_pref($pref_file, 'dom.disable_window_flip', 'false');
     Prefs::set_pref($pref_file, 'dom.disable_window_move_resize', 'false');
 
     # Suppress firefox's popup blocking
     if ($Settings::BinaryName =~ /^firefox/) {
-        Prefs::set_pref($pref_file, 'privacy.popups.firstTime', 'false');
         Prefs::set_pref($pref_file, 'dom.disable_open_during_load', 'false');
 
         # Suppress default browser dialog
         Prefs::set_pref($pref_file, 'browser.shell.checkDefaultBrowser', 'false');
 
         # Suppress session restore dialog
         Prefs::set_pref($pref_file, 'browser.sessionstore.resume_from_crash', 'false');
     }
--- a/testing/tools/profiles/createTestingProfile.py
+++ b/testing/tools/profiles/createTestingProfile.py
@@ -17,17 +17,16 @@ userPrefs = {
     'browser.tabs.warnOnClose': 'false',
     'browser.warnOnQuit': 'false',
     'dom.allow_scripts_to_close_windows': 'true',
     'dom.disable_open_during_load': 'false',
     'dom.disable_window_flip': 'false',
     'dom.disable_window_move_resize': 'false',
     'layout.fire_onload_after_image_background_loads': 'true',
     'javascript.options.showInConsole': 'true',
-    'privacy.popups.firstTime': 'false',
     'layout.debug.enable_data_xbl': 'true',
     'shell.checkDefaultClient': 'false',
     'browser.EULA.override': 'true'
 }
 
 def usage():
     print "python " + sys.argv[0] + " --binary=binary_location [--profileName=default] [--clobber] [--help]"