Merge b2g-inbound to m-c.
[gecko.git] / b2g / app / b2g.js
blob79bc44b97f896bd6e964b9f0d624f3a1b27f6b58
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #filter substitution
7 pref("toolkit.defaultChromeURI", "chrome://browser/content/shell.html");
8 pref("browser.chromeURL", "chrome://browser/content/");
10 // Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
11 pref("browser.viewport.scaleRatio", -1);
13 /* disable text selection */
14 pref("browser.ignoreNativeFrameTextSelection", true);
16 /* cache prefs */
17 #ifdef MOZ_WIDGET_GONK
18 pref("browser.cache.disk.enable", true);
19 pref("browser.cache.disk.capacity", 55000); // kilobytes
20 pref("browser.cache.disk.parent_directory", "/cache");
21 #endif
22 pref("browser.cache.disk.smart_size.enabled", false);
23 pref("browser.cache.disk.smart_size.first_run", false);
25 pref("browser.cache.memory.enable", true);
26 pref("browser.cache.memory.capacity", 1024); // kilobytes
28 /* image cache prefs */
29 pref("image.cache.size", 1048576); // bytes
30 pref("image.high_quality_downscaling.enabled", false);
31 pref("canvas.image.cache.limit", 10485760); // 10 MB
33 /* offline cache prefs */
34 pref("browser.offline-apps.notify", false);
35 pref("browser.cache.offline.enable", true);
36 pref("offline-apps.allow_by_default", true);
38 /* protocol warning prefs */
39 pref("network.protocol-handler.warn-external.tel", false);
40 pref("network.protocol-handler.warn-external.mailto", false);
41 pref("network.protocol-handler.warn-external.vnd.youtube", false);
43 /* http prefs */
44 pref("network.http.pipelining", true);
45 pref("network.http.pipelining.ssl", true);
46 pref("network.http.proxy.pipelining", true);
47 pref("network.http.pipelining.maxrequests" , 6);
48 pref("network.http.keep-alive.timeout", 600);
49 pref("network.http.max-connections", 20);
50 pref("network.http.max-persistent-connections-per-server", 6);
51 pref("network.http.max-persistent-connections-per-proxy", 20);
53 // spdy
54 pref("network.http.spdy.push-allowance", 32768);
56 // See bug 545869 for details on why these are set the way they are
57 pref("network.buffer.cache.count", 24);
58 pref("network.buffer.cache.size",  16384);
60 /* session history */
61 pref("browser.sessionhistory.max_total_viewers", 1);
62 pref("browser.sessionhistory.max_entries", 50);
64 /* session store */
65 pref("browser.sessionstore.resume_session_once", false);
66 pref("browser.sessionstore.resume_from_crash", true);
67 pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
68 pref("browser.sessionstore.interval", 10000); // milliseconds
69 pref("browser.sessionstore.max_tabs_undo", 1);
71 /* these should help performance */
72 pref("mozilla.widget.force-24bpp", true);
73 pref("mozilla.widget.use-buffer-pixmap", true);
74 pref("mozilla.widget.disable-native-theme", true);
75 pref("layout.reflow.synthMouseMove", false);
76 pref("layers.force-tiles", false);
78 /* download manager (don't show the window or alert) */
79 pref("browser.download.useDownloadDir", true);
80 pref("browser.download.folderList", 1); // Default to ~/Downloads
81 pref("browser.download.manager.showAlertOnComplete", false);
82 pref("browser.download.manager.showAlertInterval", 2000);
83 pref("browser.download.manager.retention", 2);
84 pref("browser.download.manager.showWhenStarting", false);
85 pref("browser.download.manager.closeWhenDone", true);
86 pref("browser.download.manager.openDelay", 0);
87 pref("browser.download.manager.focusWhenStarting", false);
88 pref("browser.download.manager.flashCount", 2);
89 pref("browser.download.manager.displayedHistoryDays", 7);
91 /* download helper */
92 pref("browser.helperApps.deleteTempFileOnExit", false);
94 /* password manager */
95 pref("signon.rememberSignons", true);
96 pref("signon.expireMasterPassword", false);
97 pref("signon.SignonFileName", "signons.txt");
99 /* autocomplete */
100 pref("browser.formfill.enable", true);
102 /* spellcheck */
103 pref("layout.spellcheckDefault", 0);
105 /* block popups by default, and notify the user about blocked popups */
106 pref("dom.disable_open_during_load", true);
107 pref("privacy.popups.showBrowserMessage", true);
109 pref("keyword.enabled", true);
111 pref("accessibility.typeaheadfind", false);
112 pref("accessibility.typeaheadfind.timeout", 5000);
113 pref("accessibility.typeaheadfind.flashBar", 1);
114 pref("accessibility.typeaheadfind.linksonly", false);
115 pref("accessibility.typeaheadfind.casesensitive", 0);
117 // pointer to the default engine name
118 pref("browser.search.defaultenginename", "chrome://browser/locale/region.properties");
120 // SSL error page behaviour
121 pref("browser.ssl_override_behavior", 2);
122 pref("browser.xul.error_pages.expert_bad_cert", false);
124 // disable logging for the search service by default
125 pref("browser.search.log", false);
127 // disable updating
128 pref("browser.search.update", false);
129 pref("browser.search.update.log", false);
130 pref("browser.search.updateinterval", 6);
132 // enable search suggestions by default
133 pref("browser.search.suggest.enabled", true);
135 // tell the search service that we don't really expose the "current engine"
136 pref("browser.search.noCurrentEngine", true);
138 // enable xul error pages
139 pref("browser.xul.error_pages.enabled", true);
141 // disable color management
142 pref("gfx.color_management.mode", 0);
144 // don't allow JS to move and resize existing windows
145 pref("dom.disable_window_move_resize", true);
147 // prevent click image resizing for nsImageDocument
148 pref("browser.enable_click_image_resizing", false);
150 // controls which bits of private data to clear. by default we clear them all.
151 pref("privacy.item.cache", true);
152 pref("privacy.item.cookies", true);
153 pref("privacy.item.offlineApps", true);
154 pref("privacy.item.history", true);
155 pref("privacy.item.formdata", true);
156 pref("privacy.item.downloads", true);
157 pref("privacy.item.passwords", true);
158 pref("privacy.item.sessions", true);
159 pref("privacy.item.geolocation", true);
160 pref("privacy.item.siteSettings", true);
161 pref("privacy.item.syncAccount", true);
163 // URL to the Learn More link XXX this is the firefox one.  Bug 495578 fixes this.
164 pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
166 // base url for the wifi geolocation network provider
167 pref("geo.wifi.uri", "https://maps.googleapis.com/maps/api/browserlocation/json");
169 // enable geo
170 pref("geo.enabled", true);
172 // content sink control -- controls responsiveness during page load
173 // see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
174 pref("content.sink.enable_perf_mode",  2); // 0 - switch, 1 - interactive, 2 - perf
175 pref("content.sink.pending_event_mode", 0);
176 pref("content.sink.perf_deflect_count", 1000000);
177 pref("content.sink.perf_parse_time", 50000000);
179 // Maximum scripts runtime before showing an alert
180 pref("dom.max_chrome_script_run_time", 0); // disable slow script dialog for chrome
181 // Disable the watchdog thread for B2G. See bug 870043 comment 31.
182 pref("dom.use_watchdog", false);
184 // plugins
185 pref("plugin.disable", true);
186 pref("dom.ipc.plugins.enabled", true);
188 // product URLs
189 // The breakpad report server to link to in about:crashes
190 pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");
191 pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/");
192 pref("app.support.baseURL", "http://support.mozilla.com/b2g");
193 pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html");
194 pref("app.creditsURL", "http://www.mozilla.org/credits/");
195 pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/b2g/features/");
196 pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/b2g/faq/");
198 // Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
199 pref("security.alternate_certificate_error_page", "certerror");
201 pref("security.warn_viewing_mixed", false); // Warning is disabled.  See Bug 616712.
203 // Override some named colors to avoid inverse OS themes
204 pref("ui.-moz-dialog", "#efebe7");
205 pref("ui.-moz-dialogtext", "#101010");
206 pref("ui.-moz-field", "#fff");
207 pref("ui.-moz-fieldtext", "#1a1a1a");
208 pref("ui.-moz-buttonhoverface", "#f3f0ed");
209 pref("ui.-moz-buttonhovertext", "#101010");
210 pref("ui.-moz-combobox", "#fff");
211 pref("ui.-moz-comboboxtext", "#101010");
212 pref("ui.buttonface", "#ece7e2");
213 pref("ui.buttonhighlight", "#fff");
214 pref("ui.buttonshadow", "#aea194");
215 pref("ui.buttontext", "#101010");
216 pref("ui.captiontext", "#101010");
217 pref("ui.graytext", "#b1a598");
218 pref("ui.highlight", "#fad184");
219 pref("ui.highlighttext", "#1a1a1a");
220 pref("ui.infobackground", "#f5f5b5");
221 pref("ui.infotext", "#000");
222 pref("ui.menu", "#f7f5f3");
223 pref("ui.menutext", "#101010");
224 pref("ui.threeddarkshadow", "#000");
225 pref("ui.threedface", "#ece7e2");
226 pref("ui.threedhighlight", "#fff");
227 pref("ui.threedlightshadow", "#ece7e2");
228 pref("ui.threedshadow", "#aea194");
229 pref("ui.window", "#efebe7");
230 pref("ui.windowtext", "#101010");
231 pref("ui.windowframe", "#efebe7");
233 // replace newlines with spaces on paste into single-line text boxes
234 pref("editor.singleLine.pasteNewlines", 2);
236 // threshold where a tap becomes a drag, in 1/240" reference pixels
237 // The names of the preferences are to be in sync with nsEventStateManager.cpp
238 pref("ui.dragThresholdX", 25);
239 pref("ui.dragThresholdY", 25);
241 // Layers Acceleration.  We can only have nice things on gonk, because
242 // they're not maintained anywhere else.
243 #ifndef MOZ_WIDGET_GONK
244 pref("dom.ipc.tabs.disabled", true);
245 pref("layers.offmainthreadcomposition.enabled", false);
246 pref("layers.offmainthreadcomposition.async-animations", false);
247 pref("layers.async-video.enabled", false);
248 #else
249 pref("dom.ipc.tabs.disabled", false);
250 pref("layers.offmainthreadcomposition.enabled", true);
251 pref("layers.acceleration.disabled", false);
252 pref("layers.offmainthreadcomposition.async-animations", true);
253 pref("layers.async-video.enabled", true);
254 pref("layers.async-pan-zoom.enabled", true);
255 #endif
257 // Web Notifications
258 pref("notification.feature.enabled", true);
260 // IndexedDB
261 pref("dom.indexedDB.warningQuota", 5);
263 // prevent video elements from preloading too much data
264 pref("media.preload.default", 1); // default to preload none
265 pref("media.preload.auto", 2);    // preload metadata if preload=auto
266 pref("media.cache_size", 4096);    // 4MB media cache
268 // The default number of decoded video frames that are enqueued in
269 // MediaDecoderReader's mVideoQueue.
270 pref("media.video-queue.default-size", 3);
272 // optimize images' memory usage
273 pref("image.mem.decodeondraw", true);
274 pref("content.image.allow_locking", false); /* don't allow image locking */
275 pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */
276 pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */
277 pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */
279 // XXX this isn't a good check for "are touch events supported", but
280 // we don't really have a better one at the moment.
281 #ifdef MOZ_WIDGET_GONK
282 // enable touch events interfaces
283 pref("dom.w3c_touch_events.enabled", 1);
284 pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240"
285 pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
286 #endif
288 #ifdef MOZ_SAFE_BROWSING
289 // Safe browsing does nothing unless this pref is set
290 pref("browser.safebrowsing.enabled", true);
292 // Prevent loading of pages identified as malware
293 pref("browser.safebrowsing.malware.enabled", true);
295 // Non-enhanced mode (local url lists) URL list to check for updates
296 pref("browser.safebrowsing.provider.0.updateURL", "http://safebrowsing.clients.google.com/safebrowsing/downloads?client={moz:client}&appver={moz:version}&pver=2.2");
298 pref("browser.safebrowsing.dataProvider", 0);
300 // Does the provider name need to be localizable?
301 pref("browser.safebrowsing.provider.0.name", "Google");
302 pref("browser.safebrowsing.provider.0.keyURL", "https://sb-ssl.google.com/safebrowsing/newkey?client={moz:client}&appver={moz:version}&pver=2.2");
303 pref("browser.safebrowsing.provider.0.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/report?");
304 pref("browser.safebrowsing.provider.0.gethashURL", "http://safebrowsing.clients.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2");
306 // HTML report pages
307 pref("browser.safebrowsing.provider.0.reportGenericURL", "http://{moz:locale}.phish-generic.mozilla.com/?hl={moz:locale}");
308 pref("browser.safebrowsing.provider.0.reportErrorURL", "http://{moz:locale}.phish-error.mozilla.com/?hl={moz:locale}");
309 pref("browser.safebrowsing.provider.0.reportPhishURL", "http://{moz:locale}.phish-report.mozilla.com/?hl={moz:locale}");
310 pref("browser.safebrowsing.provider.0.reportMalwareURL", "http://{moz:locale}.malware-report.mozilla.com/?hl={moz:locale}");
311 pref("browser.safebrowsing.provider.0.reportMalwareErrorURL", "http://{moz:locale}.malware-error.mozilla.com/?hl={moz:locale}");
313 // FAQ URLs
314 pref("browser.safebrowsing.warning.infoURL", "http://www.mozilla.com/%LOCALE%/%APP%/phishing-protection/");
315 pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/%APP%/geolocation/");
317 // Name of the about: page contributed by safebrowsing to handle display of error
318 // pages on phishing/malware hits.  (bug 399233)
319 pref("urlclassifier.alternate_error_page", "blocked");
321 // The number of random entries to send with a gethash request.
322 pref("urlclassifier.gethashnoise", 4);
324 // The list of tables that use the gethash request to confirm partial results.
325 pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
327 // If an urlclassifier table has not been updated in this number of seconds,
328 // a gethash request will be forced to check that the result is still in
329 // the database.
330 pref("urlclassifier.max-complete-age", 2700);
332 // URL for checking the reason for a malware warning.
333 pref("browser.safebrowsing.malware.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
334 #endif
336 // True if this is the first time we are showing about:firstrun
337 pref("browser.firstrun.show.uidiscovery", true);
338 pref("browser.firstrun.show.localepicker", true);
340 // initiated by a user
341 pref("content.ime.strict_policy", true);
343 // True if you always want dump() to work
345 // On Android, you also need to do the following for the output
346 // to show up in logcat:
348 // $ adb shell stop
349 // $ adb shell setprop log.redirect-stdio true
350 // $ adb shell start
351 pref("browser.dom.window.dump.enabled", false);
353 // Default Content Security Policy to apply to privileged and certified apps
354 pref("security.apps.privileged.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'");
355 pref("security.apps.certified.CSP.default", "default-src *; script-src 'self'; object-src 'none'; style-src 'self'");
357 // Temporarily force-enable GL compositing.  This is default-disabled
358 // deep within the bowels of the widgetry system.  Remove me when GL
359 // compositing isn't default disabled in widget/android.
360 pref("layers.acceleration.force-enabled", true);
362 // handle links targeting new windows
363 // 1=current window/tab, 2=new window, 3=new tab in most recent window
364 pref("browser.link.open_newwindow", 3);
366 // 0: no restrictions - divert everything
367 // 1: don't divert window.open at all
368 // 2: don't divert window.open with features
369 pref("browser.link.open_newwindow.restriction", 0);
371 // Enable browser frames (including OOP, except on Windows, where it doesn't
372 // work), but make in-process browser frames the default.
373 pref("dom.mozBrowserFramesEnabled", true);
375 // Enable a (virtually) unlimited number of mozbrowser processes.
376 // We'll run out of PIDs on UNIX-y systems before we hit this limit.
377 pref("dom.ipc.processCount", 100000);
379 pref("dom.ipc.browser_frames.oop_by_default", false);
381 // SMS/MMS
382 pref("dom.sms.enabled", true);
383 pref("dom.sms.strict7BitEncoding", false); // Disabled by default.
384 pref("dom.sms.requestStatusReport", true); // Enabled by default.
385 pref("dom.mms.requestStatusReport", true); // Enabled by default.
387 // WebContacts
388 pref("dom.mozContacts.enabled", true);
389 pref("dom.navigator-property.disable.mozContacts", false);
390 pref("dom.global-constructor.disable.mozContact", false);
392 // Shortnumber matching needed for e.g. Brazil:
393 // 01187654321 can be found with 87654321
394 pref("dom.phonenumber.substringmatching.BR", 8);
395 pref("dom.phonenumber.substringmatching.CO", 10);
396 pref("dom.phonenumber.substringmatching.VE", 7);
398 // WebAlarms
399 pref("dom.mozAlarms.enabled", true);
401 // SimplePush
402 pref("services.push.enabled", true);
403 // Is the network connection allowed to be up?
404 // This preference should be used in UX to enable/disable push.
405 pref("services.push.connection.enabled", true);
406 // serverURL to be assigned by services team
407 pref("services.push.serverURL", "wss://push.services.mozilla.com/");
408 pref("services.push.userAgentID", "");
409 // Exponential back-off start is 5 seconds like in HTTP/1.1.
410 // Maximum back-off is pingInterval.
411 pref("services.push.retryBaseInterval", 5000);
412 // Interval at which to ping PushServer to check connection status. In
413 // milliseconds. If no reply is received within requestTimeout, the connection
414 // is considered closed.
415 pref("services.push.pingInterval", 1800000); // 30 minutes
416 // How long before a DOMRequest errors as timeout
417 pref("services.push.requestTimeout", 10000);
418 // enable udp wakeup support
419 pref("services.push.udp.wakeupEnabled", true);
420 // port on which UDP server socket is bound
421 pref("services.push.udp.port", 2442);
423 // NetworkStats
424 #ifdef MOZ_B2G_RIL
425 pref("dom.mozNetworkStats.enabled", true);
426 pref("ril.cellbroadcast.disabled", false);
427 #endif
429 // WebSettings
430 pref("dom.mozSettings.enabled", true);
431 pref("dom.navigator-property.disable.mozSettings", false);
432 pref("dom.mozPermissionSettings.enabled", true);
434 // controls if we want camera support
435 pref("device.camera.enabled", true);
436 pref("media.realtime_decoder.enabled", true);
438 // TCPSocket
439 pref("dom.mozTCPSocket.enabled", true);
441 // "Preview" landing of bug 710563, which is bogged down in analysis
442 // of talos regression.  This is a needed change for higher-framerate
443 // CSS animations, and incidentally works around an apparent bug in
444 // our handling of requestAnimationFrame() listeners, which are
445 // supposed to enable this REPEATING_PRECISE_CAN_SKIP behavior.  The
446 // secondary bug isn't really worth investigating since it's obseleted
447 // by bug 710563.
448 pref("layout.frame_rate.precise", true);
450 // Handle hardware buttons in the b2g chrome package
451 pref("b2g.keys.menu.enabled", true);
453 // Screen timeout in seconds
454 pref("power.screen.timeout", 60);
456 pref("full-screen-api.enabled", true);
458 #ifndef MOZ_WIDGET_GONK
459 // If we're not actually on physical hardware, don't make the top level widget
460 // fullscreen when transitioning to fullscreen. This means in emulated
461 // environments (like the b2g desktop client) we won't make the client window
462 // fill the whole screen, we'll just make the content fill the client window,
463 // i.e. it won't give the impression to content that the number of device
464 // screen pixels changes!
465 pref("full-screen-api.ignore-widgets", true);
466 #endif
468 pref("media.volume.steps", 10);
470 #ifdef ENABLE_MARIONETTE
471 //Enable/disable marionette server, set listening port
472 pref("marionette.defaultPrefs.enabled", true);
473 pref("marionette.defaultPrefs.port", 2828);
474 #ifndef MOZ_WIDGET_GONK
475 // On desktop builds, we need to force the socket to listen on localhost only
476 pref("marionette.force-local", true);
477 #endif
478 #endif
480 #ifdef MOZ_UPDATER
481 // When we're applying updates, we can't let anything hang us on
482 // quit+restart.  The user has no recourse.
483 pref("shutdown.watchdog.timeoutSecs", 5);
484 // Timeout before the update prompt automatically installs the update
485 pref("b2g.update.apply-prompt-timeout", 60000); // milliseconds
486 // Amount of time to wait after the user is idle before prompting to apply an update
487 pref("b2g.update.apply-idle-timeout", 600000); // milliseconds
488 // Amount of time after which connection will be restarted if no progress
489 pref("b2g.update.download-watchdog-timeout", 120000); // milliseconds
490 pref("b2g.update.download-watchdog-max-retries", 5);
492 pref("app.update.enabled", true);
493 pref("app.update.auto", false);
494 pref("app.update.silent", false);
495 pref("app.update.mode", 0);
496 pref("app.update.incompatible.mode", 0);
497 pref("app.update.staging.enabled", true);
498 pref("app.update.service.enabled", true);
500 // The URL hosting the update manifest.
501 pref("app.update.url", "http://update.boot2gecko.org/%CHANNEL%/update.xml");
502 pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
504 // Interval at which update manifest is fetched.  In units of seconds.
505 pref("app.update.interval", 86400); // 1 day
506 // Don't throttle background updates.
507 pref("app.update.download.backgroundInterval", 0);
509 // Retry update socket connections every 30 seconds in the cases of certain kinds of errors
510 pref("app.update.socket.retryTimeout", 30000);
512 // Max of 20 consecutive retries (total 10 minutes) before giving up and marking
513 // the update download as failed.
514 // Note: Offline errors will always retry when the network comes online.
515 pref("app.update.socket.maxErrors", 20);
517 // Enable update logging for now, to diagnose growing pains in the
518 // field.
519 pref("app.update.log", true);
520 #else
521 // Explicitly disable the shutdown watchdog.  It's enabled by default.
522 // When the updater is disabled, we want to know about shutdown hangs.
523 pref("shutdown.watchdog.timeoutSecs", -1);
524 #endif
526 // Extensions preferences
527 pref("extensions.update.enabled", false);
528 pref("extensions.getAddons.cache.enabled", false);
530 // Context Menu
531 pref("ui.click_hold_context_menus", true);
532 pref("ui.click_hold_context_menus.delay", 750);
534 // Enable device storage
535 pref("device.storage.enabled", true);
537 // Enable pre-installed applications
538 pref("dom.webapps.useCurrentProfile", true);
540 // Enable system message
541 pref("dom.sysmsg.enabled", true);
542 pref("media.plugins.enabled", false);
543 pref("media.omx.enabled", true);
545 // Disable printing (particularly, window.print())
546 pref("dom.disable_window_print", true);
548 // Disable window.showModalDialog
549 pref("dom.disable_window_showModalDialog", true);
551 // Enable new experimental html forms
552 pref("dom.experimental_forms", true);
554 // Turns on gralloc-based direct texturing for Gonk
555 pref("gfx.gralloc.enabled", false);
557 // XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging
558 pref("javascript.options.mem.log", false);
560 // Increase mark slice time from 10ms to 30ms
561 pref("javascript.options.mem.gc_incremental_slice_ms", 30);
563 // Increase time to get more high frequency GC on benchmarks from 1000ms to 1500ms
564 pref("javascript.options.mem.gc_high_frequency_time_limit_ms", 1500);
566 pref("javascript.options.mem.gc_high_frequency_heap_growth_max", 300);
567 pref("javascript.options.mem.gc_high_frequency_heap_growth_min", 120);
568 pref("javascript.options.mem.gc_high_frequency_high_limit_mb", 40);
569 pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 0);
570 pref("javascript.options.mem.gc_low_frequency_heap_growth", 120);
571 pref("javascript.options.mem.high_water_mark", 6);
572 pref("javascript.options.mem.gc_allocation_threshold_mb", 1);
573 pref("javascript.options.mem.gc_decommit_threshold_mb", 1);
575 // Show/Hide scrollbars when active/inactive
576 pref("ui.showHideScrollbars", 1);
578 // Enable the ProcessPriorityManager, and give processes with no visible
579 // documents a 1s grace period before they're eligible to be marked as
580 // background.
581 pref("dom.ipc.processPriorityManager.enabled", true);
582 pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
583 pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000);
585 // Kernel parameters for process priorities.  These affect how processes are
586 // killed on low-memory and their relative CPU priorities.
588 // Note: The maximum nice value on Linux is 19, but the max value you should
589 // use here is 18.  NSPR adds 1 to some threads' nice values, to mark
590 // low-priority threads.  If the process priority manager were to renice a
591 // process (and all its threads) to 19, all threads would have the same
592 // niceness.  Then when we reniced the process to (say) 10, all threads would
593 // /still/ have the same niceness; we'd effectively have erased NSPR's thread
594 // priorities.
596 pref("hal.processPriorityManager.gonk.MASTER.OomScoreAdjust", 0);
597 pref("hal.processPriorityManager.gonk.MASTER.KillUnderMB", 4);
598 pref("hal.processPriorityManager.gonk.MASTER.Nice", 0);
600 pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.OomScoreAdjust", 67);
601 pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.KillUnderMB", 5);
602 pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.Nice", 0);
604 pref("hal.processPriorityManager.gonk.FOREGROUND.OomScoreAdjust", 134);
605 pref("hal.processPriorityManager.gonk.FOREGROUND.KillUnderMB", 6);
606 pref("hal.processPriorityManager.gonk.FOREGROUND.Nice", 1);
608 pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.OomScoreAdjust", 200);
609 pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.KillUnderMB", 7);
610 pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.Nice", 7);
612 pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.OomScoreAdjust", 267);
613 pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.KillUnderMB", 8);
614 pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.Nice", 18);
616 pref("hal.processPriorityManager.gonk.BACKGROUND.OomScoreAdjust", 400);
617 pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderMB", 20);
618 pref("hal.processPriorityManager.gonk.BACKGROUND.Nice", 18);
620 // Processes get this niceness when they have low CPU priority.
621 pref("hal.processPriorityManager.gonk.LowCPUNice", 18);
623 // Fire a memory pressure event when the system has less than Xmb of memory
624 // remaining.  You should probably set this just above Y.KillUnderMB for
625 // the highest priority class Y that you want to make an effort to keep alive.
626 // (For example, we want BACKGROUND_PERCEIVABLE to stay alive.)  If you set
627 // this too high, then we'll send out a memory pressure event every Z seconds
628 // (see below), even while we have processes that we would happily kill in
629 // order to free up memory.
630 pref("hal.processPriorityManager.gonk.notifyLowMemUnderMB", 14);
632 // We wait this long before polling the memory-pressure fd after seeing one
633 // memory pressure event.  (When we're not under memory pressure, we sit
634 // blocked on a poll(), and this pref has no effect.)
635 pref("gonk.systemMemoryPressureRecoveryPollMS", 5000);
637 #ifndef DEBUG
638 // Enable pre-launching content processes for improved startup time
639 // (hiding latency).
640 pref("dom.ipc.processPrelaunch.enabled", true);
641 // Wait this long before pre-launching a new subprocess.
642 pref("dom.ipc.processPrelaunch.delayMs", 5000);
643 #endif
645 // When a process receives a system message, we hold a CPU wake lock on its
646 // behalf for this many seconds, or until it handles the system message,
647 // whichever comes first.
648 pref("dom.ipc.systemMessageCPULockTimeoutSec", 30);
650 // Ignore the "dialog=1" feature in window.open.
651 pref("dom.disable_window_open_dialog_feature", true);
653 // Screen reader support
654 pref("accessibility.accessfu.activate", 2);
655 pref("accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement,Landmark,ListItem");
656 // Setting for an utterance order (0 - description first, 1 - description last).
657 pref("accessibility.accessfu.utterance", 1);
658 // Whether to skip images with empty alt text
659 pref("accessibility.accessfu.skip_empty_images", true);
661 // Enable hit-target fluffing
662 pref("ui.touch.radius.enabled", true);
663 pref("ui.touch.radius.leftmm", 3);
664 pref("ui.touch.radius.topmm", 5);
665 pref("ui.touch.radius.rightmm", 3);
666 pref("ui.touch.radius.bottommm", 2);
668 pref("ui.mouse.radius.enabled", true);
669 pref("ui.mouse.radius.leftmm", 3);
670 pref("ui.mouse.radius.topmm", 5);
671 pref("ui.mouse.radius.rightmm", 3);
672 pref("ui.mouse.radius.bottommm", 2);
674 // Disable native prompt
675 pref("browser.prompt.allowNative", false);
677 // Minimum delay in milliseconds between network activity notifications (0 means
678 // no notifications). The delay is the same for both download and upload, though
679 // they are handled separately. This pref is only read once at startup:
680 // a restart is required to enable a new value.
681 pref("network.activity.blipIntervalMilliseconds", 250);
683 // By default we want the NetworkManager service to manage Gecko's offline
684 // status for us according to the state of Wifi/cellular data connections.
685 // In some environments, such as the emulator or hardware with other network
686 // connectivity, this is not desireable, however, in which case this pref
687 // can be flipped to false.
688 pref("network.gonk.manage-offline-status", true);
690 pref("jsloader.reuseGlobal", true);
692 // Enable font inflation for browser tab content.
693 pref("font.size.inflation.minTwips", 120);
694 // And disable it for lingering master-process UI.
695 pref("font.size.inflation.disabledInMasterProcess", true);
697 // Enable freeing dirty pages when minimizing memory; this reduces memory
698 // consumption when applications are sent to the background.
699 pref("memory.free_dirty_pages", true);
701 // UAProfile settings
702 pref("wap.UAProf.url", "");
703 pref("wap.UAProf.tagname", "x-wap-profile");
705 pref("layout.imagevisibility.enabled", false);
707 // Enable native identity (persona/browserid)
708 pref("dom.identity.enabled", true);
710 // Wait up to this much milliseconds when orientation changed
711 pref("layers.orientation.sync.timeout", 1000);
713 // Don't discard WebGL contexts for foreground apps on memory
714 // pressure.
715 pref("webgl.can-lose-context-in-foreground", false);
717 // Allow nsMemoryInfoDumper to create a fifo in the temp directory.  We use
718 // this fifo to trigger about:memory dumps, among other things.
719 pref("memory_info_dumper.watch_fifo.enabled", true);
720 pref("memory_info_dumper.watch_fifo.directory", "/data/local");
722 pref("general.useragent.enable_overrides", true);
724 // Make <audio> and <video> talk to the AudioChannelService.
725 pref("media.useAudioChannelService", true);
727 pref("b2g.version", @MOZ_B2G_VERSION@);
729 // Disable console buffering to save memory.
730 pref("consoleservice.buffered", false);
732 #ifdef MOZ_WIDGET_GONK
733 // Performance testing suggests 2k is a better page size for SQLite.
734 pref("toolkit.storage.pageSize", 2048);
735 #endif
737 // Enable captive portal detection.
738 pref("captivedetect.canonicalURL", "http://detectportal.firefox.com/success.txt");
739 pref("captivedetect.canonicalContent", "success\n");
741 // The url of the manifest we use for ADU pings.
742 pref("ping.manifestURL", "https://marketplace.firefox.com/packaged.webapp");
744 // Enable the disk space watcher
745 pref("disk_space_watcher.enabled", true);
747 // Enable promise
748 pref("dom.promise.enabled", false);
750 // Allow ADB to run for this many hours before disabling
751 // (only applies when marionette is disabled)
752 // 0 disables the timer.
753 pref("b2g.adb.timeout-hours", 12);
755 // Absolute path to the devtool unix domain socket file used
756 // to communicate with a usb cable via adb forward
757 pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket");
759 // enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases,
760 // falling back to Skia/software for smaller canvases
761 pref("gfx.canvas.azure.backends", "skia");
762 pref("gfx.canvas.azure.accelerated", true);