Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #filter substitution |
michael@0 | 6 | |
michael@0 | 7 | pref("toolkit.defaultChromeURI", "chrome://b2g/content/shell.html"); |
michael@0 | 8 | pref("browser.chromeURL", "chrome://b2g/content/"); |
michael@0 | 9 | |
michael@0 | 10 | // Bug 945235: Prevent all bars to be considered visible: |
michael@0 | 11 | pref("toolkit.defaultChromeFeatures", "chrome,dialog=no,close,resizable,scrollbars,extrachrome"); |
michael@0 | 12 | |
michael@0 | 13 | // Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density. |
michael@0 | 14 | pref("browser.viewport.scaleRatio", -1); |
michael@0 | 15 | |
michael@0 | 16 | /* disable text selection */ |
michael@0 | 17 | pref("browser.ignoreNativeFrameTextSelection", true); |
michael@0 | 18 | |
michael@0 | 19 | /* cache prefs */ |
michael@0 | 20 | #ifdef MOZ_WIDGET_GONK |
michael@0 | 21 | pref("browser.cache.disk.enable", true); |
michael@0 | 22 | pref("browser.cache.disk.capacity", 55000); // kilobytes |
michael@0 | 23 | pref("browser.cache.disk.parent_directory", "/cache"); |
michael@0 | 24 | #endif |
michael@0 | 25 | pref("browser.cache.disk.smart_size.enabled", false); |
michael@0 | 26 | pref("browser.cache.disk.smart_size.first_run", false); |
michael@0 | 27 | |
michael@0 | 28 | pref("browser.cache.memory.enable", true); |
michael@0 | 29 | pref("browser.cache.memory.capacity", 1024); // kilobytes |
michael@0 | 30 | |
michael@0 | 31 | pref("browser.cache.memory_limit", 2048); // 2 MB |
michael@0 | 32 | |
michael@0 | 33 | /* image cache prefs */ |
michael@0 | 34 | pref("image.cache.size", 1048576); // bytes |
michael@0 | 35 | pref("image.high_quality_downscaling.enabled", false); |
michael@0 | 36 | pref("canvas.image.cache.limit", 10485760); // 10 MB |
michael@0 | 37 | |
michael@0 | 38 | /* offline cache prefs */ |
michael@0 | 39 | pref("browser.offline-apps.notify", false); |
michael@0 | 40 | pref("browser.cache.offline.enable", true); |
michael@0 | 41 | pref("offline-apps.allow_by_default", true); |
michael@0 | 42 | |
michael@0 | 43 | /* protocol warning prefs */ |
michael@0 | 44 | pref("network.protocol-handler.warn-external.tel", false); |
michael@0 | 45 | pref("network.protocol-handler.warn-external.mailto", false); |
michael@0 | 46 | pref("network.protocol-handler.warn-external.vnd.youtube", false); |
michael@0 | 47 | |
michael@0 | 48 | /* protocol expose prefs */ |
michael@0 | 49 | // By default, all protocol handlers are exposed. This means that the browser |
michael@0 | 50 | // will response to openURL commands for all URL types. It will also try to open |
michael@0 | 51 | // link clicks inside the browser before failing over to the system handlers. |
michael@0 | 52 | pref("network.protocol-handler.expose.rtsp", true); |
michael@0 | 53 | |
michael@0 | 54 | /* http prefs */ |
michael@0 | 55 | pref("network.http.pipelining", true); |
michael@0 | 56 | pref("network.http.pipelining.ssl", true); |
michael@0 | 57 | pref("network.http.proxy.pipelining", true); |
michael@0 | 58 | pref("network.http.pipelining.maxrequests" , 6); |
michael@0 | 59 | pref("network.http.keep-alive.timeout", 600); |
michael@0 | 60 | pref("network.http.max-connections", 20); |
michael@0 | 61 | pref("network.http.max-persistent-connections-per-server", 6); |
michael@0 | 62 | pref("network.http.max-persistent-connections-per-proxy", 20); |
michael@0 | 63 | |
michael@0 | 64 | // spdy |
michael@0 | 65 | pref("network.http.spdy.push-allowance", 32768); |
michael@0 | 66 | |
michael@0 | 67 | // See bug 545869 for details on why these are set the way they are |
michael@0 | 68 | pref("network.buffer.cache.count", 24); |
michael@0 | 69 | pref("network.buffer.cache.size", 16384); |
michael@0 | 70 | |
michael@0 | 71 | // predictive actions |
michael@0 | 72 | pref("network.seer.enable", false); // disabled on b2g |
michael@0 | 73 | pref("network.seer.max-db-size", 2097152); // bytes |
michael@0 | 74 | pref("network.seer.preserve", 50); // percentage of seer data to keep when cleaning up |
michael@0 | 75 | |
michael@0 | 76 | /* session history */ |
michael@0 | 77 | pref("browser.sessionhistory.max_total_viewers", 1); |
michael@0 | 78 | pref("browser.sessionhistory.max_entries", 50); |
michael@0 | 79 | |
michael@0 | 80 | /* session store */ |
michael@0 | 81 | pref("browser.sessionstore.resume_session_once", false); |
michael@0 | 82 | pref("browser.sessionstore.resume_from_crash", true); |
michael@0 | 83 | pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes |
michael@0 | 84 | pref("browser.sessionstore.interval", 10000); // milliseconds |
michael@0 | 85 | pref("browser.sessionstore.max_tabs_undo", 1); |
michael@0 | 86 | |
michael@0 | 87 | /* these should help performance */ |
michael@0 | 88 | pref("mozilla.widget.force-24bpp", true); |
michael@0 | 89 | pref("mozilla.widget.use-buffer-pixmap", true); |
michael@0 | 90 | pref("mozilla.widget.disable-native-theme", true); |
michael@0 | 91 | pref("layout.reflow.synthMouseMove", false); |
michael@0 | 92 | pref("layers.enable-tiles", true); |
michael@0 | 93 | /* |
michael@0 | 94 | Cross Process Mutex is not supported on Mac OS X so progressive |
michael@0 | 95 | paint can not be enabled for B2G on Mac OS X desktop |
michael@0 | 96 | */ |
michael@0 | 97 | #ifdef MOZ_WIDGET_COCOA |
michael@0 | 98 | pref("layers.progressive-paint", false); |
michael@0 | 99 | #else |
michael@0 | 100 | pref("layers.progressive-paint", false); |
michael@0 | 101 | #endif |
michael@0 | 102 | |
michael@0 | 103 | /* download manager (don't show the window or alert) */ |
michael@0 | 104 | pref("browser.download.useDownloadDir", true); |
michael@0 | 105 | pref("browser.download.folderList", 1); // Default to ~/Downloads |
michael@0 | 106 | pref("browser.download.manager.showAlertOnComplete", false); |
michael@0 | 107 | pref("browser.download.manager.showAlertInterval", 2000); |
michael@0 | 108 | pref("browser.download.manager.retention", 2); |
michael@0 | 109 | pref("browser.download.manager.showWhenStarting", false); |
michael@0 | 110 | pref("browser.download.manager.closeWhenDone", true); |
michael@0 | 111 | pref("browser.download.manager.openDelay", 0); |
michael@0 | 112 | pref("browser.download.manager.focusWhenStarting", false); |
michael@0 | 113 | pref("browser.download.manager.flashCount", 2); |
michael@0 | 114 | pref("browser.download.manager.displayedHistoryDays", 7); |
michael@0 | 115 | |
michael@0 | 116 | /* download helper */ |
michael@0 | 117 | pref("browser.helperApps.deleteTempFileOnExit", false); |
michael@0 | 118 | |
michael@0 | 119 | /* password manager */ |
michael@0 | 120 | pref("signon.rememberSignons", true); |
michael@0 | 121 | pref("signon.expireMasterPassword", false); |
michael@0 | 122 | |
michael@0 | 123 | /* autocomplete */ |
michael@0 | 124 | pref("browser.formfill.enable", true); |
michael@0 | 125 | |
michael@0 | 126 | /* spellcheck */ |
michael@0 | 127 | pref("layout.spellcheckDefault", 0); |
michael@0 | 128 | |
michael@0 | 129 | /* block popups by default, and notify the user about blocked popups */ |
michael@0 | 130 | pref("dom.disable_open_during_load", true); |
michael@0 | 131 | pref("privacy.popups.showBrowserMessage", true); |
michael@0 | 132 | |
michael@0 | 133 | pref("keyword.enabled", true); |
michael@0 | 134 | |
michael@0 | 135 | pref("accessibility.typeaheadfind", false); |
michael@0 | 136 | pref("accessibility.typeaheadfind.timeout", 5000); |
michael@0 | 137 | pref("accessibility.typeaheadfind.flashBar", 1); |
michael@0 | 138 | pref("accessibility.typeaheadfind.linksonly", false); |
michael@0 | 139 | pref("accessibility.typeaheadfind.casesensitive", 0); |
michael@0 | 140 | |
michael@0 | 141 | // SSL error page behaviour |
michael@0 | 142 | pref("browser.ssl_override_behavior", 2); |
michael@0 | 143 | pref("browser.xul.error_pages.expert_bad_cert", false); |
michael@0 | 144 | |
michael@0 | 145 | // disable logging for the search service by default |
michael@0 | 146 | pref("browser.search.log", false); |
michael@0 | 147 | |
michael@0 | 148 | // disable updating |
michael@0 | 149 | pref("browser.search.update", false); |
michael@0 | 150 | pref("browser.search.update.log", false); |
michael@0 | 151 | pref("browser.search.updateinterval", 6); |
michael@0 | 152 | |
michael@0 | 153 | // enable search suggestions by default |
michael@0 | 154 | pref("browser.search.suggest.enabled", true); |
michael@0 | 155 | |
michael@0 | 156 | // tell the search service that we don't really expose the "current engine" |
michael@0 | 157 | pref("browser.search.noCurrentEngine", true); |
michael@0 | 158 | |
michael@0 | 159 | // Enable sparse localization by setting a few package locale overrides |
michael@0 | 160 | pref("chrome.override_package.global", "b2g-l10n"); |
michael@0 | 161 | pref("chrome.override_package.mozapps", "b2g-l10n"); |
michael@0 | 162 | pref("chrome.override_package.passwordmgr", "b2g-l10n"); |
michael@0 | 163 | |
michael@0 | 164 | // enable xul error pages |
michael@0 | 165 | pref("browser.xul.error_pages.enabled", true); |
michael@0 | 166 | |
michael@0 | 167 | // disable color management |
michael@0 | 168 | pref("gfx.color_management.mode", 0); |
michael@0 | 169 | |
michael@0 | 170 | // don't allow JS to move and resize existing windows |
michael@0 | 171 | pref("dom.disable_window_move_resize", true); |
michael@0 | 172 | |
michael@0 | 173 | // prevent click image resizing for nsImageDocument |
michael@0 | 174 | pref("browser.enable_click_image_resizing", false); |
michael@0 | 175 | |
michael@0 | 176 | // controls which bits of private data to clear. by default we clear them all. |
michael@0 | 177 | pref("privacy.item.cache", true); |
michael@0 | 178 | pref("privacy.item.cookies", true); |
michael@0 | 179 | pref("privacy.item.offlineApps", true); |
michael@0 | 180 | pref("privacy.item.history", true); |
michael@0 | 181 | pref("privacy.item.formdata", true); |
michael@0 | 182 | pref("privacy.item.downloads", true); |
michael@0 | 183 | pref("privacy.item.passwords", true); |
michael@0 | 184 | pref("privacy.item.sessions", true); |
michael@0 | 185 | pref("privacy.item.geolocation", true); |
michael@0 | 186 | pref("privacy.item.siteSettings", true); |
michael@0 | 187 | pref("privacy.item.syncAccount", true); |
michael@0 | 188 | |
michael@0 | 189 | // base url for the wifi geolocation network provider |
michael@0 | 190 | pref("geo.provider.use_mls", false); |
michael@0 | 191 | pref("geo.cell.scan", true); |
michael@0 | 192 | pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); |
michael@0 | 193 | |
michael@0 | 194 | // enable geo |
michael@0 | 195 | pref("geo.enabled", true); |
michael@0 | 196 | |
michael@0 | 197 | // content sink control -- controls responsiveness during page load |
michael@0 | 198 | // see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9 |
michael@0 | 199 | pref("content.sink.enable_perf_mode", 2); // 0 - switch, 1 - interactive, 2 - perf |
michael@0 | 200 | pref("content.sink.pending_event_mode", 0); |
michael@0 | 201 | pref("content.sink.perf_deflect_count", 1000000); |
michael@0 | 202 | pref("content.sink.perf_parse_time", 50000000); |
michael@0 | 203 | |
michael@0 | 204 | // Maximum scripts runtime before showing an alert |
michael@0 | 205 | // Disable the watchdog thread for B2G. See bug 870043 comment 31. |
michael@0 | 206 | pref("dom.use_watchdog", false); |
michael@0 | 207 | |
michael@0 | 208 | // The slow script dialog can be triggered from inside the JS engine as well, |
michael@0 | 209 | // ensure that those calls don't accidentally trigger the dialog. |
michael@0 | 210 | pref("dom.max_script_run_time", 0); |
michael@0 | 211 | pref("dom.max_chrome_script_run_time", 0); |
michael@0 | 212 | |
michael@0 | 213 | // plugins |
michael@0 | 214 | pref("plugin.disable", true); |
michael@0 | 215 | pref("dom.ipc.plugins.enabled", true); |
michael@0 | 216 | |
michael@0 | 217 | // product URLs |
michael@0 | 218 | // The breakpad report server to link to in about:crashes |
michael@0 | 219 | pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/"); |
michael@0 | 220 | pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/"); |
michael@0 | 221 | pref("app.support.baseURL", "http://support.mozilla.com/b2g"); |
michael@0 | 222 | pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html"); |
michael@0 | 223 | pref("app.creditsURL", "http://www.mozilla.org/credits/"); |
michael@0 | 224 | pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/b2g/features/"); |
michael@0 | 225 | pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/b2g/faq/"); |
michael@0 | 226 | |
michael@0 | 227 | // Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror) |
michael@0 | 228 | pref("security.alternate_certificate_error_page", "certerror"); |
michael@0 | 229 | |
michael@0 | 230 | pref("security.warn_viewing_mixed", false); // Warning is disabled. See Bug 616712. |
michael@0 | 231 | |
michael@0 | 232 | // Override some named colors to avoid inverse OS themes |
michael@0 | 233 | pref("ui.-moz-dialog", "#efebe7"); |
michael@0 | 234 | pref("ui.-moz-dialogtext", "#101010"); |
michael@0 | 235 | pref("ui.-moz-field", "#fff"); |
michael@0 | 236 | pref("ui.-moz-fieldtext", "#1a1a1a"); |
michael@0 | 237 | pref("ui.-moz-buttonhoverface", "#f3f0ed"); |
michael@0 | 238 | pref("ui.-moz-buttonhovertext", "#101010"); |
michael@0 | 239 | pref("ui.-moz-combobox", "#fff"); |
michael@0 | 240 | pref("ui.-moz-comboboxtext", "#101010"); |
michael@0 | 241 | pref("ui.buttonface", "#ece7e2"); |
michael@0 | 242 | pref("ui.buttonhighlight", "#fff"); |
michael@0 | 243 | pref("ui.buttonshadow", "#aea194"); |
michael@0 | 244 | pref("ui.buttontext", "#101010"); |
michael@0 | 245 | pref("ui.captiontext", "#101010"); |
michael@0 | 246 | pref("ui.graytext", "#b1a598"); |
michael@0 | 247 | pref("ui.highlighttext", "#1a1a1a"); |
michael@0 | 248 | pref("ui.threeddarkshadow", "#000"); |
michael@0 | 249 | pref("ui.threedface", "#ece7e2"); |
michael@0 | 250 | pref("ui.threedhighlight", "#fff"); |
michael@0 | 251 | pref("ui.threedlightshadow", "#ece7e2"); |
michael@0 | 252 | pref("ui.threedshadow", "#aea194"); |
michael@0 | 253 | pref("ui.windowframe", "#efebe7"); |
michael@0 | 254 | |
michael@0 | 255 | // Themable via mozSettings |
michael@0 | 256 | pref("ui.menu", "#f97c17"); |
michael@0 | 257 | pref("ui.menutext", "#ffffff"); |
michael@0 | 258 | pref("ui.infobackground", "#343e40"); |
michael@0 | 259 | pref("ui.infotext", "#686868"); |
michael@0 | 260 | pref("ui.window", "#ffffff"); |
michael@0 | 261 | pref("ui.windowtext", "#000000"); |
michael@0 | 262 | pref("ui.highlight", "#b2f2ff"); |
michael@0 | 263 | |
michael@0 | 264 | // replace newlines with spaces on paste into single-line text boxes |
michael@0 | 265 | pref("editor.singleLine.pasteNewlines", 2); |
michael@0 | 266 | |
michael@0 | 267 | // threshold where a tap becomes a drag, in 1/240" reference pixels |
michael@0 | 268 | // The names of the preferences are to be in sync with EventStateManager.cpp |
michael@0 | 269 | pref("ui.dragThresholdX", 25); |
michael@0 | 270 | pref("ui.dragThresholdY", 25); |
michael@0 | 271 | |
michael@0 | 272 | // Layers Acceleration. We can only have nice things on gonk, because |
michael@0 | 273 | // they're not maintained anywhere else. |
michael@0 | 274 | pref("layers.offmainthreadcomposition.enabled", true); |
michael@0 | 275 | #ifndef MOZ_WIDGET_GONK |
michael@0 | 276 | pref("dom.ipc.tabs.disabled", true); |
michael@0 | 277 | pref("layers.offmainthreadcomposition.async-animations", false); |
michael@0 | 278 | pref("layers.async-video.enabled", false); |
michael@0 | 279 | #else |
michael@0 | 280 | pref("dom.ipc.tabs.disabled", false); |
michael@0 | 281 | pref("layers.acceleration.disabled", false); |
michael@0 | 282 | pref("layers.offmainthreadcomposition.async-animations", true); |
michael@0 | 283 | pref("layers.async-video.enabled", true); |
michael@0 | 284 | pref("layers.async-pan-zoom.enabled", true); |
michael@0 | 285 | pref("gfx.content.azure.backends", "cairo"); |
michael@0 | 286 | #endif |
michael@0 | 287 | |
michael@0 | 288 | // Web Notifications |
michael@0 | 289 | pref("notification.feature.enabled", true); |
michael@0 | 290 | |
michael@0 | 291 | // IndexedDB |
michael@0 | 292 | pref("dom.indexedDB.warningQuota", 5); |
michael@0 | 293 | |
michael@0 | 294 | // prevent video elements from preloading too much data |
michael@0 | 295 | pref("media.preload.default", 1); // default to preload none |
michael@0 | 296 | pref("media.preload.auto", 2); // preload metadata if preload=auto |
michael@0 | 297 | pref("media.cache_size", 4096); // 4MB media cache |
michael@0 | 298 | |
michael@0 | 299 | // The default number of decoded video frames that are enqueued in |
michael@0 | 300 | // MediaDecoderReader's mVideoQueue. |
michael@0 | 301 | pref("media.video-queue.default-size", 3); |
michael@0 | 302 | |
michael@0 | 303 | // optimize images' memory usage |
michael@0 | 304 | pref("image.mem.decodeondraw", true); |
michael@0 | 305 | pref("image.mem.allow_locking_in_content_processes", false); /* don't allow image locking */ |
michael@0 | 306 | pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */ |
michael@0 | 307 | pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */ |
michael@0 | 308 | // 65MB seems reasonable and layout/reftests/bugs/370629-1.html requires more than 62MB |
michael@0 | 309 | pref("image.mem.hard_limit_decoded_image_kb", 66560); |
michael@0 | 310 | pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */ |
michael@0 | 311 | |
michael@0 | 312 | // XXX this isn't a good check for "are touch events supported", but |
michael@0 | 313 | // we don't really have a better one at the moment. |
michael@0 | 314 | // enable touch events interfaces |
michael@0 | 315 | pref("dom.w3c_touch_events.enabled", 1); |
michael@0 | 316 | pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240" |
michael@0 | 317 | pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240" |
michael@0 | 318 | |
michael@0 | 319 | #ifdef MOZ_SAFE_BROWSING |
michael@0 | 320 | // Safe browsing does nothing unless this pref is set |
michael@0 | 321 | pref("browser.safebrowsing.enabled", true); |
michael@0 | 322 | |
michael@0 | 323 | // Prevent loading of pages identified as malware |
michael@0 | 324 | pref("browser.safebrowsing.malware.enabled", true); |
michael@0 | 325 | |
michael@0 | 326 | // Non-enhanced mode (local url lists) URL list to check for updates |
michael@0 | 327 | 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 | 328 | |
michael@0 | 329 | pref("browser.safebrowsing.dataProvider", 0); |
michael@0 | 330 | |
michael@0 | 331 | // Does the provider name need to be localizable? |
michael@0 | 332 | pref("browser.safebrowsing.provider.0.name", "Google"); |
michael@0 | 333 | pref("browser.safebrowsing.provider.0.reportURL", "https://safebrowsing.google.com/safebrowsing/report?"); |
michael@0 | 334 | pref("browser.safebrowsing.provider.0.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2"); |
michael@0 | 335 | |
michael@0 | 336 | // HTML report pages |
michael@0 | 337 | pref("browser.safebrowsing.provider.0.reportGenericURL", "http://{moz:locale}.phish-generic.mozilla.com/?hl={moz:locale}"); |
michael@0 | 338 | pref("browser.safebrowsing.provider.0.reportErrorURL", "http://{moz:locale}.phish-error.mozilla.com/?hl={moz:locale}"); |
michael@0 | 339 | pref("browser.safebrowsing.provider.0.reportPhishURL", "http://{moz:locale}.phish-report.mozilla.com/?hl={moz:locale}"); |
michael@0 | 340 | pref("browser.safebrowsing.provider.0.reportMalwareURL", "http://{moz:locale}.malware-report.mozilla.com/?hl={moz:locale}"); |
michael@0 | 341 | pref("browser.safebrowsing.provider.0.reportMalwareErrorURL", "http://{moz:locale}.malware-error.mozilla.com/?hl={moz:locale}"); |
michael@0 | 342 | |
michael@0 | 343 | // FAQ URLs |
michael@0 | 344 | |
michael@0 | 345 | // Name of the about: page contributed by safebrowsing to handle display of error |
michael@0 | 346 | // pages on phishing/malware hits. (bug 399233) |
michael@0 | 347 | pref("urlclassifier.alternate_error_page", "blocked"); |
michael@0 | 348 | |
michael@0 | 349 | // The number of random entries to send with a gethash request. |
michael@0 | 350 | pref("urlclassifier.gethashnoise", 4); |
michael@0 | 351 | |
michael@0 | 352 | // If an urlclassifier table has not been updated in this number of seconds, |
michael@0 | 353 | // a gethash request will be forced to check that the result is still in |
michael@0 | 354 | // the database. |
michael@0 | 355 | pref("urlclassifier.max-complete-age", 2700); |
michael@0 | 356 | |
michael@0 | 357 | // URL for checking the reason for a malware warning. |
michael@0 | 358 | pref("browser.safebrowsing.malware.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site="); |
michael@0 | 359 | #endif |
michael@0 | 360 | |
michael@0 | 361 | // True if this is the first time we are showing about:firstrun |
michael@0 | 362 | pref("browser.firstrun.show.uidiscovery", true); |
michael@0 | 363 | pref("browser.firstrun.show.localepicker", true); |
michael@0 | 364 | |
michael@0 | 365 | // initiated by a user |
michael@0 | 366 | pref("content.ime.strict_policy", true); |
michael@0 | 367 | |
michael@0 | 368 | // True if you always want dump() to work |
michael@0 | 369 | // |
michael@0 | 370 | // On Android, you also need to do the following for the output |
michael@0 | 371 | // to show up in logcat: |
michael@0 | 372 | // |
michael@0 | 373 | // $ adb shell stop |
michael@0 | 374 | // $ adb shell setprop log.redirect-stdio true |
michael@0 | 375 | // $ adb shell start |
michael@0 | 376 | pref("browser.dom.window.dump.enabled", false); |
michael@0 | 377 | |
michael@0 | 378 | // Default Content Security Policy to apply to privileged and certified apps |
michael@0 | 379 | pref("security.apps.privileged.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'"); |
michael@0 | 380 | // If you change this CSP, make sure to update the fast path in nsCSPService.cpp |
michael@0 | 381 | pref("security.apps.certified.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self'"); |
michael@0 | 382 | |
michael@0 | 383 | // Temporarily force-enable GL compositing. This is default-disabled |
michael@0 | 384 | // deep within the bowels of the widgetry system. Remove me when GL |
michael@0 | 385 | // compositing isn't default disabled in widget/android. |
michael@0 | 386 | pref("layers.acceleration.force-enabled", true); |
michael@0 | 387 | |
michael@0 | 388 | // handle links targeting new windows |
michael@0 | 389 | // 1=current window/tab, 2=new window, 3=new tab in most recent window |
michael@0 | 390 | pref("browser.link.open_newwindow", 3); |
michael@0 | 391 | |
michael@0 | 392 | // 0: no restrictions - divert everything |
michael@0 | 393 | // 1: don't divert window.open at all |
michael@0 | 394 | // 2: don't divert window.open with features |
michael@0 | 395 | pref("browser.link.open_newwindow.restriction", 0); |
michael@0 | 396 | |
michael@0 | 397 | // Enable browser frames (including OOP, except on Windows, where it doesn't |
michael@0 | 398 | // work), but make in-process browser frames the default. |
michael@0 | 399 | pref("dom.mozBrowserFramesEnabled", true); |
michael@0 | 400 | |
michael@0 | 401 | // Enable a (virtually) unlimited number of mozbrowser processes. |
michael@0 | 402 | // We'll run out of PIDs on UNIX-y systems before we hit this limit. |
michael@0 | 403 | pref("dom.ipc.processCount", 100000); |
michael@0 | 404 | |
michael@0 | 405 | pref("dom.ipc.browser_frames.oop_by_default", false); |
michael@0 | 406 | pref("dom.browser_frames.useAsyncPanZoom", true); |
michael@0 | 407 | |
michael@0 | 408 | // SMS/MMS |
michael@0 | 409 | pref("dom.sms.enabled", true); |
michael@0 | 410 | |
michael@0 | 411 | //The waiting time in network manager. |
michael@0 | 412 | pref("network.gonk.ms-release-mms-connection", 30000); |
michael@0 | 413 | |
michael@0 | 414 | // WebContacts |
michael@0 | 415 | pref("dom.mozContacts.enabled", true); |
michael@0 | 416 | pref("dom.navigator-property.disable.mozContacts", false); |
michael@0 | 417 | pref("dom.global-constructor.disable.mozContact", false); |
michael@0 | 418 | |
michael@0 | 419 | // Shortnumber matching needed for e.g. Brazil: |
michael@0 | 420 | // 03187654321 can be found with 87654321 |
michael@0 | 421 | pref("dom.phonenumber.substringmatching.BR", 8); |
michael@0 | 422 | pref("dom.phonenumber.substringmatching.CO", 10); |
michael@0 | 423 | pref("dom.phonenumber.substringmatching.VE", 7); |
michael@0 | 424 | pref("dom.phonenumber.substringmatching.CL", 8); |
michael@0 | 425 | pref("dom.phonenumber.substringmatching.PE", 7); |
michael@0 | 426 | |
michael@0 | 427 | // WebAlarms |
michael@0 | 428 | pref("dom.mozAlarms.enabled", true); |
michael@0 | 429 | |
michael@0 | 430 | // SimplePush |
michael@0 | 431 | pref("services.push.enabled", true); |
michael@0 | 432 | // Debugging enabled. |
michael@0 | 433 | pref("services.push.debug", false); |
michael@0 | 434 | // Is the network connection allowed to be up? |
michael@0 | 435 | // This preference should be used in UX to enable/disable push. |
michael@0 | 436 | pref("services.push.connection.enabled", true); |
michael@0 | 437 | // serverURL to be assigned by services team |
michael@0 | 438 | pref("services.push.serverURL", "wss://push.services.mozilla.com/"); |
michael@0 | 439 | pref("services.push.userAgentID", ""); |
michael@0 | 440 | // Exponential back-off start is 5 seconds like in HTTP/1.1. |
michael@0 | 441 | // Maximum back-off is pingInterval. |
michael@0 | 442 | pref("services.push.retryBaseInterval", 5000); |
michael@0 | 443 | // Interval at which to ping PushServer to check connection status. In |
michael@0 | 444 | // milliseconds. If no reply is received within requestTimeout, the connection |
michael@0 | 445 | // is considered closed. |
michael@0 | 446 | pref("services.push.pingInterval", 1800000); // 30 minutes |
michael@0 | 447 | // How long before a DOMRequest errors as timeout |
michael@0 | 448 | pref("services.push.requestTimeout", 10000); |
michael@0 | 449 | // enable udp wakeup support |
michael@0 | 450 | pref("services.push.udp.wakeupEnabled", true); |
michael@0 | 451 | |
michael@0 | 452 | // NetworkStats |
michael@0 | 453 | #ifdef MOZ_WIDGET_GONK |
michael@0 | 454 | pref("dom.mozNetworkStats.enabled", true); |
michael@0 | 455 | pref("dom.webapps.firstRunWithSIM", true); |
michael@0 | 456 | #endif |
michael@0 | 457 | |
michael@0 | 458 | #ifdef MOZ_B2G_RIL |
michael@0 | 459 | // SingleVariant |
michael@0 | 460 | pref("dom.mozApps.single_variant_sourcedir", "/persist/svoperapps"); |
michael@0 | 461 | #endif |
michael@0 | 462 | |
michael@0 | 463 | // WebSettings |
michael@0 | 464 | pref("dom.mozSettings.enabled", true); |
michael@0 | 465 | pref("dom.navigator-property.disable.mozSettings", false); |
michael@0 | 466 | pref("dom.mozPermissionSettings.enabled", true); |
michael@0 | 467 | |
michael@0 | 468 | // controls if we want camera support |
michael@0 | 469 | pref("device.camera.enabled", true); |
michael@0 | 470 | pref("media.realtime_decoder.enabled", true); |
michael@0 | 471 | |
michael@0 | 472 | // TCPSocket |
michael@0 | 473 | pref("dom.mozTCPSocket.enabled", true); |
michael@0 | 474 | |
michael@0 | 475 | // WebPayment |
michael@0 | 476 | pref("dom.mozPay.enabled", true); |
michael@0 | 477 | |
michael@0 | 478 | // "Preview" landing of bug 710563, which is bogged down in analysis |
michael@0 | 479 | // of talos regression. This is a needed change for higher-framerate |
michael@0 | 480 | // CSS animations, and incidentally works around an apparent bug in |
michael@0 | 481 | // our handling of requestAnimationFrame() listeners, which are |
michael@0 | 482 | // supposed to enable this REPEATING_PRECISE_CAN_SKIP behavior. The |
michael@0 | 483 | // secondary bug isn't really worth investigating since it's obseleted |
michael@0 | 484 | // by bug 710563. |
michael@0 | 485 | pref("layout.frame_rate.precise", true); |
michael@0 | 486 | |
michael@0 | 487 | // Handle hardware buttons in the b2g chrome package |
michael@0 | 488 | pref("b2g.keys.menu.enabled", true); |
michael@0 | 489 | |
michael@0 | 490 | // Screen timeout in seconds |
michael@0 | 491 | pref("power.screen.timeout", 60); |
michael@0 | 492 | |
michael@0 | 493 | pref("full-screen-api.enabled", true); |
michael@0 | 494 | |
michael@0 | 495 | #ifndef MOZ_WIDGET_GONK |
michael@0 | 496 | // If we're not actually on physical hardware, don't make the top level widget |
michael@0 | 497 | // fullscreen when transitioning to fullscreen. This means in emulated |
michael@0 | 498 | // environments (like the b2g desktop client) we won't make the client window |
michael@0 | 499 | // fill the whole screen, we'll just make the content fill the client window, |
michael@0 | 500 | // i.e. it won't give the impression to content that the number of device |
michael@0 | 501 | // screen pixels changes! |
michael@0 | 502 | pref("full-screen-api.ignore-widgets", true); |
michael@0 | 503 | #endif |
michael@0 | 504 | |
michael@0 | 505 | pref("media.volume.steps", 10); |
michael@0 | 506 | |
michael@0 | 507 | #ifdef ENABLE_MARIONETTE |
michael@0 | 508 | //Enable/disable marionette server, set listening port |
michael@0 | 509 | pref("marionette.defaultPrefs.enabled", true); |
michael@0 | 510 | pref("marionette.defaultPrefs.port", 2828); |
michael@0 | 511 | #ifndef MOZ_WIDGET_GONK |
michael@0 | 512 | // On desktop builds, we need to force the socket to listen on localhost only |
michael@0 | 513 | pref("marionette.force-local", true); |
michael@0 | 514 | #endif |
michael@0 | 515 | #endif |
michael@0 | 516 | |
michael@0 | 517 | #ifdef MOZ_UPDATER |
michael@0 | 518 | // When we're applying updates, we can't let anything hang us on |
michael@0 | 519 | // quit+restart. The user has no recourse. |
michael@0 | 520 | pref("shutdown.watchdog.timeoutSecs", 5); |
michael@0 | 521 | // Timeout before the update prompt automatically installs the update |
michael@0 | 522 | pref("b2g.update.apply-prompt-timeout", 60000); // milliseconds |
michael@0 | 523 | // Amount of time to wait after the user is idle before prompting to apply an update |
michael@0 | 524 | pref("b2g.update.apply-idle-timeout", 600000); // milliseconds |
michael@0 | 525 | // Amount of time after which connection will be restarted if no progress |
michael@0 | 526 | pref("b2g.update.download-watchdog-timeout", 120000); // milliseconds |
michael@0 | 527 | pref("b2g.update.download-watchdog-max-retries", 5); |
michael@0 | 528 | |
michael@0 | 529 | pref("app.update.enabled", true); |
michael@0 | 530 | pref("app.update.auto", false); |
michael@0 | 531 | pref("app.update.silent", false); |
michael@0 | 532 | pref("app.update.mode", 0); |
michael@0 | 533 | pref("app.update.incompatible.mode", 0); |
michael@0 | 534 | pref("app.update.staging.enabled", true); |
michael@0 | 535 | pref("app.update.service.enabled", true); |
michael@0 | 536 | |
michael@0 | 537 | // The URL hosting the update manifest. |
michael@0 | 538 | pref("app.update.url", "http://update.boot2gecko.org/%CHANNEL%/update.xml"); |
michael@0 | 539 | pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@"); |
michael@0 | 540 | |
michael@0 | 541 | // Interval at which update manifest is fetched. In units of seconds. |
michael@0 | 542 | pref("app.update.interval", 86400); // 1 day |
michael@0 | 543 | // Don't throttle background updates. |
michael@0 | 544 | pref("app.update.download.backgroundInterval", 0); |
michael@0 | 545 | |
michael@0 | 546 | // Retry update socket connections every 30 seconds in the cases of certain kinds of errors |
michael@0 | 547 | pref("app.update.socket.retryTimeout", 30000); |
michael@0 | 548 | |
michael@0 | 549 | // Max of 20 consecutive retries (total 10 minutes) before giving up and marking |
michael@0 | 550 | // the update download as failed. |
michael@0 | 551 | // Note: Offline errors will always retry when the network comes online. |
michael@0 | 552 | pref("app.update.socket.maxErrors", 20); |
michael@0 | 553 | |
michael@0 | 554 | // Enable update logging for now, to diagnose growing pains in the |
michael@0 | 555 | // field. |
michael@0 | 556 | pref("app.update.log", true); |
michael@0 | 557 | #else |
michael@0 | 558 | // Explicitly disable the shutdown watchdog. It's enabled by default. |
michael@0 | 559 | // When the updater is disabled, we want to know about shutdown hangs. |
michael@0 | 560 | pref("shutdown.watchdog.timeoutSecs", -1); |
michael@0 | 561 | #endif |
michael@0 | 562 | |
michael@0 | 563 | // Check daily for apps updates. |
michael@0 | 564 | pref("webapps.update.interval", 86400); |
michael@0 | 565 | |
michael@0 | 566 | // Extensions preferences |
michael@0 | 567 | pref("extensions.update.enabled", false); |
michael@0 | 568 | pref("extensions.getAddons.cache.enabled", false); |
michael@0 | 569 | |
michael@0 | 570 | // Context Menu |
michael@0 | 571 | pref("ui.click_hold_context_menus", true); |
michael@0 | 572 | pref("ui.click_hold_context_menus.delay", 750); |
michael@0 | 573 | |
michael@0 | 574 | // Enable device storage |
michael@0 | 575 | pref("device.storage.enabled", true); |
michael@0 | 576 | |
michael@0 | 577 | // Enable pre-installed applications |
michael@0 | 578 | pref("dom.webapps.useCurrentProfile", true); |
michael@0 | 579 | |
michael@0 | 580 | // Enable system message |
michael@0 | 581 | pref("dom.sysmsg.enabled", true); |
michael@0 | 582 | pref("media.plugins.enabled", false); |
michael@0 | 583 | pref("media.omx.enabled", true); |
michael@0 | 584 | pref("media.rtsp.enabled", true); |
michael@0 | 585 | pref("media.rtsp.video.enabled", true); |
michael@0 | 586 | |
michael@0 | 587 | // Disable printing (particularly, window.print()) |
michael@0 | 588 | pref("dom.disable_window_print", true); |
michael@0 | 589 | |
michael@0 | 590 | // Disable window.showModalDialog |
michael@0 | 591 | pref("dom.disable_window_showModalDialog", true); |
michael@0 | 592 | |
michael@0 | 593 | // Enable new experimental html forms |
michael@0 | 594 | pref("dom.experimental_forms", true); |
michael@0 | 595 | pref("dom.forms.number", true); |
michael@0 | 596 | |
michael@0 | 597 | // Don't enable <input type=color> yet as we don't have a color picker |
michael@0 | 598 | // implemented for b2g (bug 875751) |
michael@0 | 599 | pref("dom.forms.color", false); |
michael@0 | 600 | |
michael@0 | 601 | // Turns on gralloc-based direct texturing for Gonk |
michael@0 | 602 | pref("gfx.gralloc.enabled", false); |
michael@0 | 603 | |
michael@0 | 604 | // This preference instructs the JS engine to discard the |
michael@0 | 605 | // source of any privileged JS after compilation. This saves |
michael@0 | 606 | // memory, but makes things like Function.prototype.toSource() |
michael@0 | 607 | // fail. |
michael@0 | 608 | pref("javascript.options.discardSystemSource", true); |
michael@0 | 609 | |
michael@0 | 610 | // XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging |
michael@0 | 611 | pref("javascript.options.mem.log", false); |
michael@0 | 612 | |
michael@0 | 613 | // Increase mark slice time from 10ms to 30ms |
michael@0 | 614 | pref("javascript.options.mem.gc_incremental_slice_ms", 30); |
michael@0 | 615 | |
michael@0 | 616 | // Increase time to get more high frequency GC on benchmarks from 1000ms to 1500ms |
michael@0 | 617 | pref("javascript.options.mem.gc_high_frequency_time_limit_ms", 1500); |
michael@0 | 618 | |
michael@0 | 619 | pref("javascript.options.mem.gc_high_frequency_heap_growth_max", 300); |
michael@0 | 620 | pref("javascript.options.mem.gc_high_frequency_heap_growth_min", 120); |
michael@0 | 621 | pref("javascript.options.mem.gc_high_frequency_high_limit_mb", 40); |
michael@0 | 622 | pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 0); |
michael@0 | 623 | pref("javascript.options.mem.gc_low_frequency_heap_growth", 120); |
michael@0 | 624 | pref("javascript.options.mem.high_water_mark", 6); |
michael@0 | 625 | pref("javascript.options.mem.gc_allocation_threshold_mb", 1); |
michael@0 | 626 | pref("javascript.options.mem.gc_decommit_threshold_mb", 1); |
michael@0 | 627 | |
michael@0 | 628 | // Show/Hide scrollbars when active/inactive |
michael@0 | 629 | pref("ui.showHideScrollbars", 1); |
michael@0 | 630 | pref("ui.useOverlayScrollbars", 1); |
michael@0 | 631 | |
michael@0 | 632 | // Enable the ProcessPriorityManager, and give processes with no visible |
michael@0 | 633 | // documents a 1s grace period before they're eligible to be marked as |
michael@0 | 634 | // background. Background processes that are perceivable due to playing |
michael@0 | 635 | // media are given a longer grace period to accomodate changing tracks, etc. |
michael@0 | 636 | pref("dom.ipc.processPriorityManager.enabled", true); |
michael@0 | 637 | pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000); |
michael@0 | 638 | pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000); |
michael@0 | 639 | pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000); |
michael@0 | 640 | |
michael@0 | 641 | // Number of different background levels for background processes. We use |
michael@0 | 642 | // these different levels to force the low-memory killer to kill processes in |
michael@0 | 643 | // a LRU order. |
michael@0 | 644 | pref("dom.ipc.processPriorityManager.backgroundLRUPoolLevels", 5); |
michael@0 | 645 | |
michael@0 | 646 | // Kernel parameters for process priorities. These affect how processes are |
michael@0 | 647 | // killed on low-memory and their relative CPU priorities. |
michael@0 | 648 | // |
michael@0 | 649 | // Note: The maximum nice value on Linux is 19, but the max value you should |
michael@0 | 650 | // use here is 18. NSPR adds 1 to some threads' nice values, to mark |
michael@0 | 651 | // low-priority threads. If the process priority manager were to renice a |
michael@0 | 652 | // process (and all its threads) to 19, all threads would have the same |
michael@0 | 653 | // niceness. Then when we reniced the process to (say) 10, all threads would |
michael@0 | 654 | // /still/ have the same niceness; we'd effectively have erased NSPR's thread |
michael@0 | 655 | // priorities. |
michael@0 | 656 | |
michael@0 | 657 | // The kernel can only accept 6 (OomScoreAdjust, KillUnderKB) pairs. But it is |
michael@0 | 658 | // okay, kernel will still kill processes with larger OomScoreAdjust first even |
michael@0 | 659 | // its OomScoreAdjust don't have a corresponding KillUnderKB. |
michael@0 | 660 | |
michael@0 | 661 | pref("hal.processPriorityManager.gonk.MASTER.OomScoreAdjust", 0); |
michael@0 | 662 | pref("hal.processPriorityManager.gonk.MASTER.KillUnderKB", 4096); |
michael@0 | 663 | pref("hal.processPriorityManager.gonk.MASTER.Nice", 0); |
michael@0 | 664 | |
michael@0 | 665 | pref("hal.processPriorityManager.gonk.PREALLOC.OomScoreAdjust", 67); |
michael@0 | 666 | pref("hal.processPriorityManager.gonk.PREALLOC.Nice", 18); |
michael@0 | 667 | |
michael@0 | 668 | pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.OomScoreAdjust", 67); |
michael@0 | 669 | pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.KillUnderKB", 5120); |
michael@0 | 670 | pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.Nice", 0); |
michael@0 | 671 | |
michael@0 | 672 | pref("hal.processPriorityManager.gonk.FOREGROUND.OomScoreAdjust", 134); |
michael@0 | 673 | pref("hal.processPriorityManager.gonk.FOREGROUND.KillUnderKB", 6144); |
michael@0 | 674 | pref("hal.processPriorityManager.gonk.FOREGROUND.Nice", 1); |
michael@0 | 675 | |
michael@0 | 676 | pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.OomScoreAdjust", 200); |
michael@0 | 677 | pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.Nice", 1); |
michael@0 | 678 | |
michael@0 | 679 | pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.OomScoreAdjust", 400); |
michael@0 | 680 | pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.KillUnderKB", 7168); |
michael@0 | 681 | pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.Nice", 7); |
michael@0 | 682 | |
michael@0 | 683 | pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.OomScoreAdjust", 534); |
michael@0 | 684 | pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.KillUnderKB", 8192); |
michael@0 | 685 | pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.Nice", 18); |
michael@0 | 686 | |
michael@0 | 687 | pref("hal.processPriorityManager.gonk.BACKGROUND.OomScoreAdjust", 667); |
michael@0 | 688 | pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderKB", 20480); |
michael@0 | 689 | pref("hal.processPriorityManager.gonk.BACKGROUND.Nice", 18); |
michael@0 | 690 | |
michael@0 | 691 | // Processes get this niceness when they have low CPU priority. |
michael@0 | 692 | pref("hal.processPriorityManager.gonk.LowCPUNice", 18); |
michael@0 | 693 | |
michael@0 | 694 | // Fire a memory pressure event when the system has less than Xmb of memory |
michael@0 | 695 | // remaining. You should probably set this just above Y.KillUnderKB for |
michael@0 | 696 | // the highest priority class Y that you want to make an effort to keep alive. |
michael@0 | 697 | // (For example, we want BACKGROUND_PERCEIVABLE to stay alive.) If you set |
michael@0 | 698 | // this too high, then we'll send out a memory pressure event every Z seconds |
michael@0 | 699 | // (see below), even while we have processes that we would happily kill in |
michael@0 | 700 | // order to free up memory. |
michael@0 | 701 | pref("hal.processPriorityManager.gonk.notifyLowMemUnderKB", 14336); |
michael@0 | 702 | |
michael@0 | 703 | // We wait this long before polling the memory-pressure fd after seeing one |
michael@0 | 704 | // memory pressure event. (When we're not under memory pressure, we sit |
michael@0 | 705 | // blocked on a poll(), and this pref has no effect.) |
michael@0 | 706 | pref("gonk.systemMemoryPressureRecoveryPollMS", 5000); |
michael@0 | 707 | |
michael@0 | 708 | #ifndef DEBUG |
michael@0 | 709 | // Enable pre-launching content processes for improved startup time |
michael@0 | 710 | // (hiding latency). |
michael@0 | 711 | pref("dom.ipc.processPrelaunch.enabled", true); |
michael@0 | 712 | // Wait this long before pre-launching a new subprocess. |
michael@0 | 713 | pref("dom.ipc.processPrelaunch.delayMs", 5000); |
michael@0 | 714 | #endif |
michael@0 | 715 | |
michael@0 | 716 | pref("dom.ipc.reuse_parent_app", false); |
michael@0 | 717 | |
michael@0 | 718 | // When a process receives a system message, we hold a CPU wake lock on its |
michael@0 | 719 | // behalf for this many seconds, or until it handles the system message, |
michael@0 | 720 | // whichever comes first. |
michael@0 | 721 | pref("dom.ipc.systemMessageCPULockTimeoutSec", 30); |
michael@0 | 722 | |
michael@0 | 723 | // Ignore the "dialog=1" feature in window.open. |
michael@0 | 724 | pref("dom.disable_window_open_dialog_feature", true); |
michael@0 | 725 | |
michael@0 | 726 | // Screen reader support |
michael@0 | 727 | pref("accessibility.accessfu.activate", 2); |
michael@0 | 728 | pref("accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement,Landmark,ListItem"); |
michael@0 | 729 | // Setting for an utterance order (0 - description first, 1 - description last). |
michael@0 | 730 | pref("accessibility.accessfu.utterance", 1); |
michael@0 | 731 | // Whether to skip images with empty alt text |
michael@0 | 732 | pref("accessibility.accessfu.skip_empty_images", true); |
michael@0 | 733 | |
michael@0 | 734 | // Enable hit-target fluffing |
michael@0 | 735 | pref("ui.touch.radius.enabled", true); |
michael@0 | 736 | pref("ui.touch.radius.leftmm", 3); |
michael@0 | 737 | pref("ui.touch.radius.topmm", 5); |
michael@0 | 738 | pref("ui.touch.radius.rightmm", 3); |
michael@0 | 739 | pref("ui.touch.radius.bottommm", 2); |
michael@0 | 740 | |
michael@0 | 741 | pref("ui.mouse.radius.enabled", true); |
michael@0 | 742 | pref("ui.mouse.radius.leftmm", 3); |
michael@0 | 743 | pref("ui.mouse.radius.topmm", 5); |
michael@0 | 744 | pref("ui.mouse.radius.rightmm", 3); |
michael@0 | 745 | pref("ui.mouse.radius.bottommm", 2); |
michael@0 | 746 | |
michael@0 | 747 | // Disable native prompt |
michael@0 | 748 | pref("browser.prompt.allowNative", false); |
michael@0 | 749 | |
michael@0 | 750 | // Minimum delay in milliseconds between network activity notifications (0 means |
michael@0 | 751 | // no notifications). The delay is the same for both download and upload, though |
michael@0 | 752 | // they are handled separately. This pref is only read once at startup: |
michael@0 | 753 | // a restart is required to enable a new value. |
michael@0 | 754 | pref("network.activity.blipIntervalMilliseconds", 250); |
michael@0 | 755 | |
michael@0 | 756 | // By default we want the NetworkManager service to manage Gecko's offline |
michael@0 | 757 | // status for us according to the state of Wifi/cellular data connections. |
michael@0 | 758 | // In some environments, such as the emulator or hardware with other network |
michael@0 | 759 | // connectivity, this is not desireable, however, in which case this pref |
michael@0 | 760 | // can be flipped to false. |
michael@0 | 761 | pref("network.gonk.manage-offline-status", true); |
michael@0 | 762 | |
michael@0 | 763 | pref("jsloader.reuseGlobal", true); |
michael@0 | 764 | |
michael@0 | 765 | // Enable font inflation for browser tab content. |
michael@0 | 766 | pref("font.size.inflation.minTwips", 120); |
michael@0 | 767 | // And disable it for lingering master-process UI. |
michael@0 | 768 | pref("font.size.inflation.disabledInMasterProcess", true); |
michael@0 | 769 | |
michael@0 | 770 | // Enable freeing dirty pages when minimizing memory; this reduces memory |
michael@0 | 771 | // consumption when applications are sent to the background. |
michael@0 | 772 | pref("memory.free_dirty_pages", true); |
michael@0 | 773 | |
michael@0 | 774 | // Enable the Linux-specific, system-wide memory reporter. |
michael@0 | 775 | pref("memory.system_memory_reporter", true); |
michael@0 | 776 | |
michael@0 | 777 | // Don't dump memory reports on OOM, by default. |
michael@0 | 778 | pref("memory.dump_reports_on_oom", false); |
michael@0 | 779 | |
michael@0 | 780 | pref("layout.imagevisibility.enabled", true); |
michael@0 | 781 | pref("layout.imagevisibility.numscrollportwidths", 1); |
michael@0 | 782 | pref("layout.imagevisibility.numscrollportheights", 1); |
michael@0 | 783 | |
michael@0 | 784 | // Enable native identity (persona/browserid) |
michael@0 | 785 | pref("dom.identity.enabled", true); |
michael@0 | 786 | |
michael@0 | 787 | // Wait up to this much milliseconds when orientation changed |
michael@0 | 788 | pref("layers.orientation.sync.timeout", 1000); |
michael@0 | 789 | |
michael@0 | 790 | // Don't discard WebGL contexts for foreground apps on memory |
michael@0 | 791 | // pressure. |
michael@0 | 792 | pref("webgl.can-lose-context-in-foreground", false); |
michael@0 | 793 | |
michael@0 | 794 | // Allow nsMemoryInfoDumper to create a fifo in the temp directory. We use |
michael@0 | 795 | // this fifo to trigger about:memory dumps, among other things. |
michael@0 | 796 | pref("memory_info_dumper.watch_fifo.enabled", true); |
michael@0 | 797 | pref("memory_info_dumper.watch_fifo.directory", "/data/local"); |
michael@0 | 798 | |
michael@0 | 799 | // See ua-update.json.in for the packaged UA override list |
michael@0 | 800 | pref("general.useragent.updates.enabled", true); |
michael@0 | 801 | pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%"); |
michael@0 | 802 | pref("general.useragent.updates.interval", 604800); // 1 week |
michael@0 | 803 | pref("general.useragent.updates.retry", 86400); // 1 day |
michael@0 | 804 | |
michael@0 | 805 | // Make <audio> and <video> talk to the AudioChannelService. |
michael@0 | 806 | pref("media.useAudioChannelService", true); |
michael@0 | 807 | |
michael@0 | 808 | pref("b2g.version", @MOZ_B2G_VERSION@); |
michael@0 | 809 | |
michael@0 | 810 | // Disable console buffering to save memory. |
michael@0 | 811 | pref("consoleservice.buffered", false); |
michael@0 | 812 | |
michael@0 | 813 | #ifdef MOZ_WIDGET_GONK |
michael@0 | 814 | // Performance testing suggests 2k is a better page size for SQLite. |
michael@0 | 815 | pref("toolkit.storage.pageSize", 2048); |
michael@0 | 816 | #endif |
michael@0 | 817 | |
michael@0 | 818 | // Enable captive portal detection. |
michael@0 | 819 | pref("captivedetect.canonicalURL", "http://detectportal.firefox.com/success.txt"); |
michael@0 | 820 | pref("captivedetect.canonicalContent", "success\n"); |
michael@0 | 821 | |
michael@0 | 822 | // The url of the manifest we use for ADU pings. |
michael@0 | 823 | pref("ping.manifestURL", "https://marketplace.firefox.com/packaged.webapp"); |
michael@0 | 824 | |
michael@0 | 825 | // Enable the disk space watcher |
michael@0 | 826 | pref("disk_space_watcher.enabled", true); |
michael@0 | 827 | |
michael@0 | 828 | // SNTP preferences. |
michael@0 | 829 | pref("network.sntp.maxRetryCount", 10); |
michael@0 | 830 | pref("network.sntp.refreshPeriod", 86400); // In seconds. |
michael@0 | 831 | pref("network.sntp.pools", // Servers separated by ';'. |
michael@0 | 832 | "0.pool.ntp.org;1.pool.ntp.org;2.pool.ntp.org;3.pool.ntp.org"); |
michael@0 | 833 | pref("network.sntp.port", 123); |
michael@0 | 834 | pref("network.sntp.timeout", 30); // In seconds. |
michael@0 | 835 | |
michael@0 | 836 | // Enable dataStore |
michael@0 | 837 | pref("dom.datastore.enabled", true); |
michael@0 | 838 | |
michael@0 | 839 | // DOM Inter-App Communication API. |
michael@0 | 840 | pref("dom.inter-app-communication-api.enabled", true); |
michael@0 | 841 | |
michael@0 | 842 | // Allow ADB to run for this many hours before disabling |
michael@0 | 843 | // (only applies when marionette is disabled) |
michael@0 | 844 | // 0 disables the timer. |
michael@0 | 845 | pref("b2g.adb.timeout-hours", 12); |
michael@0 | 846 | |
michael@0 | 847 | // InputMethod so we can do soft keyboards |
michael@0 | 848 | pref("dom.mozInputMethod.enabled", true); |
michael@0 | 849 | |
michael@0 | 850 | // Absolute path to the devtool unix domain socket file used |
michael@0 | 851 | // to communicate with a usb cable via adb forward |
michael@0 | 852 | pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket"); |
michael@0 | 853 | |
michael@0 | 854 | // enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases, |
michael@0 | 855 | // falling back to Skia/software for smaller canvases |
michael@0 | 856 | #ifdef MOZ_WIDGET_GONK |
michael@0 | 857 | pref("gfx.canvas.azure.backends", "skia"); |
michael@0 | 858 | pref("gfx.canvas.azure.accelerated", true); |
michael@0 | 859 | #endif |
michael@0 | 860 | |
michael@0 | 861 | // Turn on dynamic cache size for Skia |
michael@0 | 862 | pref("gfx.canvas.skiagl.dynamic-cache", true); |
michael@0 | 863 | |
michael@0 | 864 | // Limit skia to canvases the size of the device screen or smaller |
michael@0 | 865 | pref("gfx.canvas.max-size-for-skia-gl", -1); |
michael@0 | 866 | |
michael@0 | 867 | // enable fence with readpixels for SurfaceStream |
michael@0 | 868 | pref("gfx.gralloc.fence-with-readpixels", true); |
michael@0 | 869 | |
michael@0 | 870 | // Cell Broadcast API |
michael@0 | 871 | pref("ril.cellbroadcast.disabled", false); |
michael@0 | 872 | |
michael@0 | 873 | // The url of the page used to display network error details. |
michael@0 | 874 | pref("b2g.neterror.url", "app://system.gaiamobile.org/net_error.html"); |
michael@0 | 875 | |
michael@0 | 876 | // Enable Web Speech synthesis API |
michael@0 | 877 | pref("media.webspeech.synth.enabled", true); |
michael@0 | 878 | |
michael@0 | 879 | // Downloads API |
michael@0 | 880 | pref("dom.mozDownloads.enabled", true); |
michael@0 | 881 | pref("dom.downloads.max_retention_days", 7); |
michael@0 | 882 | |
michael@0 | 883 | // External Helper Application Handling |
michael@0 | 884 | // |
michael@0 | 885 | // All external helper application handling can require the docshell to be |
michael@0 | 886 | // active before allowing the external helper app service to handle content. |
michael@0 | 887 | // |
michael@0 | 888 | // To prevent SD card DoS attacks via downloads we disable background handling. |
michael@0 | 889 | // |
michael@0 | 890 | pref("security.exthelperapp.disable_background_handling", true); |
michael@0 | 891 | |
michael@0 | 892 | // Inactivity time in milliseconds after which we shut down the OS.File worker. |
michael@0 | 893 | pref("osfile.reset_worker_delay", 5000); |
michael@0 | 894 | |
michael@0 | 895 | // APZC preferences. |
michael@0 | 896 | // |
michael@0 | 897 | // Gaia relies heavily on scroll events for now, so lets fire them |
michael@0 | 898 | // more often than the default value (100). |
michael@0 | 899 | pref("apz.asyncscroll.throttle", 40); |
michael@0 | 900 | pref("apz.pan_repaint_interval", 16); |
michael@0 | 901 | |
michael@0 | 902 | // Maximum fling velocity in inches/ms. Slower devices may need to reduce this |
michael@0 | 903 | // to avoid checkerboarding. Note, float value must be set as a string. |
michael@0 | 904 | pref("apz.max_velocity_inches_per_ms", "0.0375"); |
michael@0 | 905 | |
michael@0 | 906 | // Tweak default displayport values to reduce the risk of running out of |
michael@0 | 907 | // memory when zooming in |
michael@0 | 908 | pref("apz.x_skate_size_multiplier", "1.25"); |
michael@0 | 909 | pref("apz.y_skate_size_multiplier", "1.5"); |
michael@0 | 910 | pref("apz.x_stationary_size_multiplier", "1.5"); |
michael@0 | 911 | pref("apz.y_stationary_size_multiplier", "1.8"); |
michael@0 | 912 | pref("apz.enlarge_displayport_when_clipped", true); |
michael@0 | 913 | // Use "sticky" axis locking |
michael@0 | 914 | pref("apz.axis_lock_mode", 2); |
michael@0 | 915 | pref("apz.subframe.enabled", true); |
michael@0 | 916 | |
michael@0 | 917 | // This preference allows FirefoxOS apps (and content, I think) to force |
michael@0 | 918 | // the use of software (instead of hardware accelerated) 2D canvases by |
michael@0 | 919 | // creating a context like this: |
michael@0 | 920 | // |
michael@0 | 921 | // canvas.getContext('2d', { willReadFrequently: true }) |
michael@0 | 922 | // |
michael@0 | 923 | // Using a software canvas can save memory when JS calls getImageData() |
michael@0 | 924 | // on the canvas frequently. See bug 884226. |
michael@0 | 925 | pref("gfx.canvas.willReadFrequently.enable", true); |
michael@0 | 926 | |
michael@0 | 927 | // Disable autofocus until we can have it not bring up the keyboard. |
michael@0 | 928 | // https://bugzilla.mozilla.org/show_bug.cgi?id=965763 |
michael@0 | 929 | pref("browser.autofocus", false); |
michael@0 | 930 | |
michael@0 | 931 | // Enable wakelock |
michael@0 | 932 | pref("dom.wakelock.enabled", true); |
michael@0 | 933 | |
michael@0 | 934 | // Enable sync and mozId with Firefox Accounts. |
michael@0 | 935 | #ifdef MOZ_SERVICES_FXACCOUNTS |
michael@0 | 936 | pref("services.sync.fxaccounts.enabled", true); |
michael@0 | 937 | pref("identity.fxaccounts.enabled", true); |
michael@0 | 938 | #endif |