Bug 1245930 - Disable zoomed view on non-Nightly builds. r=mcomella

MozReview-Commit-ID: 3RfprujEO1h
This commit is contained in:
Margaret Leibovic 2016-02-12 12:54:50 -05:00
parent 66a235beb9
commit 0be96dabce
3 changed files with 14 additions and 1 deletions

View File

@ -433,7 +433,13 @@ pref("font.size.inflation.minTwips", 0);
// When true, zooming will be enabled on all sites, even ones that declare user-scalable=no. // When true, zooming will be enabled on all sites, even ones that declare user-scalable=no.
pref("browser.ui.zoom.force-user-scalable", false); pref("browser.ui.zoom.force-user-scalable", false);
// When removing this Nightly flag, also remember to remove the flags surrounding this feature
// in GeckoPreferences and BrowserApp (see bug 1245930).
#ifdef NIGHTLY_BUILD
pref("ui.zoomedview.enabled", true); pref("ui.zoomedview.enabled", true);
#else
pref("ui.zoomedview.enabled", false);
#endif
pref("ui.zoomedview.keepLimitSize", 16); // value in layer pixels, used to not keep the large elements in the cluster list (Bug 1191041) pref("ui.zoomedview.keepLimitSize", 16); // value in layer pixels, used to not keep the large elements in the cluster list (Bug 1191041)
pref("ui.zoomedview.limitReadableSize", 8); // value in layer pixels pref("ui.zoomedview.limitReadableSize", 8); // value in layer pixels
pref("ui.zoomedview.defaultZoomFactor", 2); pref("ui.zoomedview.defaultZoomFactor", 2);

View File

@ -1871,7 +1871,7 @@ public class BrowserApp extends GeckoApp
// Force tabs panel inflation once the initial // Force tabs panel inflation once the initial
// pageload is finished. // pageload is finished.
ensureTabsPanelExists(); ensureTabsPanelExists();
if (mZoomedView == null) { if (AppConstants.NIGHTLY_BUILD && mZoomedView == null) {
ViewStub stub = (ViewStub) findViewById(R.id.zoomed_view_stub); ViewStub stub = (ViewStub) findViewById(R.id.zoomed_view_stub);
mZoomedView = (ZoomedView) stub.inflate(); mZoomedView = (ZoomedView) stub.inflate();
} }

View File

@ -140,6 +140,7 @@ OnSharedPreferenceChangeListener
private static final String PREFS_DEVTOOLS_REMOTE_LINK = NON_PREF_PREFIX + "remote_debugging.link"; private static final String PREFS_DEVTOOLS_REMOTE_LINK = NON_PREF_PREFIX + "remote_debugging.link";
private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.state"; private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.state";
private static final String PREFS_TRACKING_PROTECTION_PB = "privacy.trackingprotection.pbmode.enabled"; private static final String PREFS_TRACKING_PROTECTION_PB = "privacy.trackingprotection.pbmode.enabled";
private static final String PREFS_ZOOMED_VIEW_ENABLED = "ui.zoomedview.enabled";
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled"; public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled"; public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
private static final String PREFS_TRACKING_PROTECTION_PRIVATE_BROWSING = "privacy.trackingprotection.pbmode.enabled"; private static final String PREFS_TRACKING_PROTECTION_PRIVATE_BROWSING = "privacy.trackingprotection.pbmode.enabled";
@ -837,6 +838,12 @@ OnSharedPreferenceChangeListener
i--; i--;
continue; continue;
} }
} else if (PREFS_ZOOMED_VIEW_ENABLED.equals(key)) {
if (!AppConstants.NIGHTLY_BUILD) {
preferences.removePreference(pref);
i--;
continue;
}
} else if (PREFS_VOICE_INPUT_ENABLED.equals(key)) { } else if (PREFS_VOICE_INPUT_ENABLED.equals(key)) {
if (!InputOptionsUtils.supportsVoiceRecognizer(getApplicationContext(), getResources().getString(R.string.voicesearch_prompt))) { if (!InputOptionsUtils.supportsVoiceRecognizer(getApplicationContext(), getResources().getString(R.string.voicesearch_prompt))) {
// Remove UI for voice input on non nightly builds. // Remove UI for voice input on non nightly builds.