b2g/app/b2g.js

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

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

mercurial