1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/b2g/app/b2g.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,938 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#filter substitution 1.9 + 1.10 +pref("toolkit.defaultChromeURI", "chrome://b2g/content/shell.html"); 1.11 +pref("browser.chromeURL", "chrome://b2g/content/"); 1.12 + 1.13 +// Bug 945235: Prevent all bars to be considered visible: 1.14 +pref("toolkit.defaultChromeFeatures", "chrome,dialog=no,close,resizable,scrollbars,extrachrome"); 1.15 + 1.16 +// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density. 1.17 +pref("browser.viewport.scaleRatio", -1); 1.18 + 1.19 +/* disable text selection */ 1.20 +pref("browser.ignoreNativeFrameTextSelection", true); 1.21 + 1.22 +/* cache prefs */ 1.23 +#ifdef MOZ_WIDGET_GONK 1.24 +pref("browser.cache.disk.enable", true); 1.25 +pref("browser.cache.disk.capacity", 55000); // kilobytes 1.26 +pref("browser.cache.disk.parent_directory", "/cache"); 1.27 +#endif 1.28 +pref("browser.cache.disk.smart_size.enabled", false); 1.29 +pref("browser.cache.disk.smart_size.first_run", false); 1.30 + 1.31 +pref("browser.cache.memory.enable", true); 1.32 +pref("browser.cache.memory.capacity", 1024); // kilobytes 1.33 + 1.34 +pref("browser.cache.memory_limit", 2048); // 2 MB 1.35 + 1.36 +/* image cache prefs */ 1.37 +pref("image.cache.size", 1048576); // bytes 1.38 +pref("image.high_quality_downscaling.enabled", false); 1.39 +pref("canvas.image.cache.limit", 10485760); // 10 MB 1.40 + 1.41 +/* offline cache prefs */ 1.42 +pref("browser.offline-apps.notify", false); 1.43 +pref("browser.cache.offline.enable", true); 1.44 +pref("offline-apps.allow_by_default", true); 1.45 + 1.46 +/* protocol warning prefs */ 1.47 +pref("network.protocol-handler.warn-external.tel", false); 1.48 +pref("network.protocol-handler.warn-external.mailto", false); 1.49 +pref("network.protocol-handler.warn-external.vnd.youtube", false); 1.50 + 1.51 +/* protocol expose prefs */ 1.52 +// By default, all protocol handlers are exposed. This means that the browser 1.53 +// will response to openURL commands for all URL types. It will also try to open 1.54 +// link clicks inside the browser before failing over to the system handlers. 1.55 +pref("network.protocol-handler.expose.rtsp", true); 1.56 + 1.57 +/* http prefs */ 1.58 +pref("network.http.pipelining", true); 1.59 +pref("network.http.pipelining.ssl", true); 1.60 +pref("network.http.proxy.pipelining", true); 1.61 +pref("network.http.pipelining.maxrequests" , 6); 1.62 +pref("network.http.keep-alive.timeout", 600); 1.63 +pref("network.http.max-connections", 20); 1.64 +pref("network.http.max-persistent-connections-per-server", 6); 1.65 +pref("network.http.max-persistent-connections-per-proxy", 20); 1.66 + 1.67 +// spdy 1.68 +pref("network.http.spdy.push-allowance", 32768); 1.69 + 1.70 +// See bug 545869 for details on why these are set the way they are 1.71 +pref("network.buffer.cache.count", 24); 1.72 +pref("network.buffer.cache.size", 16384); 1.73 + 1.74 +// predictive actions 1.75 +pref("network.seer.enable", false); // disabled on b2g 1.76 +pref("network.seer.max-db-size", 2097152); // bytes 1.77 +pref("network.seer.preserve", 50); // percentage of seer data to keep when cleaning up 1.78 + 1.79 +/* session history */ 1.80 +pref("browser.sessionhistory.max_total_viewers", 1); 1.81 +pref("browser.sessionhistory.max_entries", 50); 1.82 + 1.83 +/* session store */ 1.84 +pref("browser.sessionstore.resume_session_once", false); 1.85 +pref("browser.sessionstore.resume_from_crash", true); 1.86 +pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes 1.87 +pref("browser.sessionstore.interval", 10000); // milliseconds 1.88 +pref("browser.sessionstore.max_tabs_undo", 1); 1.89 + 1.90 +/* these should help performance */ 1.91 +pref("mozilla.widget.force-24bpp", true); 1.92 +pref("mozilla.widget.use-buffer-pixmap", true); 1.93 +pref("mozilla.widget.disable-native-theme", true); 1.94 +pref("layout.reflow.synthMouseMove", false); 1.95 +pref("layers.enable-tiles", true); 1.96 +/* 1.97 + Cross Process Mutex is not supported on Mac OS X so progressive 1.98 + paint can not be enabled for B2G on Mac OS X desktop 1.99 +*/ 1.100 +#ifdef MOZ_WIDGET_COCOA 1.101 +pref("layers.progressive-paint", false); 1.102 +#else 1.103 +pref("layers.progressive-paint", false); 1.104 +#endif 1.105 + 1.106 +/* download manager (don't show the window or alert) */ 1.107 +pref("browser.download.useDownloadDir", true); 1.108 +pref("browser.download.folderList", 1); // Default to ~/Downloads 1.109 +pref("browser.download.manager.showAlertOnComplete", false); 1.110 +pref("browser.download.manager.showAlertInterval", 2000); 1.111 +pref("browser.download.manager.retention", 2); 1.112 +pref("browser.download.manager.showWhenStarting", false); 1.113 +pref("browser.download.manager.closeWhenDone", true); 1.114 +pref("browser.download.manager.openDelay", 0); 1.115 +pref("browser.download.manager.focusWhenStarting", false); 1.116 +pref("browser.download.manager.flashCount", 2); 1.117 +pref("browser.download.manager.displayedHistoryDays", 7); 1.118 + 1.119 +/* download helper */ 1.120 +pref("browser.helperApps.deleteTempFileOnExit", false); 1.121 + 1.122 +/* password manager */ 1.123 +pref("signon.rememberSignons", true); 1.124 +pref("signon.expireMasterPassword", false); 1.125 + 1.126 +/* autocomplete */ 1.127 +pref("browser.formfill.enable", true); 1.128 + 1.129 +/* spellcheck */ 1.130 +pref("layout.spellcheckDefault", 0); 1.131 + 1.132 +/* block popups by default, and notify the user about blocked popups */ 1.133 +pref("dom.disable_open_during_load", true); 1.134 +pref("privacy.popups.showBrowserMessage", true); 1.135 + 1.136 +pref("keyword.enabled", true); 1.137 + 1.138 +pref("accessibility.typeaheadfind", false); 1.139 +pref("accessibility.typeaheadfind.timeout", 5000); 1.140 +pref("accessibility.typeaheadfind.flashBar", 1); 1.141 +pref("accessibility.typeaheadfind.linksonly", false); 1.142 +pref("accessibility.typeaheadfind.casesensitive", 0); 1.143 + 1.144 +// SSL error page behaviour 1.145 +pref("browser.ssl_override_behavior", 2); 1.146 +pref("browser.xul.error_pages.expert_bad_cert", false); 1.147 + 1.148 +// disable logging for the search service by default 1.149 +pref("browser.search.log", false); 1.150 + 1.151 +// disable updating 1.152 +pref("browser.search.update", false); 1.153 +pref("browser.search.update.log", false); 1.154 +pref("browser.search.updateinterval", 6); 1.155 + 1.156 +// enable search suggestions by default 1.157 +pref("browser.search.suggest.enabled", true); 1.158 + 1.159 +// tell the search service that we don't really expose the "current engine" 1.160 +pref("browser.search.noCurrentEngine", true); 1.161 + 1.162 +// Enable sparse localization by setting a few package locale overrides 1.163 +pref("chrome.override_package.global", "b2g-l10n"); 1.164 +pref("chrome.override_package.mozapps", "b2g-l10n"); 1.165 +pref("chrome.override_package.passwordmgr", "b2g-l10n"); 1.166 + 1.167 +// enable xul error pages 1.168 +pref("browser.xul.error_pages.enabled", true); 1.169 + 1.170 +// disable color management 1.171 +pref("gfx.color_management.mode", 0); 1.172 + 1.173 +// don't allow JS to move and resize existing windows 1.174 +pref("dom.disable_window_move_resize", true); 1.175 + 1.176 +// prevent click image resizing for nsImageDocument 1.177 +pref("browser.enable_click_image_resizing", false); 1.178 + 1.179 +// controls which bits of private data to clear. by default we clear them all. 1.180 +pref("privacy.item.cache", true); 1.181 +pref("privacy.item.cookies", true); 1.182 +pref("privacy.item.offlineApps", true); 1.183 +pref("privacy.item.history", true); 1.184 +pref("privacy.item.formdata", true); 1.185 +pref("privacy.item.downloads", true); 1.186 +pref("privacy.item.passwords", true); 1.187 +pref("privacy.item.sessions", true); 1.188 +pref("privacy.item.geolocation", true); 1.189 +pref("privacy.item.siteSettings", true); 1.190 +pref("privacy.item.syncAccount", true); 1.191 + 1.192 +// base url for the wifi geolocation network provider 1.193 +pref("geo.provider.use_mls", false); 1.194 +pref("geo.cell.scan", true); 1.195 +pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); 1.196 + 1.197 +// enable geo 1.198 +pref("geo.enabled", true); 1.199 + 1.200 +// content sink control -- controls responsiveness during page load 1.201 +// see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9 1.202 +pref("content.sink.enable_perf_mode", 2); // 0 - switch, 1 - interactive, 2 - perf 1.203 +pref("content.sink.pending_event_mode", 0); 1.204 +pref("content.sink.perf_deflect_count", 1000000); 1.205 +pref("content.sink.perf_parse_time", 50000000); 1.206 + 1.207 +// Maximum scripts runtime before showing an alert 1.208 +// Disable the watchdog thread for B2G. See bug 870043 comment 31. 1.209 +pref("dom.use_watchdog", false); 1.210 + 1.211 +// The slow script dialog can be triggered from inside the JS engine as well, 1.212 +// ensure that those calls don't accidentally trigger the dialog. 1.213 +pref("dom.max_script_run_time", 0); 1.214 +pref("dom.max_chrome_script_run_time", 0); 1.215 + 1.216 +// plugins 1.217 +pref("plugin.disable", true); 1.218 +pref("dom.ipc.plugins.enabled", true); 1.219 + 1.220 +// product URLs 1.221 +// The breakpad report server to link to in about:crashes 1.222 +pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/"); 1.223 +pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/"); 1.224 +pref("app.support.baseURL", "http://support.mozilla.com/b2g"); 1.225 +pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html"); 1.226 +pref("app.creditsURL", "http://www.mozilla.org/credits/"); 1.227 +pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/b2g/features/"); 1.228 +pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/b2g/faq/"); 1.229 + 1.230 +// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror) 1.231 +pref("security.alternate_certificate_error_page", "certerror"); 1.232 + 1.233 +pref("security.warn_viewing_mixed", false); // Warning is disabled. See Bug 616712. 1.234 + 1.235 +// Override some named colors to avoid inverse OS themes 1.236 +pref("ui.-moz-dialog", "#efebe7"); 1.237 +pref("ui.-moz-dialogtext", "#101010"); 1.238 +pref("ui.-moz-field", "#fff"); 1.239 +pref("ui.-moz-fieldtext", "#1a1a1a"); 1.240 +pref("ui.-moz-buttonhoverface", "#f3f0ed"); 1.241 +pref("ui.-moz-buttonhovertext", "#101010"); 1.242 +pref("ui.-moz-combobox", "#fff"); 1.243 +pref("ui.-moz-comboboxtext", "#101010"); 1.244 +pref("ui.buttonface", "#ece7e2"); 1.245 +pref("ui.buttonhighlight", "#fff"); 1.246 +pref("ui.buttonshadow", "#aea194"); 1.247 +pref("ui.buttontext", "#101010"); 1.248 +pref("ui.captiontext", "#101010"); 1.249 +pref("ui.graytext", "#b1a598"); 1.250 +pref("ui.highlighttext", "#1a1a1a"); 1.251 +pref("ui.threeddarkshadow", "#000"); 1.252 +pref("ui.threedface", "#ece7e2"); 1.253 +pref("ui.threedhighlight", "#fff"); 1.254 +pref("ui.threedlightshadow", "#ece7e2"); 1.255 +pref("ui.threedshadow", "#aea194"); 1.256 +pref("ui.windowframe", "#efebe7"); 1.257 + 1.258 +// Themable via mozSettings 1.259 +pref("ui.menu", "#f97c17"); 1.260 +pref("ui.menutext", "#ffffff"); 1.261 +pref("ui.infobackground", "#343e40"); 1.262 +pref("ui.infotext", "#686868"); 1.263 +pref("ui.window", "#ffffff"); 1.264 +pref("ui.windowtext", "#000000"); 1.265 +pref("ui.highlight", "#b2f2ff"); 1.266 + 1.267 +// replace newlines with spaces on paste into single-line text boxes 1.268 +pref("editor.singleLine.pasteNewlines", 2); 1.269 + 1.270 +// threshold where a tap becomes a drag, in 1/240" reference pixels 1.271 +// The names of the preferences are to be in sync with EventStateManager.cpp 1.272 +pref("ui.dragThresholdX", 25); 1.273 +pref("ui.dragThresholdY", 25); 1.274 + 1.275 +// Layers Acceleration. We can only have nice things on gonk, because 1.276 +// they're not maintained anywhere else. 1.277 +pref("layers.offmainthreadcomposition.enabled", true); 1.278 +#ifndef MOZ_WIDGET_GONK 1.279 +pref("dom.ipc.tabs.disabled", true); 1.280 +pref("layers.offmainthreadcomposition.async-animations", false); 1.281 +pref("layers.async-video.enabled", false); 1.282 +#else 1.283 +pref("dom.ipc.tabs.disabled", false); 1.284 +pref("layers.acceleration.disabled", false); 1.285 +pref("layers.offmainthreadcomposition.async-animations", true); 1.286 +pref("layers.async-video.enabled", true); 1.287 +pref("layers.async-pan-zoom.enabled", true); 1.288 +pref("gfx.content.azure.backends", "cairo"); 1.289 +#endif 1.290 + 1.291 +// Web Notifications 1.292 +pref("notification.feature.enabled", true); 1.293 + 1.294 +// IndexedDB 1.295 +pref("dom.indexedDB.warningQuota", 5); 1.296 + 1.297 +// prevent video elements from preloading too much data 1.298 +pref("media.preload.default", 1); // default to preload none 1.299 +pref("media.preload.auto", 2); // preload metadata if preload=auto 1.300 +pref("media.cache_size", 4096); // 4MB media cache 1.301 + 1.302 +// The default number of decoded video frames that are enqueued in 1.303 +// MediaDecoderReader's mVideoQueue. 1.304 +pref("media.video-queue.default-size", 3); 1.305 + 1.306 +// optimize images' memory usage 1.307 +pref("image.mem.decodeondraw", true); 1.308 +pref("image.mem.allow_locking_in_content_processes", false); /* don't allow image locking */ 1.309 +pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */ 1.310 +pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */ 1.311 +// 65MB seems reasonable and layout/reftests/bugs/370629-1.html requires more than 62MB 1.312 +pref("image.mem.hard_limit_decoded_image_kb", 66560); 1.313 +pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */ 1.314 + 1.315 +// XXX this isn't a good check for "are touch events supported", but 1.316 +// we don't really have a better one at the moment. 1.317 +// enable touch events interfaces 1.318 +pref("dom.w3c_touch_events.enabled", 1); 1.319 +pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240" 1.320 +pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240" 1.321 + 1.322 +#ifdef MOZ_SAFE_BROWSING 1.323 +// Safe browsing does nothing unless this pref is set 1.324 +pref("browser.safebrowsing.enabled", true); 1.325 + 1.326 +// Prevent loading of pages identified as malware 1.327 +pref("browser.safebrowsing.malware.enabled", true); 1.328 + 1.329 +// Non-enhanced mode (local url lists) URL list to check for updates 1.330 +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%"); 1.331 + 1.332 +pref("browser.safebrowsing.dataProvider", 0); 1.333 + 1.334 +// Does the provider name need to be localizable? 1.335 +pref("browser.safebrowsing.provider.0.name", "Google"); 1.336 +pref("browser.safebrowsing.provider.0.reportURL", "https://safebrowsing.google.com/safebrowsing/report?"); 1.337 +pref("browser.safebrowsing.provider.0.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2"); 1.338 + 1.339 +// HTML report pages 1.340 +pref("browser.safebrowsing.provider.0.reportGenericURL", "http://{moz:locale}.phish-generic.mozilla.com/?hl={moz:locale}"); 1.341 +pref("browser.safebrowsing.provider.0.reportErrorURL", "http://{moz:locale}.phish-error.mozilla.com/?hl={moz:locale}"); 1.342 +pref("browser.safebrowsing.provider.0.reportPhishURL", "http://{moz:locale}.phish-report.mozilla.com/?hl={moz:locale}"); 1.343 +pref("browser.safebrowsing.provider.0.reportMalwareURL", "http://{moz:locale}.malware-report.mozilla.com/?hl={moz:locale}"); 1.344 +pref("browser.safebrowsing.provider.0.reportMalwareErrorURL", "http://{moz:locale}.malware-error.mozilla.com/?hl={moz:locale}"); 1.345 + 1.346 +// FAQ URLs 1.347 + 1.348 +// Name of the about: page contributed by safebrowsing to handle display of error 1.349 +// pages on phishing/malware hits. (bug 399233) 1.350 +pref("urlclassifier.alternate_error_page", "blocked"); 1.351 + 1.352 +// The number of random entries to send with a gethash request. 1.353 +pref("urlclassifier.gethashnoise", 4); 1.354 + 1.355 +// If an urlclassifier table has not been updated in this number of seconds, 1.356 +// a gethash request will be forced to check that the result is still in 1.357 +// the database. 1.358 +pref("urlclassifier.max-complete-age", 2700); 1.359 + 1.360 +// URL for checking the reason for a malware warning. 1.361 +pref("browser.safebrowsing.malware.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site="); 1.362 +#endif 1.363 + 1.364 +// True if this is the first time we are showing about:firstrun 1.365 +pref("browser.firstrun.show.uidiscovery", true); 1.366 +pref("browser.firstrun.show.localepicker", true); 1.367 + 1.368 +// initiated by a user 1.369 +pref("content.ime.strict_policy", true); 1.370 + 1.371 +// True if you always want dump() to work 1.372 +// 1.373 +// On Android, you also need to do the following for the output 1.374 +// to show up in logcat: 1.375 +// 1.376 +// $ adb shell stop 1.377 +// $ adb shell setprop log.redirect-stdio true 1.378 +// $ adb shell start 1.379 +pref("browser.dom.window.dump.enabled", false); 1.380 + 1.381 +// Default Content Security Policy to apply to privileged and certified apps 1.382 +pref("security.apps.privileged.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'"); 1.383 +// If you change this CSP, make sure to update the fast path in nsCSPService.cpp 1.384 +pref("security.apps.certified.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self'"); 1.385 + 1.386 +// Temporarily force-enable GL compositing. This is default-disabled 1.387 +// deep within the bowels of the widgetry system. Remove me when GL 1.388 +// compositing isn't default disabled in widget/android. 1.389 +pref("layers.acceleration.force-enabled", true); 1.390 + 1.391 +// handle links targeting new windows 1.392 +// 1=current window/tab, 2=new window, 3=new tab in most recent window 1.393 +pref("browser.link.open_newwindow", 3); 1.394 + 1.395 +// 0: no restrictions - divert everything 1.396 +// 1: don't divert window.open at all 1.397 +// 2: don't divert window.open with features 1.398 +pref("browser.link.open_newwindow.restriction", 0); 1.399 + 1.400 +// Enable browser frames (including OOP, except on Windows, where it doesn't 1.401 +// work), but make in-process browser frames the default. 1.402 +pref("dom.mozBrowserFramesEnabled", true); 1.403 + 1.404 +// Enable a (virtually) unlimited number of mozbrowser processes. 1.405 +// We'll run out of PIDs on UNIX-y systems before we hit this limit. 1.406 +pref("dom.ipc.processCount", 100000); 1.407 + 1.408 +pref("dom.ipc.browser_frames.oop_by_default", false); 1.409 +pref("dom.browser_frames.useAsyncPanZoom", true); 1.410 + 1.411 +// SMS/MMS 1.412 +pref("dom.sms.enabled", true); 1.413 + 1.414 +//The waiting time in network manager. 1.415 +pref("network.gonk.ms-release-mms-connection", 30000); 1.416 + 1.417 +// WebContacts 1.418 +pref("dom.mozContacts.enabled", true); 1.419 +pref("dom.navigator-property.disable.mozContacts", false); 1.420 +pref("dom.global-constructor.disable.mozContact", false); 1.421 + 1.422 +// Shortnumber matching needed for e.g. Brazil: 1.423 +// 03187654321 can be found with 87654321 1.424 +pref("dom.phonenumber.substringmatching.BR", 8); 1.425 +pref("dom.phonenumber.substringmatching.CO", 10); 1.426 +pref("dom.phonenumber.substringmatching.VE", 7); 1.427 +pref("dom.phonenumber.substringmatching.CL", 8); 1.428 +pref("dom.phonenumber.substringmatching.PE", 7); 1.429 + 1.430 +// WebAlarms 1.431 +pref("dom.mozAlarms.enabled", true); 1.432 + 1.433 +// SimplePush 1.434 +pref("services.push.enabled", true); 1.435 +// Debugging enabled. 1.436 +pref("services.push.debug", false); 1.437 +// Is the network connection allowed to be up? 1.438 +// This preference should be used in UX to enable/disable push. 1.439 +pref("services.push.connection.enabled", true); 1.440 +// serverURL to be assigned by services team 1.441 +pref("services.push.serverURL", "wss://push.services.mozilla.com/"); 1.442 +pref("services.push.userAgentID", ""); 1.443 +// Exponential back-off start is 5 seconds like in HTTP/1.1. 1.444 +// Maximum back-off is pingInterval. 1.445 +pref("services.push.retryBaseInterval", 5000); 1.446 +// Interval at which to ping PushServer to check connection status. In 1.447 +// milliseconds. If no reply is received within requestTimeout, the connection 1.448 +// is considered closed. 1.449 +pref("services.push.pingInterval", 1800000); // 30 minutes 1.450 +// How long before a DOMRequest errors as timeout 1.451 +pref("services.push.requestTimeout", 10000); 1.452 +// enable udp wakeup support 1.453 +pref("services.push.udp.wakeupEnabled", true); 1.454 + 1.455 +// NetworkStats 1.456 +#ifdef MOZ_WIDGET_GONK 1.457 +pref("dom.mozNetworkStats.enabled", true); 1.458 +pref("dom.webapps.firstRunWithSIM", true); 1.459 +#endif 1.460 + 1.461 +#ifdef MOZ_B2G_RIL 1.462 +// SingleVariant 1.463 +pref("dom.mozApps.single_variant_sourcedir", "/persist/svoperapps"); 1.464 +#endif 1.465 + 1.466 +// WebSettings 1.467 +pref("dom.mozSettings.enabled", true); 1.468 +pref("dom.navigator-property.disable.mozSettings", false); 1.469 +pref("dom.mozPermissionSettings.enabled", true); 1.470 + 1.471 +// controls if we want camera support 1.472 +pref("device.camera.enabled", true); 1.473 +pref("media.realtime_decoder.enabled", true); 1.474 + 1.475 +// TCPSocket 1.476 +pref("dom.mozTCPSocket.enabled", true); 1.477 + 1.478 +// WebPayment 1.479 +pref("dom.mozPay.enabled", true); 1.480 + 1.481 +// "Preview" landing of bug 710563, which is bogged down in analysis 1.482 +// of talos regression. This is a needed change for higher-framerate 1.483 +// CSS animations, and incidentally works around an apparent bug in 1.484 +// our handling of requestAnimationFrame() listeners, which are 1.485 +// supposed to enable this REPEATING_PRECISE_CAN_SKIP behavior. The 1.486 +// secondary bug isn't really worth investigating since it's obseleted 1.487 +// by bug 710563. 1.488 +pref("layout.frame_rate.precise", true); 1.489 + 1.490 +// Handle hardware buttons in the b2g chrome package 1.491 +pref("b2g.keys.menu.enabled", true); 1.492 + 1.493 +// Screen timeout in seconds 1.494 +pref("power.screen.timeout", 60); 1.495 + 1.496 +pref("full-screen-api.enabled", true); 1.497 + 1.498 +#ifndef MOZ_WIDGET_GONK 1.499 +// If we're not actually on physical hardware, don't make the top level widget 1.500 +// fullscreen when transitioning to fullscreen. This means in emulated 1.501 +// environments (like the b2g desktop client) we won't make the client window 1.502 +// fill the whole screen, we'll just make the content fill the client window, 1.503 +// i.e. it won't give the impression to content that the number of device 1.504 +// screen pixels changes! 1.505 +pref("full-screen-api.ignore-widgets", true); 1.506 +#endif 1.507 + 1.508 +pref("media.volume.steps", 10); 1.509 + 1.510 +#ifdef ENABLE_MARIONETTE 1.511 +//Enable/disable marionette server, set listening port 1.512 +pref("marionette.defaultPrefs.enabled", true); 1.513 +pref("marionette.defaultPrefs.port", 2828); 1.514 +#ifndef MOZ_WIDGET_GONK 1.515 +// On desktop builds, we need to force the socket to listen on localhost only 1.516 +pref("marionette.force-local", true); 1.517 +#endif 1.518 +#endif 1.519 + 1.520 +#ifdef MOZ_UPDATER 1.521 +// When we're applying updates, we can't let anything hang us on 1.522 +// quit+restart. The user has no recourse. 1.523 +pref("shutdown.watchdog.timeoutSecs", 5); 1.524 +// Timeout before the update prompt automatically installs the update 1.525 +pref("b2g.update.apply-prompt-timeout", 60000); // milliseconds 1.526 +// Amount of time to wait after the user is idle before prompting to apply an update 1.527 +pref("b2g.update.apply-idle-timeout", 600000); // milliseconds 1.528 +// Amount of time after which connection will be restarted if no progress 1.529 +pref("b2g.update.download-watchdog-timeout", 120000); // milliseconds 1.530 +pref("b2g.update.download-watchdog-max-retries", 5); 1.531 + 1.532 +pref("app.update.enabled", true); 1.533 +pref("app.update.auto", false); 1.534 +pref("app.update.silent", false); 1.535 +pref("app.update.mode", 0); 1.536 +pref("app.update.incompatible.mode", 0); 1.537 +pref("app.update.staging.enabled", true); 1.538 +pref("app.update.service.enabled", true); 1.539 + 1.540 +// The URL hosting the update manifest. 1.541 +pref("app.update.url", "http://update.boot2gecko.org/%CHANNEL%/update.xml"); 1.542 +pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@"); 1.543 + 1.544 +// Interval at which update manifest is fetched. In units of seconds. 1.545 +pref("app.update.interval", 86400); // 1 day 1.546 +// Don't throttle background updates. 1.547 +pref("app.update.download.backgroundInterval", 0); 1.548 + 1.549 +// Retry update socket connections every 30 seconds in the cases of certain kinds of errors 1.550 +pref("app.update.socket.retryTimeout", 30000); 1.551 + 1.552 +// Max of 20 consecutive retries (total 10 minutes) before giving up and marking 1.553 +// the update download as failed. 1.554 +// Note: Offline errors will always retry when the network comes online. 1.555 +pref("app.update.socket.maxErrors", 20); 1.556 + 1.557 +// Enable update logging for now, to diagnose growing pains in the 1.558 +// field. 1.559 +pref("app.update.log", true); 1.560 +#else 1.561 +// Explicitly disable the shutdown watchdog. It's enabled by default. 1.562 +// When the updater is disabled, we want to know about shutdown hangs. 1.563 +pref("shutdown.watchdog.timeoutSecs", -1); 1.564 +#endif 1.565 + 1.566 +// Check daily for apps updates. 1.567 +pref("webapps.update.interval", 86400); 1.568 + 1.569 +// Extensions preferences 1.570 +pref("extensions.update.enabled", false); 1.571 +pref("extensions.getAddons.cache.enabled", false); 1.572 + 1.573 +// Context Menu 1.574 +pref("ui.click_hold_context_menus", true); 1.575 +pref("ui.click_hold_context_menus.delay", 750); 1.576 + 1.577 +// Enable device storage 1.578 +pref("device.storage.enabled", true); 1.579 + 1.580 +// Enable pre-installed applications 1.581 +pref("dom.webapps.useCurrentProfile", true); 1.582 + 1.583 +// Enable system message 1.584 +pref("dom.sysmsg.enabled", true); 1.585 +pref("media.plugins.enabled", false); 1.586 +pref("media.omx.enabled", true); 1.587 +pref("media.rtsp.enabled", true); 1.588 +pref("media.rtsp.video.enabled", true); 1.589 + 1.590 +// Disable printing (particularly, window.print()) 1.591 +pref("dom.disable_window_print", true); 1.592 + 1.593 +// Disable window.showModalDialog 1.594 +pref("dom.disable_window_showModalDialog", true); 1.595 + 1.596 +// Enable new experimental html forms 1.597 +pref("dom.experimental_forms", true); 1.598 +pref("dom.forms.number", true); 1.599 + 1.600 +// Don't enable <input type=color> yet as we don't have a color picker 1.601 +// implemented for b2g (bug 875751) 1.602 +pref("dom.forms.color", false); 1.603 + 1.604 +// Turns on gralloc-based direct texturing for Gonk 1.605 +pref("gfx.gralloc.enabled", false); 1.606 + 1.607 +// This preference instructs the JS engine to discard the 1.608 +// source of any privileged JS after compilation. This saves 1.609 +// memory, but makes things like Function.prototype.toSource() 1.610 +// fail. 1.611 +pref("javascript.options.discardSystemSource", true); 1.612 + 1.613 +// XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging 1.614 +pref("javascript.options.mem.log", false); 1.615 + 1.616 +// Increase mark slice time from 10ms to 30ms 1.617 +pref("javascript.options.mem.gc_incremental_slice_ms", 30); 1.618 + 1.619 +// Increase time to get more high frequency GC on benchmarks from 1000ms to 1500ms 1.620 +pref("javascript.options.mem.gc_high_frequency_time_limit_ms", 1500); 1.621 + 1.622 +pref("javascript.options.mem.gc_high_frequency_heap_growth_max", 300); 1.623 +pref("javascript.options.mem.gc_high_frequency_heap_growth_min", 120); 1.624 +pref("javascript.options.mem.gc_high_frequency_high_limit_mb", 40); 1.625 +pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 0); 1.626 +pref("javascript.options.mem.gc_low_frequency_heap_growth", 120); 1.627 +pref("javascript.options.mem.high_water_mark", 6); 1.628 +pref("javascript.options.mem.gc_allocation_threshold_mb", 1); 1.629 +pref("javascript.options.mem.gc_decommit_threshold_mb", 1); 1.630 + 1.631 +// Show/Hide scrollbars when active/inactive 1.632 +pref("ui.showHideScrollbars", 1); 1.633 +pref("ui.useOverlayScrollbars", 1); 1.634 + 1.635 +// Enable the ProcessPriorityManager, and give processes with no visible 1.636 +// documents a 1s grace period before they're eligible to be marked as 1.637 +// background. Background processes that are perceivable due to playing 1.638 +// media are given a longer grace period to accomodate changing tracks, etc. 1.639 +pref("dom.ipc.processPriorityManager.enabled", true); 1.640 +pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000); 1.641 +pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000); 1.642 +pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000); 1.643 + 1.644 +// Number of different background levels for background processes. We use 1.645 +// these different levels to force the low-memory killer to kill processes in 1.646 +// a LRU order. 1.647 +pref("dom.ipc.processPriorityManager.backgroundLRUPoolLevels", 5); 1.648 + 1.649 +// Kernel parameters for process priorities. These affect how processes are 1.650 +// killed on low-memory and their relative CPU priorities. 1.651 +// 1.652 +// Note: The maximum nice value on Linux is 19, but the max value you should 1.653 +// use here is 18. NSPR adds 1 to some threads' nice values, to mark 1.654 +// low-priority threads. If the process priority manager were to renice a 1.655 +// process (and all its threads) to 19, all threads would have the same 1.656 +// niceness. Then when we reniced the process to (say) 10, all threads would 1.657 +// /still/ have the same niceness; we'd effectively have erased NSPR's thread 1.658 +// priorities. 1.659 + 1.660 +// The kernel can only accept 6 (OomScoreAdjust, KillUnderKB) pairs. But it is 1.661 +// okay, kernel will still kill processes with larger OomScoreAdjust first even 1.662 +// its OomScoreAdjust don't have a corresponding KillUnderKB. 1.663 + 1.664 +pref("hal.processPriorityManager.gonk.MASTER.OomScoreAdjust", 0); 1.665 +pref("hal.processPriorityManager.gonk.MASTER.KillUnderKB", 4096); 1.666 +pref("hal.processPriorityManager.gonk.MASTER.Nice", 0); 1.667 + 1.668 +pref("hal.processPriorityManager.gonk.PREALLOC.OomScoreAdjust", 67); 1.669 +pref("hal.processPriorityManager.gonk.PREALLOC.Nice", 18); 1.670 + 1.671 +pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.OomScoreAdjust", 67); 1.672 +pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.KillUnderKB", 5120); 1.673 +pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.Nice", 0); 1.674 + 1.675 +pref("hal.processPriorityManager.gonk.FOREGROUND.OomScoreAdjust", 134); 1.676 +pref("hal.processPriorityManager.gonk.FOREGROUND.KillUnderKB", 6144); 1.677 +pref("hal.processPriorityManager.gonk.FOREGROUND.Nice", 1); 1.678 + 1.679 +pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.OomScoreAdjust", 200); 1.680 +pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.Nice", 1); 1.681 + 1.682 +pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.OomScoreAdjust", 400); 1.683 +pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.KillUnderKB", 7168); 1.684 +pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.Nice", 7); 1.685 + 1.686 +pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.OomScoreAdjust", 534); 1.687 +pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.KillUnderKB", 8192); 1.688 +pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.Nice", 18); 1.689 + 1.690 +pref("hal.processPriorityManager.gonk.BACKGROUND.OomScoreAdjust", 667); 1.691 +pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderKB", 20480); 1.692 +pref("hal.processPriorityManager.gonk.BACKGROUND.Nice", 18); 1.693 + 1.694 +// Processes get this niceness when they have low CPU priority. 1.695 +pref("hal.processPriorityManager.gonk.LowCPUNice", 18); 1.696 + 1.697 +// Fire a memory pressure event when the system has less than Xmb of memory 1.698 +// remaining. You should probably set this just above Y.KillUnderKB for 1.699 +// the highest priority class Y that you want to make an effort to keep alive. 1.700 +// (For example, we want BACKGROUND_PERCEIVABLE to stay alive.) If you set 1.701 +// this too high, then we'll send out a memory pressure event every Z seconds 1.702 +// (see below), even while we have processes that we would happily kill in 1.703 +// order to free up memory. 1.704 +pref("hal.processPriorityManager.gonk.notifyLowMemUnderKB", 14336); 1.705 + 1.706 +// We wait this long before polling the memory-pressure fd after seeing one 1.707 +// memory pressure event. (When we're not under memory pressure, we sit 1.708 +// blocked on a poll(), and this pref has no effect.) 1.709 +pref("gonk.systemMemoryPressureRecoveryPollMS", 5000); 1.710 + 1.711 +#ifndef DEBUG 1.712 +// Enable pre-launching content processes for improved startup time 1.713 +// (hiding latency). 1.714 +pref("dom.ipc.processPrelaunch.enabled", true); 1.715 +// Wait this long before pre-launching a new subprocess. 1.716 +pref("dom.ipc.processPrelaunch.delayMs", 5000); 1.717 +#endif 1.718 + 1.719 +pref("dom.ipc.reuse_parent_app", false); 1.720 + 1.721 +// When a process receives a system message, we hold a CPU wake lock on its 1.722 +// behalf for this many seconds, or until it handles the system message, 1.723 +// whichever comes first. 1.724 +pref("dom.ipc.systemMessageCPULockTimeoutSec", 30); 1.725 + 1.726 +// Ignore the "dialog=1" feature in window.open. 1.727 +pref("dom.disable_window_open_dialog_feature", true); 1.728 + 1.729 +// Screen reader support 1.730 +pref("accessibility.accessfu.activate", 2); 1.731 +pref("accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement,Landmark,ListItem"); 1.732 +// Setting for an utterance order (0 - description first, 1 - description last). 1.733 +pref("accessibility.accessfu.utterance", 1); 1.734 +// Whether to skip images with empty alt text 1.735 +pref("accessibility.accessfu.skip_empty_images", true); 1.736 + 1.737 +// Enable hit-target fluffing 1.738 +pref("ui.touch.radius.enabled", true); 1.739 +pref("ui.touch.radius.leftmm", 3); 1.740 +pref("ui.touch.radius.topmm", 5); 1.741 +pref("ui.touch.radius.rightmm", 3); 1.742 +pref("ui.touch.radius.bottommm", 2); 1.743 + 1.744 +pref("ui.mouse.radius.enabled", true); 1.745 +pref("ui.mouse.radius.leftmm", 3); 1.746 +pref("ui.mouse.radius.topmm", 5); 1.747 +pref("ui.mouse.radius.rightmm", 3); 1.748 +pref("ui.mouse.radius.bottommm", 2); 1.749 + 1.750 +// Disable native prompt 1.751 +pref("browser.prompt.allowNative", false); 1.752 + 1.753 +// Minimum delay in milliseconds between network activity notifications (0 means 1.754 +// no notifications). The delay is the same for both download and upload, though 1.755 +// they are handled separately. This pref is only read once at startup: 1.756 +// a restart is required to enable a new value. 1.757 +pref("network.activity.blipIntervalMilliseconds", 250); 1.758 + 1.759 +// By default we want the NetworkManager service to manage Gecko's offline 1.760 +// status for us according to the state of Wifi/cellular data connections. 1.761 +// In some environments, such as the emulator or hardware with other network 1.762 +// connectivity, this is not desireable, however, in which case this pref 1.763 +// can be flipped to false. 1.764 +pref("network.gonk.manage-offline-status", true); 1.765 + 1.766 +pref("jsloader.reuseGlobal", true); 1.767 + 1.768 +// Enable font inflation for browser tab content. 1.769 +pref("font.size.inflation.minTwips", 120); 1.770 +// And disable it for lingering master-process UI. 1.771 +pref("font.size.inflation.disabledInMasterProcess", true); 1.772 + 1.773 +// Enable freeing dirty pages when minimizing memory; this reduces memory 1.774 +// consumption when applications are sent to the background. 1.775 +pref("memory.free_dirty_pages", true); 1.776 + 1.777 +// Enable the Linux-specific, system-wide memory reporter. 1.778 +pref("memory.system_memory_reporter", true); 1.779 + 1.780 +// Don't dump memory reports on OOM, by default. 1.781 +pref("memory.dump_reports_on_oom", false); 1.782 + 1.783 +pref("layout.imagevisibility.enabled", true); 1.784 +pref("layout.imagevisibility.numscrollportwidths", 1); 1.785 +pref("layout.imagevisibility.numscrollportheights", 1); 1.786 + 1.787 +// Enable native identity (persona/browserid) 1.788 +pref("dom.identity.enabled", true); 1.789 + 1.790 +// Wait up to this much milliseconds when orientation changed 1.791 +pref("layers.orientation.sync.timeout", 1000); 1.792 + 1.793 +// Don't discard WebGL contexts for foreground apps on memory 1.794 +// pressure. 1.795 +pref("webgl.can-lose-context-in-foreground", false); 1.796 + 1.797 +// Allow nsMemoryInfoDumper to create a fifo in the temp directory. We use 1.798 +// this fifo to trigger about:memory dumps, among other things. 1.799 +pref("memory_info_dumper.watch_fifo.enabled", true); 1.800 +pref("memory_info_dumper.watch_fifo.directory", "/data/local"); 1.801 + 1.802 +// See ua-update.json.in for the packaged UA override list 1.803 +pref("general.useragent.updates.enabled", true); 1.804 +pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%"); 1.805 +pref("general.useragent.updates.interval", 604800); // 1 week 1.806 +pref("general.useragent.updates.retry", 86400); // 1 day 1.807 + 1.808 +// Make <audio> and <video> talk to the AudioChannelService. 1.809 +pref("media.useAudioChannelService", true); 1.810 + 1.811 +pref("b2g.version", @MOZ_B2G_VERSION@); 1.812 + 1.813 +// Disable console buffering to save memory. 1.814 +pref("consoleservice.buffered", false); 1.815 + 1.816 +#ifdef MOZ_WIDGET_GONK 1.817 +// Performance testing suggests 2k is a better page size for SQLite. 1.818 +pref("toolkit.storage.pageSize", 2048); 1.819 +#endif 1.820 + 1.821 +// Enable captive portal detection. 1.822 +pref("captivedetect.canonicalURL", "http://detectportal.firefox.com/success.txt"); 1.823 +pref("captivedetect.canonicalContent", "success\n"); 1.824 + 1.825 +// The url of the manifest we use for ADU pings. 1.826 +pref("ping.manifestURL", "https://marketplace.firefox.com/packaged.webapp"); 1.827 + 1.828 +// Enable the disk space watcher 1.829 +pref("disk_space_watcher.enabled", true); 1.830 + 1.831 +// SNTP preferences. 1.832 +pref("network.sntp.maxRetryCount", 10); 1.833 +pref("network.sntp.refreshPeriod", 86400); // In seconds. 1.834 +pref("network.sntp.pools", // Servers separated by ';'. 1.835 + "0.pool.ntp.org;1.pool.ntp.org;2.pool.ntp.org;3.pool.ntp.org"); 1.836 +pref("network.sntp.port", 123); 1.837 +pref("network.sntp.timeout", 30); // In seconds. 1.838 + 1.839 +// Enable dataStore 1.840 +pref("dom.datastore.enabled", true); 1.841 + 1.842 +// DOM Inter-App Communication API. 1.843 +pref("dom.inter-app-communication-api.enabled", true); 1.844 + 1.845 +// Allow ADB to run for this many hours before disabling 1.846 +// (only applies when marionette is disabled) 1.847 +// 0 disables the timer. 1.848 +pref("b2g.adb.timeout-hours", 12); 1.849 + 1.850 +// InputMethod so we can do soft keyboards 1.851 +pref("dom.mozInputMethod.enabled", true); 1.852 + 1.853 +// Absolute path to the devtool unix domain socket file used 1.854 +// to communicate with a usb cable via adb forward 1.855 +pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket"); 1.856 + 1.857 +// enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases, 1.858 +// falling back to Skia/software for smaller canvases 1.859 +#ifdef MOZ_WIDGET_GONK 1.860 +pref("gfx.canvas.azure.backends", "skia"); 1.861 +pref("gfx.canvas.azure.accelerated", true); 1.862 +#endif 1.863 + 1.864 +// Turn on dynamic cache size for Skia 1.865 +pref("gfx.canvas.skiagl.dynamic-cache", true); 1.866 + 1.867 +// Limit skia to canvases the size of the device screen or smaller 1.868 +pref("gfx.canvas.max-size-for-skia-gl", -1); 1.869 + 1.870 +// enable fence with readpixels for SurfaceStream 1.871 +pref("gfx.gralloc.fence-with-readpixels", true); 1.872 + 1.873 +// Cell Broadcast API 1.874 +pref("ril.cellbroadcast.disabled", false); 1.875 + 1.876 +// The url of the page used to display network error details. 1.877 +pref("b2g.neterror.url", "app://system.gaiamobile.org/net_error.html"); 1.878 + 1.879 +// Enable Web Speech synthesis API 1.880 +pref("media.webspeech.synth.enabled", true); 1.881 + 1.882 +// Downloads API 1.883 +pref("dom.mozDownloads.enabled", true); 1.884 +pref("dom.downloads.max_retention_days", 7); 1.885 + 1.886 +// External Helper Application Handling 1.887 +// 1.888 +// All external helper application handling can require the docshell to be 1.889 +// active before allowing the external helper app service to handle content. 1.890 +// 1.891 +// To prevent SD card DoS attacks via downloads we disable background handling. 1.892 +// 1.893 +pref("security.exthelperapp.disable_background_handling", true); 1.894 + 1.895 +// Inactivity time in milliseconds after which we shut down the OS.File worker. 1.896 +pref("osfile.reset_worker_delay", 5000); 1.897 + 1.898 +// APZC preferences. 1.899 +// 1.900 +// Gaia relies heavily on scroll events for now, so lets fire them 1.901 +// more often than the default value (100). 1.902 +pref("apz.asyncscroll.throttle", 40); 1.903 +pref("apz.pan_repaint_interval", 16); 1.904 + 1.905 +// Maximum fling velocity in inches/ms. Slower devices may need to reduce this 1.906 +// to avoid checkerboarding. Note, float value must be set as a string. 1.907 +pref("apz.max_velocity_inches_per_ms", "0.0375"); 1.908 + 1.909 +// Tweak default displayport values to reduce the risk of running out of 1.910 +// memory when zooming in 1.911 +pref("apz.x_skate_size_multiplier", "1.25"); 1.912 +pref("apz.y_skate_size_multiplier", "1.5"); 1.913 +pref("apz.x_stationary_size_multiplier", "1.5"); 1.914 +pref("apz.y_stationary_size_multiplier", "1.8"); 1.915 +pref("apz.enlarge_displayport_when_clipped", true); 1.916 +// Use "sticky" axis locking 1.917 +pref("apz.axis_lock_mode", 2); 1.918 +pref("apz.subframe.enabled", true); 1.919 + 1.920 +// This preference allows FirefoxOS apps (and content, I think) to force 1.921 +// the use of software (instead of hardware accelerated) 2D canvases by 1.922 +// creating a context like this: 1.923 +// 1.924 +// canvas.getContext('2d', { willReadFrequently: true }) 1.925 +// 1.926 +// Using a software canvas can save memory when JS calls getImageData() 1.927 +// on the canvas frequently. See bug 884226. 1.928 +pref("gfx.canvas.willReadFrequently.enable", true); 1.929 + 1.930 +// Disable autofocus until we can have it not bring up the keyboard. 1.931 +// https://bugzilla.mozilla.org/show_bug.cgi?id=965763 1.932 +pref("browser.autofocus", false); 1.933 + 1.934 +// Enable wakelock 1.935 +pref("dom.wakelock.enabled", true); 1.936 + 1.937 +// Enable sync and mozId with Firefox Accounts. 1.938 +#ifdef MOZ_SERVICES_FXACCOUNTS 1.939 +pref("services.sync.fxaccounts.enabled", true); 1.940 +pref("identity.fxaccounts.enabled", true); 1.941 +#endif