michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0:
michael@0: #filter substitution
michael@0:
michael@0: pref("toolkit.defaultChromeURI", "chrome://b2g/content/shell.html");
michael@0: pref("browser.chromeURL", "chrome://b2g/content/");
michael@0:
michael@0: // Bug 945235: Prevent all bars to be considered visible:
michael@0: pref("toolkit.defaultChromeFeatures", "chrome,dialog=no,close,resizable,scrollbars,extrachrome");
michael@0:
michael@0: // Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
michael@0: pref("browser.viewport.scaleRatio", -1);
michael@0:
michael@0: /* disable text selection */
michael@0: pref("browser.ignoreNativeFrameTextSelection", true);
michael@0:
michael@0: /* cache prefs */
michael@0: #ifdef MOZ_WIDGET_GONK
michael@0: pref("browser.cache.disk.enable", true);
michael@0: pref("browser.cache.disk.capacity", 55000); // kilobytes
michael@0: pref("browser.cache.disk.parent_directory", "/cache");
michael@0: #endif
michael@0: pref("browser.cache.disk.smart_size.enabled", false);
michael@0: pref("browser.cache.disk.smart_size.first_run", false);
michael@0:
michael@0: pref("browser.cache.memory.enable", true);
michael@0: pref("browser.cache.memory.capacity", 1024); // kilobytes
michael@0:
michael@0: pref("browser.cache.memory_limit", 2048); // 2 MB
michael@0:
michael@0: /* image cache prefs */
michael@0: pref("image.cache.size", 1048576); // bytes
michael@0: pref("image.high_quality_downscaling.enabled", false);
michael@0: pref("canvas.image.cache.limit", 10485760); // 10 MB
michael@0:
michael@0: /* offline cache prefs */
michael@0: pref("browser.offline-apps.notify", false);
michael@0: pref("browser.cache.offline.enable", true);
michael@0: pref("offline-apps.allow_by_default", true);
michael@0:
michael@0: /* protocol warning prefs */
michael@0: pref("network.protocol-handler.warn-external.tel", false);
michael@0: pref("network.protocol-handler.warn-external.mailto", false);
michael@0: pref("network.protocol-handler.warn-external.vnd.youtube", false);
michael@0:
michael@0: /* protocol expose prefs */
michael@0: // By default, all protocol handlers are exposed. This means that the browser
michael@0: // will response to openURL commands for all URL types. It will also try to open
michael@0: // link clicks inside the browser before failing over to the system handlers.
michael@0: pref("network.protocol-handler.expose.rtsp", true);
michael@0:
michael@0: /* http prefs */
michael@0: pref("network.http.pipelining", true);
michael@0: pref("network.http.pipelining.ssl", true);
michael@0: pref("network.http.proxy.pipelining", true);
michael@0: pref("network.http.pipelining.maxrequests" , 6);
michael@0: pref("network.http.keep-alive.timeout", 600);
michael@0: pref("network.http.max-connections", 20);
michael@0: pref("network.http.max-persistent-connections-per-server", 6);
michael@0: pref("network.http.max-persistent-connections-per-proxy", 20);
michael@0:
michael@0: // spdy
michael@0: pref("network.http.spdy.push-allowance", 32768);
michael@0:
michael@0: // See bug 545869 for details on why these are set the way they are
michael@0: pref("network.buffer.cache.count", 24);
michael@0: pref("network.buffer.cache.size", 16384);
michael@0:
michael@0: // predictive actions
michael@0: pref("network.seer.enable", false); // disabled on b2g
michael@0: pref("network.seer.max-db-size", 2097152); // bytes
michael@0: pref("network.seer.preserve", 50); // percentage of seer data to keep when cleaning up
michael@0:
michael@0: /* session history */
michael@0: pref("browser.sessionhistory.max_total_viewers", 1);
michael@0: pref("browser.sessionhistory.max_entries", 50);
michael@0:
michael@0: /* session store */
michael@0: pref("browser.sessionstore.resume_session_once", false);
michael@0: pref("browser.sessionstore.resume_from_crash", true);
michael@0: pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
michael@0: pref("browser.sessionstore.interval", 10000); // milliseconds
michael@0: pref("browser.sessionstore.max_tabs_undo", 1);
michael@0:
michael@0: /* these should help performance */
michael@0: pref("mozilla.widget.force-24bpp", true);
michael@0: pref("mozilla.widget.use-buffer-pixmap", true);
michael@0: pref("mozilla.widget.disable-native-theme", true);
michael@0: pref("layout.reflow.synthMouseMove", false);
michael@0: pref("layers.enable-tiles", true);
michael@0: /*
michael@0: Cross Process Mutex is not supported on Mac OS X so progressive
michael@0: paint can not be enabled for B2G on Mac OS X desktop
michael@0: */
michael@0: #ifdef MOZ_WIDGET_COCOA
michael@0: pref("layers.progressive-paint", false);
michael@0: #else
michael@0: pref("layers.progressive-paint", false);
michael@0: #endif
michael@0:
michael@0: /* download manager (don't show the window or alert) */
michael@0: pref("browser.download.useDownloadDir", true);
michael@0: pref("browser.download.folderList", 1); // Default to ~/Downloads
michael@0: pref("browser.download.manager.showAlertOnComplete", false);
michael@0: pref("browser.download.manager.showAlertInterval", 2000);
michael@0: pref("browser.download.manager.retention", 2);
michael@0: pref("browser.download.manager.showWhenStarting", false);
michael@0: pref("browser.download.manager.closeWhenDone", true);
michael@0: pref("browser.download.manager.openDelay", 0);
michael@0: pref("browser.download.manager.focusWhenStarting", false);
michael@0: pref("browser.download.manager.flashCount", 2);
michael@0: pref("browser.download.manager.displayedHistoryDays", 7);
michael@0:
michael@0: /* download helper */
michael@0: pref("browser.helperApps.deleteTempFileOnExit", false);
michael@0:
michael@0: /* password manager */
michael@0: pref("signon.rememberSignons", true);
michael@0: pref("signon.expireMasterPassword", false);
michael@0:
michael@0: /* autocomplete */
michael@0: pref("browser.formfill.enable", true);
michael@0:
michael@0: /* spellcheck */
michael@0: pref("layout.spellcheckDefault", 0);
michael@0:
michael@0: /* block popups by default, and notify the user about blocked popups */
michael@0: pref("dom.disable_open_during_load", true);
michael@0: pref("privacy.popups.showBrowserMessage", true);
michael@0:
michael@0: pref("keyword.enabled", true);
michael@0:
michael@0: pref("accessibility.typeaheadfind", false);
michael@0: pref("accessibility.typeaheadfind.timeout", 5000);
michael@0: pref("accessibility.typeaheadfind.flashBar", 1);
michael@0: pref("accessibility.typeaheadfind.linksonly", false);
michael@0: pref("accessibility.typeaheadfind.casesensitive", 0);
michael@0:
michael@0: // SSL error page behaviour
michael@0: pref("browser.ssl_override_behavior", 2);
michael@0: pref("browser.xul.error_pages.expert_bad_cert", false);
michael@0:
michael@0: // disable logging for the search service by default
michael@0: pref("browser.search.log", false);
michael@0:
michael@0: // disable updating
michael@0: pref("browser.search.update", false);
michael@0: pref("browser.search.update.log", false);
michael@0: pref("browser.search.updateinterval", 6);
michael@0:
michael@0: // enable search suggestions by default
michael@0: pref("browser.search.suggest.enabled", true);
michael@0:
michael@0: // tell the search service that we don't really expose the "current engine"
michael@0: pref("browser.search.noCurrentEngine", true);
michael@0:
michael@0: // Enable sparse localization by setting a few package locale overrides
michael@0: pref("chrome.override_package.global", "b2g-l10n");
michael@0: pref("chrome.override_package.mozapps", "b2g-l10n");
michael@0: pref("chrome.override_package.passwordmgr", "b2g-l10n");
michael@0:
michael@0: // enable xul error pages
michael@0: pref("browser.xul.error_pages.enabled", true);
michael@0:
michael@0: // disable color management
michael@0: pref("gfx.color_management.mode", 0);
michael@0:
michael@0: // don't allow JS to move and resize existing windows
michael@0: pref("dom.disable_window_move_resize", true);
michael@0:
michael@0: // prevent click image resizing for nsImageDocument
michael@0: pref("browser.enable_click_image_resizing", false);
michael@0:
michael@0: // controls which bits of private data to clear. by default we clear them all.
michael@0: pref("privacy.item.cache", true);
michael@0: pref("privacy.item.cookies", true);
michael@0: pref("privacy.item.offlineApps", true);
michael@0: pref("privacy.item.history", true);
michael@0: pref("privacy.item.formdata", true);
michael@0: pref("privacy.item.downloads", true);
michael@0: pref("privacy.item.passwords", true);
michael@0: pref("privacy.item.sessions", true);
michael@0: pref("privacy.item.geolocation", true);
michael@0: pref("privacy.item.siteSettings", true);
michael@0: pref("privacy.item.syncAccount", true);
michael@0:
michael@0: // base url for the wifi geolocation network provider
michael@0: pref("geo.provider.use_mls", false);
michael@0: pref("geo.cell.scan", true);
michael@0: pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
michael@0:
michael@0: // enable geo
michael@0: pref("geo.enabled", true);
michael@0:
michael@0: // content sink control -- controls responsiveness during page load
michael@0: // see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
michael@0: pref("content.sink.enable_perf_mode", 2); // 0 - switch, 1 - interactive, 2 - perf
michael@0: pref("content.sink.pending_event_mode", 0);
michael@0: pref("content.sink.perf_deflect_count", 1000000);
michael@0: pref("content.sink.perf_parse_time", 50000000);
michael@0:
michael@0: // Maximum scripts runtime before showing an alert
michael@0: // Disable the watchdog thread for B2G. See bug 870043 comment 31.
michael@0: pref("dom.use_watchdog", false);
michael@0:
michael@0: // The slow script dialog can be triggered from inside the JS engine as well,
michael@0: // ensure that those calls don't accidentally trigger the dialog.
michael@0: pref("dom.max_script_run_time", 0);
michael@0: pref("dom.max_chrome_script_run_time", 0);
michael@0:
michael@0: // plugins
michael@0: pref("plugin.disable", true);
michael@0: pref("dom.ipc.plugins.enabled", true);
michael@0:
michael@0: // product URLs
michael@0: // The breakpad report server to link to in about:crashes
michael@0: pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");
michael@0: pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/");
michael@0: pref("app.support.baseURL", "http://support.mozilla.com/b2g");
michael@0: pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html");
michael@0: pref("app.creditsURL", "http://www.mozilla.org/credits/");
michael@0: pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/b2g/features/");
michael@0: pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/b2g/faq/");
michael@0:
michael@0: // Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
michael@0: pref("security.alternate_certificate_error_page", "certerror");
michael@0:
michael@0: pref("security.warn_viewing_mixed", false); // Warning is disabled. See Bug 616712.
michael@0:
michael@0: // Override some named colors to avoid inverse OS themes
michael@0: pref("ui.-moz-dialog", "#efebe7");
michael@0: pref("ui.-moz-dialogtext", "#101010");
michael@0: pref("ui.-moz-field", "#fff");
michael@0: pref("ui.-moz-fieldtext", "#1a1a1a");
michael@0: pref("ui.-moz-buttonhoverface", "#f3f0ed");
michael@0: pref("ui.-moz-buttonhovertext", "#101010");
michael@0: pref("ui.-moz-combobox", "#fff");
michael@0: pref("ui.-moz-comboboxtext", "#101010");
michael@0: pref("ui.buttonface", "#ece7e2");
michael@0: pref("ui.buttonhighlight", "#fff");
michael@0: pref("ui.buttonshadow", "#aea194");
michael@0: pref("ui.buttontext", "#101010");
michael@0: pref("ui.captiontext", "#101010");
michael@0: pref("ui.graytext", "#b1a598");
michael@0: pref("ui.highlighttext", "#1a1a1a");
michael@0: pref("ui.threeddarkshadow", "#000");
michael@0: pref("ui.threedface", "#ece7e2");
michael@0: pref("ui.threedhighlight", "#fff");
michael@0: pref("ui.threedlightshadow", "#ece7e2");
michael@0: pref("ui.threedshadow", "#aea194");
michael@0: pref("ui.windowframe", "#efebe7");
michael@0:
michael@0: // Themable via mozSettings
michael@0: pref("ui.menu", "#f97c17");
michael@0: pref("ui.menutext", "#ffffff");
michael@0: pref("ui.infobackground", "#343e40");
michael@0: pref("ui.infotext", "#686868");
michael@0: pref("ui.window", "#ffffff");
michael@0: pref("ui.windowtext", "#000000");
michael@0: pref("ui.highlight", "#b2f2ff");
michael@0:
michael@0: // replace newlines with spaces on paste into single-line text boxes
michael@0: pref("editor.singleLine.pasteNewlines", 2);
michael@0:
michael@0: // threshold where a tap becomes a drag, in 1/240" reference pixels
michael@0: // The names of the preferences are to be in sync with EventStateManager.cpp
michael@0: pref("ui.dragThresholdX", 25);
michael@0: pref("ui.dragThresholdY", 25);
michael@0:
michael@0: // Layers Acceleration. We can only have nice things on gonk, because
michael@0: // they're not maintained anywhere else.
michael@0: pref("layers.offmainthreadcomposition.enabled", true);
michael@0: #ifndef MOZ_WIDGET_GONK
michael@0: pref("dom.ipc.tabs.disabled", true);
michael@0: pref("layers.offmainthreadcomposition.async-animations", false);
michael@0: pref("layers.async-video.enabled", false);
michael@0: #else
michael@0: pref("dom.ipc.tabs.disabled", false);
michael@0: pref("layers.acceleration.disabled", false);
michael@0: pref("layers.offmainthreadcomposition.async-animations", true);
michael@0: pref("layers.async-video.enabled", true);
michael@0: pref("layers.async-pan-zoom.enabled", true);
michael@0: pref("gfx.content.azure.backends", "cairo");
michael@0: #endif
michael@0:
michael@0: // Web Notifications
michael@0: pref("notification.feature.enabled", true);
michael@0:
michael@0: // IndexedDB
michael@0: pref("dom.indexedDB.warningQuota", 5);
michael@0:
michael@0: // prevent video elements from preloading too much data
michael@0: pref("media.preload.default", 1); // default to preload none
michael@0: pref("media.preload.auto", 2); // preload metadata if preload=auto
michael@0: pref("media.cache_size", 4096); // 4MB media cache
michael@0:
michael@0: // The default number of decoded video frames that are enqueued in
michael@0: // MediaDecoderReader's mVideoQueue.
michael@0: pref("media.video-queue.default-size", 3);
michael@0:
michael@0: // optimize images' memory usage
michael@0: pref("image.mem.decodeondraw", true);
michael@0: pref("image.mem.allow_locking_in_content_processes", false); /* don't allow image locking */
michael@0: pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */
michael@0: pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */
michael@0: // 65MB seems reasonable and layout/reftests/bugs/370629-1.html requires more than 62MB
michael@0: pref("image.mem.hard_limit_decoded_image_kb", 66560);
michael@0: pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */
michael@0:
michael@0: // XXX this isn't a good check for "are touch events supported", but
michael@0: // we don't really have a better one at the moment.
michael@0: // enable touch events interfaces
michael@0: pref("dom.w3c_touch_events.enabled", 1);
michael@0: pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240"
michael@0: pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
michael@0:
michael@0: #ifdef MOZ_SAFE_BROWSING
michael@0: // Safe browsing does nothing unless this pref is set
michael@0: pref("browser.safebrowsing.enabled", true);
michael@0:
michael@0: // Prevent loading of pages identified as malware
michael@0: pref("browser.safebrowsing.malware.enabled", true);
michael@0:
michael@0: // Non-enhanced mode (local url lists) URL list to check for updates
michael@0: pref("browser.safebrowsing.provider.0.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client={moz:client}&appver={moz:version}&pver=2.2&key=%GOOGLE_API_KEY%");
michael@0:
michael@0: pref("browser.safebrowsing.dataProvider", 0);
michael@0:
michael@0: // Does the provider name need to be localizable?
michael@0: pref("browser.safebrowsing.provider.0.name", "Google");
michael@0: pref("browser.safebrowsing.provider.0.reportURL", "https://safebrowsing.google.com/safebrowsing/report?");
michael@0: pref("browser.safebrowsing.provider.0.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2");
michael@0:
michael@0: // HTML report pages
michael@0: pref("browser.safebrowsing.provider.0.reportGenericURL", "http://{moz:locale}.phish-generic.mozilla.com/?hl={moz:locale}");
michael@0: pref("browser.safebrowsing.provider.0.reportErrorURL", "http://{moz:locale}.phish-error.mozilla.com/?hl={moz:locale}");
michael@0: pref("browser.safebrowsing.provider.0.reportPhishURL", "http://{moz:locale}.phish-report.mozilla.com/?hl={moz:locale}");
michael@0: pref("browser.safebrowsing.provider.0.reportMalwareURL", "http://{moz:locale}.malware-report.mozilla.com/?hl={moz:locale}");
michael@0: pref("browser.safebrowsing.provider.0.reportMalwareErrorURL", "http://{moz:locale}.malware-error.mozilla.com/?hl={moz:locale}");
michael@0:
michael@0: // FAQ URLs
michael@0:
michael@0: // Name of the about: page contributed by safebrowsing to handle display of error
michael@0: // pages on phishing/malware hits. (bug 399233)
michael@0: pref("urlclassifier.alternate_error_page", "blocked");
michael@0:
michael@0: // The number of random entries to send with a gethash request.
michael@0: pref("urlclassifier.gethashnoise", 4);
michael@0:
michael@0: // If an urlclassifier table has not been updated in this number of seconds,
michael@0: // a gethash request will be forced to check that the result is still in
michael@0: // the database.
michael@0: pref("urlclassifier.max-complete-age", 2700);
michael@0:
michael@0: // URL for checking the reason for a malware warning.
michael@0: pref("browser.safebrowsing.malware.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
michael@0: #endif
michael@0:
michael@0: // True if this is the first time we are showing about:firstrun
michael@0: pref("browser.firstrun.show.uidiscovery", true);
michael@0: pref("browser.firstrun.show.localepicker", true);
michael@0:
michael@0: // initiated by a user
michael@0: pref("content.ime.strict_policy", true);
michael@0:
michael@0: // True if you always want dump() to work
michael@0: //
michael@0: // On Android, you also need to do the following for the output
michael@0: // to show up in logcat:
michael@0: //
michael@0: // $ adb shell stop
michael@0: // $ adb shell setprop log.redirect-stdio true
michael@0: // $ adb shell start
michael@0: pref("browser.dom.window.dump.enabled", false);
michael@0:
michael@0: // Default Content Security Policy to apply to privileged and certified apps
michael@0: pref("security.apps.privileged.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'");
michael@0: // If you change this CSP, make sure to update the fast path in nsCSPService.cpp
michael@0: pref("security.apps.certified.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self'");
michael@0:
michael@0: // Temporarily force-enable GL compositing. This is default-disabled
michael@0: // deep within the bowels of the widgetry system. Remove me when GL
michael@0: // compositing isn't default disabled in widget/android.
michael@0: pref("layers.acceleration.force-enabled", true);
michael@0:
michael@0: // handle links targeting new windows
michael@0: // 1=current window/tab, 2=new window, 3=new tab in most recent window
michael@0: pref("browser.link.open_newwindow", 3);
michael@0:
michael@0: // 0: no restrictions - divert everything
michael@0: // 1: don't divert window.open at all
michael@0: // 2: don't divert window.open with features
michael@0: pref("browser.link.open_newwindow.restriction", 0);
michael@0:
michael@0: // Enable browser frames (including OOP, except on Windows, where it doesn't
michael@0: // work), but make in-process browser frames the default.
michael@0: pref("dom.mozBrowserFramesEnabled", true);
michael@0:
michael@0: // Enable a (virtually) unlimited number of mozbrowser processes.
michael@0: // We'll run out of PIDs on UNIX-y systems before we hit this limit.
michael@0: pref("dom.ipc.processCount", 100000);
michael@0:
michael@0: pref("dom.ipc.browser_frames.oop_by_default", false);
michael@0: pref("dom.browser_frames.useAsyncPanZoom", true);
michael@0:
michael@0: // SMS/MMS
michael@0: pref("dom.sms.enabled", true);
michael@0:
michael@0: //The waiting time in network manager.
michael@0: pref("network.gonk.ms-release-mms-connection", 30000);
michael@0:
michael@0: // WebContacts
michael@0: pref("dom.mozContacts.enabled", true);
michael@0: pref("dom.navigator-property.disable.mozContacts", false);
michael@0: pref("dom.global-constructor.disable.mozContact", false);
michael@0:
michael@0: // Shortnumber matching needed for e.g. Brazil:
michael@0: // 03187654321 can be found with 87654321
michael@0: pref("dom.phonenumber.substringmatching.BR", 8);
michael@0: pref("dom.phonenumber.substringmatching.CO", 10);
michael@0: pref("dom.phonenumber.substringmatching.VE", 7);
michael@0: pref("dom.phonenumber.substringmatching.CL", 8);
michael@0: pref("dom.phonenumber.substringmatching.PE", 7);
michael@0:
michael@0: // WebAlarms
michael@0: pref("dom.mozAlarms.enabled", true);
michael@0:
michael@0: // SimplePush
michael@0: pref("services.push.enabled", true);
michael@0: // Debugging enabled.
michael@0: pref("services.push.debug", false);
michael@0: // Is the network connection allowed to be up?
michael@0: // This preference should be used in UX to enable/disable push.
michael@0: pref("services.push.connection.enabled", true);
michael@0: // serverURL to be assigned by services team
michael@0: pref("services.push.serverURL", "wss://push.services.mozilla.com/");
michael@0: pref("services.push.userAgentID", "");
michael@0: // Exponential back-off start is 5 seconds like in HTTP/1.1.
michael@0: // Maximum back-off is pingInterval.
michael@0: pref("services.push.retryBaseInterval", 5000);
michael@0: // Interval at which to ping PushServer to check connection status. In
michael@0: // milliseconds. If no reply is received within requestTimeout, the connection
michael@0: // is considered closed.
michael@0: pref("services.push.pingInterval", 1800000); // 30 minutes
michael@0: // How long before a DOMRequest errors as timeout
michael@0: pref("services.push.requestTimeout", 10000);
michael@0: // enable udp wakeup support
michael@0: pref("services.push.udp.wakeupEnabled", true);
michael@0:
michael@0: // NetworkStats
michael@0: #ifdef MOZ_WIDGET_GONK
michael@0: pref("dom.mozNetworkStats.enabled", true);
michael@0: pref("dom.webapps.firstRunWithSIM", true);
michael@0: #endif
michael@0:
michael@0: #ifdef MOZ_B2G_RIL
michael@0: // SingleVariant
michael@0: pref("dom.mozApps.single_variant_sourcedir", "/persist/svoperapps");
michael@0: #endif
michael@0:
michael@0: // WebSettings
michael@0: pref("dom.mozSettings.enabled", true);
michael@0: pref("dom.navigator-property.disable.mozSettings", false);
michael@0: pref("dom.mozPermissionSettings.enabled", true);
michael@0:
michael@0: // controls if we want camera support
michael@0: pref("device.camera.enabled", true);
michael@0: pref("media.realtime_decoder.enabled", true);
michael@0:
michael@0: // TCPSocket
michael@0: pref("dom.mozTCPSocket.enabled", true);
michael@0:
michael@0: // WebPayment
michael@0: pref("dom.mozPay.enabled", true);
michael@0:
michael@0: // "Preview" landing of bug 710563, which is bogged down in analysis
michael@0: // of talos regression. This is a needed change for higher-framerate
michael@0: // CSS animations, and incidentally works around an apparent bug in
michael@0: // our handling of requestAnimationFrame() listeners, which are
michael@0: // supposed to enable this REPEATING_PRECISE_CAN_SKIP behavior. The
michael@0: // secondary bug isn't really worth investigating since it's obseleted
michael@0: // by bug 710563.
michael@0: pref("layout.frame_rate.precise", true);
michael@0:
michael@0: // Handle hardware buttons in the b2g chrome package
michael@0: pref("b2g.keys.menu.enabled", true);
michael@0:
michael@0: // Screen timeout in seconds
michael@0: pref("power.screen.timeout", 60);
michael@0:
michael@0: pref("full-screen-api.enabled", true);
michael@0:
michael@0: #ifndef MOZ_WIDGET_GONK
michael@0: // If we're not actually on physical hardware, don't make the top level widget
michael@0: // fullscreen when transitioning to fullscreen. This means in emulated
michael@0: // environments (like the b2g desktop client) we won't make the client window
michael@0: // fill the whole screen, we'll just make the content fill the client window,
michael@0: // i.e. it won't give the impression to content that the number of device
michael@0: // screen pixels changes!
michael@0: pref("full-screen-api.ignore-widgets", true);
michael@0: #endif
michael@0:
michael@0: pref("media.volume.steps", 10);
michael@0:
michael@0: #ifdef ENABLE_MARIONETTE
michael@0: //Enable/disable marionette server, set listening port
michael@0: pref("marionette.defaultPrefs.enabled", true);
michael@0: pref("marionette.defaultPrefs.port", 2828);
michael@0: #ifndef MOZ_WIDGET_GONK
michael@0: // On desktop builds, we need to force the socket to listen on localhost only
michael@0: pref("marionette.force-local", true);
michael@0: #endif
michael@0: #endif
michael@0:
michael@0: #ifdef MOZ_UPDATER
michael@0: // When we're applying updates, we can't let anything hang us on
michael@0: // quit+restart. The user has no recourse.
michael@0: pref("shutdown.watchdog.timeoutSecs", 5);
michael@0: // Timeout before the update prompt automatically installs the update
michael@0: pref("b2g.update.apply-prompt-timeout", 60000); // milliseconds
michael@0: // Amount of time to wait after the user is idle before prompting to apply an update
michael@0: pref("b2g.update.apply-idle-timeout", 600000); // milliseconds
michael@0: // Amount of time after which connection will be restarted if no progress
michael@0: pref("b2g.update.download-watchdog-timeout", 120000); // milliseconds
michael@0: pref("b2g.update.download-watchdog-max-retries", 5);
michael@0:
michael@0: pref("app.update.enabled", true);
michael@0: pref("app.update.auto", false);
michael@0: pref("app.update.silent", false);
michael@0: pref("app.update.mode", 0);
michael@0: pref("app.update.incompatible.mode", 0);
michael@0: pref("app.update.staging.enabled", true);
michael@0: pref("app.update.service.enabled", true);
michael@0:
michael@0: // The URL hosting the update manifest.
michael@0: pref("app.update.url", "http://update.boot2gecko.org/%CHANNEL%/update.xml");
michael@0: pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
michael@0:
michael@0: // Interval at which update manifest is fetched. In units of seconds.
michael@0: pref("app.update.interval", 86400); // 1 day
michael@0: // Don't throttle background updates.
michael@0: pref("app.update.download.backgroundInterval", 0);
michael@0:
michael@0: // Retry update socket connections every 30 seconds in the cases of certain kinds of errors
michael@0: pref("app.update.socket.retryTimeout", 30000);
michael@0:
michael@0: // Max of 20 consecutive retries (total 10 minutes) before giving up and marking
michael@0: // the update download as failed.
michael@0: // Note: Offline errors will always retry when the network comes online.
michael@0: pref("app.update.socket.maxErrors", 20);
michael@0:
michael@0: // Enable update logging for now, to diagnose growing pains in the
michael@0: // field.
michael@0: pref("app.update.log", true);
michael@0: #else
michael@0: // Explicitly disable the shutdown watchdog. It's enabled by default.
michael@0: // When the updater is disabled, we want to know about shutdown hangs.
michael@0: pref("shutdown.watchdog.timeoutSecs", -1);
michael@0: #endif
michael@0:
michael@0: // Check daily for apps updates.
michael@0: pref("webapps.update.interval", 86400);
michael@0:
michael@0: // Extensions preferences
michael@0: pref("extensions.update.enabled", false);
michael@0: pref("extensions.getAddons.cache.enabled", false);
michael@0:
michael@0: // Context Menu
michael@0: pref("ui.click_hold_context_menus", true);
michael@0: pref("ui.click_hold_context_menus.delay", 750);
michael@0:
michael@0: // Enable device storage
michael@0: pref("device.storage.enabled", true);
michael@0:
michael@0: // Enable pre-installed applications
michael@0: pref("dom.webapps.useCurrentProfile", true);
michael@0:
michael@0: // Enable system message
michael@0: pref("dom.sysmsg.enabled", true);
michael@0: pref("media.plugins.enabled", false);
michael@0: pref("media.omx.enabled", true);
michael@0: pref("media.rtsp.enabled", true);
michael@0: pref("media.rtsp.video.enabled", true);
michael@0:
michael@0: // Disable printing (particularly, window.print())
michael@0: pref("dom.disable_window_print", true);
michael@0:
michael@0: // Disable window.showModalDialog
michael@0: pref("dom.disable_window_showModalDialog", true);
michael@0:
michael@0: // Enable new experimental html forms
michael@0: pref("dom.experimental_forms", true);
michael@0: pref("dom.forms.number", true);
michael@0:
michael@0: // Don't enable yet as we don't have a color picker
michael@0: // implemented for b2g (bug 875751)
michael@0: pref("dom.forms.color", false);
michael@0:
michael@0: // Turns on gralloc-based direct texturing for Gonk
michael@0: pref("gfx.gralloc.enabled", false);
michael@0:
michael@0: // This preference instructs the JS engine to discard the
michael@0: // source of any privileged JS after compilation. This saves
michael@0: // memory, but makes things like Function.prototype.toSource()
michael@0: // fail.
michael@0: pref("javascript.options.discardSystemSource", true);
michael@0:
michael@0: // XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging
michael@0: pref("javascript.options.mem.log", false);
michael@0:
michael@0: // Increase mark slice time from 10ms to 30ms
michael@0: pref("javascript.options.mem.gc_incremental_slice_ms", 30);
michael@0:
michael@0: // Increase time to get more high frequency GC on benchmarks from 1000ms to 1500ms
michael@0: pref("javascript.options.mem.gc_high_frequency_time_limit_ms", 1500);
michael@0:
michael@0: pref("javascript.options.mem.gc_high_frequency_heap_growth_max", 300);
michael@0: pref("javascript.options.mem.gc_high_frequency_heap_growth_min", 120);
michael@0: pref("javascript.options.mem.gc_high_frequency_high_limit_mb", 40);
michael@0: pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 0);
michael@0: pref("javascript.options.mem.gc_low_frequency_heap_growth", 120);
michael@0: pref("javascript.options.mem.high_water_mark", 6);
michael@0: pref("javascript.options.mem.gc_allocation_threshold_mb", 1);
michael@0: pref("javascript.options.mem.gc_decommit_threshold_mb", 1);
michael@0:
michael@0: // Show/Hide scrollbars when active/inactive
michael@0: pref("ui.showHideScrollbars", 1);
michael@0: pref("ui.useOverlayScrollbars", 1);
michael@0:
michael@0: // Enable the ProcessPriorityManager, and give processes with no visible
michael@0: // documents a 1s grace period before they're eligible to be marked as
michael@0: // background. Background processes that are perceivable due to playing
michael@0: // media are given a longer grace period to accomodate changing tracks, etc.
michael@0: pref("dom.ipc.processPriorityManager.enabled", true);
michael@0: pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
michael@0: pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000);
michael@0: pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000);
michael@0:
michael@0: // Number of different background levels for background processes. We use
michael@0: // these different levels to force the low-memory killer to kill processes in
michael@0: // a LRU order.
michael@0: pref("dom.ipc.processPriorityManager.backgroundLRUPoolLevels", 5);
michael@0:
michael@0: // Kernel parameters for process priorities. These affect how processes are
michael@0: // killed on low-memory and their relative CPU priorities.
michael@0: //
michael@0: // Note: The maximum nice value on Linux is 19, but the max value you should
michael@0: // use here is 18. NSPR adds 1 to some threads' nice values, to mark
michael@0: // low-priority threads. If the process priority manager were to renice a
michael@0: // process (and all its threads) to 19, all threads would have the same
michael@0: // niceness. Then when we reniced the process to (say) 10, all threads would
michael@0: // /still/ have the same niceness; we'd effectively have erased NSPR's thread
michael@0: // priorities.
michael@0:
michael@0: // The kernel can only accept 6 (OomScoreAdjust, KillUnderKB) pairs. But it is
michael@0: // okay, kernel will still kill processes with larger OomScoreAdjust first even
michael@0: // its OomScoreAdjust don't have a corresponding KillUnderKB.
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.MASTER.OomScoreAdjust", 0);
michael@0: pref("hal.processPriorityManager.gonk.MASTER.KillUnderKB", 4096);
michael@0: pref("hal.processPriorityManager.gonk.MASTER.Nice", 0);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.PREALLOC.OomScoreAdjust", 67);
michael@0: pref("hal.processPriorityManager.gonk.PREALLOC.Nice", 18);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.OomScoreAdjust", 67);
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.KillUnderKB", 5120);
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.Nice", 0);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND.OomScoreAdjust", 134);
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND.KillUnderKB", 6144);
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND.Nice", 1);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.OomScoreAdjust", 200);
michael@0: pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.Nice", 1);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.OomScoreAdjust", 400);
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.KillUnderKB", 7168);
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.Nice", 7);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.OomScoreAdjust", 534);
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.KillUnderKB", 8192);
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.Nice", 18);
michael@0:
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND.OomScoreAdjust", 667);
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderKB", 20480);
michael@0: pref("hal.processPriorityManager.gonk.BACKGROUND.Nice", 18);
michael@0:
michael@0: // Processes get this niceness when they have low CPU priority.
michael@0: pref("hal.processPriorityManager.gonk.LowCPUNice", 18);
michael@0:
michael@0: // Fire a memory pressure event when the system has less than Xmb of memory
michael@0: // remaining. You should probably set this just above Y.KillUnderKB for
michael@0: // the highest priority class Y that you want to make an effort to keep alive.
michael@0: // (For example, we want BACKGROUND_PERCEIVABLE to stay alive.) If you set
michael@0: // this too high, then we'll send out a memory pressure event every Z seconds
michael@0: // (see below), even while we have processes that we would happily kill in
michael@0: // order to free up memory.
michael@0: pref("hal.processPriorityManager.gonk.notifyLowMemUnderKB", 14336);
michael@0:
michael@0: // We wait this long before polling the memory-pressure fd after seeing one
michael@0: // memory pressure event. (When we're not under memory pressure, we sit
michael@0: // blocked on a poll(), and this pref has no effect.)
michael@0: pref("gonk.systemMemoryPressureRecoveryPollMS", 5000);
michael@0:
michael@0: #ifndef DEBUG
michael@0: // Enable pre-launching content processes for improved startup time
michael@0: // (hiding latency).
michael@0: pref("dom.ipc.processPrelaunch.enabled", true);
michael@0: // Wait this long before pre-launching a new subprocess.
michael@0: pref("dom.ipc.processPrelaunch.delayMs", 5000);
michael@0: #endif
michael@0:
michael@0: pref("dom.ipc.reuse_parent_app", false);
michael@0:
michael@0: // When a process receives a system message, we hold a CPU wake lock on its
michael@0: // behalf for this many seconds, or until it handles the system message,
michael@0: // whichever comes first.
michael@0: pref("dom.ipc.systemMessageCPULockTimeoutSec", 30);
michael@0:
michael@0: // Ignore the "dialog=1" feature in window.open.
michael@0: pref("dom.disable_window_open_dialog_feature", true);
michael@0:
michael@0: // Screen reader support
michael@0: pref("accessibility.accessfu.activate", 2);
michael@0: pref("accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement,Landmark,ListItem");
michael@0: // Setting for an utterance order (0 - description first, 1 - description last).
michael@0: pref("accessibility.accessfu.utterance", 1);
michael@0: // Whether to skip images with empty alt text
michael@0: pref("accessibility.accessfu.skip_empty_images", true);
michael@0:
michael@0: // Enable hit-target fluffing
michael@0: pref("ui.touch.radius.enabled", true);
michael@0: pref("ui.touch.radius.leftmm", 3);
michael@0: pref("ui.touch.radius.topmm", 5);
michael@0: pref("ui.touch.radius.rightmm", 3);
michael@0: pref("ui.touch.radius.bottommm", 2);
michael@0:
michael@0: pref("ui.mouse.radius.enabled", true);
michael@0: pref("ui.mouse.radius.leftmm", 3);
michael@0: pref("ui.mouse.radius.topmm", 5);
michael@0: pref("ui.mouse.radius.rightmm", 3);
michael@0: pref("ui.mouse.radius.bottommm", 2);
michael@0:
michael@0: // Disable native prompt
michael@0: pref("browser.prompt.allowNative", false);
michael@0:
michael@0: // Minimum delay in milliseconds between network activity notifications (0 means
michael@0: // no notifications). The delay is the same for both download and upload, though
michael@0: // they are handled separately. This pref is only read once at startup:
michael@0: // a restart is required to enable a new value.
michael@0: pref("network.activity.blipIntervalMilliseconds", 250);
michael@0:
michael@0: // By default we want the NetworkManager service to manage Gecko's offline
michael@0: // status for us according to the state of Wifi/cellular data connections.
michael@0: // In some environments, such as the emulator or hardware with other network
michael@0: // connectivity, this is not desireable, however, in which case this pref
michael@0: // can be flipped to false.
michael@0: pref("network.gonk.manage-offline-status", true);
michael@0:
michael@0: pref("jsloader.reuseGlobal", true);
michael@0:
michael@0: // Enable font inflation for browser tab content.
michael@0: pref("font.size.inflation.minTwips", 120);
michael@0: // And disable it for lingering master-process UI.
michael@0: pref("font.size.inflation.disabledInMasterProcess", true);
michael@0:
michael@0: // Enable freeing dirty pages when minimizing memory; this reduces memory
michael@0: // consumption when applications are sent to the background.
michael@0: pref("memory.free_dirty_pages", true);
michael@0:
michael@0: // Enable the Linux-specific, system-wide memory reporter.
michael@0: pref("memory.system_memory_reporter", true);
michael@0:
michael@0: // Don't dump memory reports on OOM, by default.
michael@0: pref("memory.dump_reports_on_oom", false);
michael@0:
michael@0: pref("layout.imagevisibility.enabled", true);
michael@0: pref("layout.imagevisibility.numscrollportwidths", 1);
michael@0: pref("layout.imagevisibility.numscrollportheights", 1);
michael@0:
michael@0: // Enable native identity (persona/browserid)
michael@0: pref("dom.identity.enabled", true);
michael@0:
michael@0: // Wait up to this much milliseconds when orientation changed
michael@0: pref("layers.orientation.sync.timeout", 1000);
michael@0:
michael@0: // Don't discard WebGL contexts for foreground apps on memory
michael@0: // pressure.
michael@0: pref("webgl.can-lose-context-in-foreground", false);
michael@0:
michael@0: // Allow nsMemoryInfoDumper to create a fifo in the temp directory. We use
michael@0: // this fifo to trigger about:memory dumps, among other things.
michael@0: pref("memory_info_dumper.watch_fifo.enabled", true);
michael@0: pref("memory_info_dumper.watch_fifo.directory", "/data/local");
michael@0:
michael@0: // See ua-update.json.in for the packaged UA override list
michael@0: pref("general.useragent.updates.enabled", true);
michael@0: pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%");
michael@0: pref("general.useragent.updates.interval", 604800); // 1 week
michael@0: pref("general.useragent.updates.retry", 86400); // 1 day
michael@0:
michael@0: // Make