Bug 1209293 - Flip default options for click-to-view images r=mfinkle
authorJonathan Almeida (:jonalmeida) <jonalmeida942@gmail.com>
Tue, 10 Nov 2015 00:03:55 -0500
changeset 271925 21f52f8344413fc44a1d5815272662179b6c09f4
parent 271838 411e731c6a0dc2c56db78cbc71efcd859f323878
child 271926 aa429ba5cf28756f3ef2dcd55a711446dbebee19
push id29658
push usercbook@mozilla.com
push dateWed, 11 Nov 2015 11:08:38 +0000
treeherdermozilla-central@754119dfb99f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1209293
milestone45.0a1
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 1209293 - Flip default options for click-to-view images r=mfinkle
mobile/android/app/mobile.js
mobile/android/components/ImageBlockingPolicy.js
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -345,19 +345,19 @@ pref("browser.enable_click_image_resizin
 
 // open in tab preferences
 // 0=default window, 1=current window/tab, 2=new window, 3=new tab in most window
 pref("browser.link.open_external", 3);
 pref("browser.link.open_newwindow", 3);
 // 0=force all new windows to tabs, 1=don't force, 2=only force those with no features set
 pref("browser.link.open_newwindow.restriction", 0);
 
-// image blocking policy
-// 0=disabled, 1=enabled, 2=cellular-only
-pref("browser.image_blocking", 0);
+// show images option
+// 0=never, 1=always, 2=cellular-only
+pref("browser.image_blocking", 1);
 
 // controls which bits of private data to clear. by default we clear them all.
 pref("privacy.item.cache", true);
 pref("privacy.item.cookies", true);
 pref("privacy.item.offlineApps", true);
 pref("privacy.item.history", true);
 pref("privacy.item.searchHistory", true);
 pref("privacy.item.formdata", true);
--- a/mobile/android/components/ImageBlockingPolicy.js
+++ b/mobile/android/components/ImageBlockingPolicy.js
@@ -40,17 +40,17 @@ ImageBlockingPolicy.prototype = {
   classDescription: "Click-To-Play Image",
   classID: Components.ID("{f55f77f9-d33d-4759-82fc-60db3ee0bb91}"),
   contractID: "@mozilla.org/browser/blockimages-policy;1",
   xpcom_categories: [{category: "content-policy", service: true}],
 
   // nsIContentPolicy interface implementation
   shouldLoad: function(contentType, contentLocation, requestOrigin, node, mimeTypeGuess, extra) {
     // When enabled or when on cellular, and option for cellular-only is selected
-    if (this._enabled() == OPTION_ALWAYS || (this._enabled() == OPTION_WIFI_ONLY && this._usingCellular())) {
+    if (this._enabled() == OPTION_NEVER || (this._enabled() == OPTION_WIFI_ONLY && this._usingCellular())) {
       if (contentType === Ci.nsIContentPolicy.TYPE_IMAGE || contentType === Ci.nsIContentPolicy.TYPE_IMAGESET) {
         // Accept any non-http(s) image URLs
         if (!contentLocation.schemeIs("http") && !contentLocation.schemeIs("https")) {
           return Ci.nsIContentPolicy.ACCEPT;
         }
 
         if (node instanceof Ci.nsIDOMHTMLImageElement) {
           // Accept if the user has asked to view the image