Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge commit 'c0dd1c1e3fed7e4cb6bca0695736b2e687806291' into embedlit…
…e_upgrade
  • Loading branch information
tmeshkova committed Jan 17, 2014
2 parents 7cd09ca + c0dd1c1 commit e122782
Show file tree
Hide file tree
Showing 1,346 changed files with 26,423 additions and 9,357 deletions.
14 changes: 14 additions & 0 deletions .lldbinit
@@ -1,5 +1,10 @@
# .lldbinit file for debugging Mozilla

# -----------------------------------------------------------------------------
# For documentation on all of the commands and type summaries defined here
# and in the accompanying Python scripts, see python/lldbutils/README.txt.
# -----------------------------------------------------------------------------

# Mozilla's use of UNIFIED_SOURCES to include multiple source files into a
# single compiled file breaks lldb breakpoint setting. This works around that.
# See http://lldb.llvm.org/troubleshooting.html for more info.
Expand All @@ -14,3 +19,12 @@ settings set target.prefer-dynamic-value run-target
# than do any kind of searching, this assumes that you are running lldb from
# the top level source directory.
script sys.path.append('python/lldbutils'); import lldbutils; lldbutils.init()

# Show the string value in atoms.
type summary add nsIAtom --summary-string "${var.mString}"

# Show the value of text nodes.
type summary add nsTextNode --summary-string "${var.mText}"

# Dump the current JS stack.
command alias js expr DumpJSStack()
2 changes: 1 addition & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 897735 requires a clobber due to mass mochitest bustage otherwise
Updates to NSS seem to require a clobber due bug 959928.
2 changes: 1 addition & 1 deletion accessible/src/windows/msaa/moz.build
Expand Up @@ -46,7 +46,7 @@ if CONFIG['MOZ_XUL']:

LOCAL_INCLUDES += [
'../../../../content/base/src',
'../../../../content/events/src',
'../../../../dom/events',
'../../base',
'../../generic',
'../../html',
Expand Down
1 change: 0 additions & 1 deletion addon-sdk/source/python-lib/cuddlefish/prefs.py
Expand Up @@ -62,7 +62,6 @@
'urlclassifier.updateinterval' : 172800,
# Point the url-classifier to a nonexistent local URL for fast failures.
'browser.safebrowsing.provider.0.gethashURL' : 'http://localhost/safebrowsing-dummy/gethash',
'browser.safebrowsing.provider.0.keyURL' : 'http://localhost/safebrowsing-dummy/newkey',
'browser.safebrowsing.provider.0.updateURL' : 'http://localhost/safebrowsing-dummy/update',
}

Expand Down
32 changes: 16 additions & 16 deletions b2g/app/b2g.js
Expand Up @@ -243,21 +243,23 @@ pref("ui.buttonshadow", "#aea194");
pref("ui.buttontext", "#101010");
pref("ui.captiontext", "#101010");
pref("ui.graytext", "#b1a598");
pref("ui.highlight", "#fad184");
pref("ui.highlighttext", "#1a1a1a");
pref("ui.infobackground", "#f5f5b5");
pref("ui.infotext", "#000");
pref("ui.menu", "#f7f5f3");
pref("ui.menutext", "#101010");
pref("ui.threeddarkshadow", "#000");
pref("ui.threedface", "#ece7e2");
pref("ui.threedhighlight", "#fff");
pref("ui.threedlightshadow", "#ece7e2");
pref("ui.threedshadow", "#aea194");
pref("ui.window", "#efebe7");
pref("ui.windowtext", "#101010");
pref("ui.windowframe", "#efebe7");

// Themable via mozSettings
pref("ui.menu", "#f97c17");
pref("ui.menutext", "#ffffff");
pref("ui.infobackground", "#343e40");
pref("ui.infotext", "#686868");
pref("ui.window", "#ffffff");
pref("ui.windowtext", "#000000");
pref("ui.highlight", "#b2f2ff");

// replace newlines with spaces on paste into single-line text boxes
pref("editor.singleLine.pasteNewlines", 2);

Expand All @@ -280,7 +282,6 @@ pref("layers.offmainthreadcomposition.async-animations", true);
pref("layers.async-video.enabled", true);
pref("layers.async-pan-zoom.enabled", true);
pref("gfx.content.azure.backends", "cairo");
pref("layers.composer2d.enabled", true);
#endif

// Web Notifications
Expand All @@ -307,12 +308,10 @@ pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eager

// XXX this isn't a good check for "are touch events supported", but
// we don't really have a better one at the moment.
#ifdef MOZ_WIDGET_GONK
// enable touch events interfaces
pref("dom.w3c_touch_events.enabled", 1);
pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240"
pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
#endif

#ifdef MOZ_SAFE_BROWSING
// Safe browsing does nothing unless this pref is set
Expand All @@ -322,15 +321,14 @@ pref("browser.safebrowsing.enabled", true);
pref("browser.safebrowsing.malware.enabled", true);

// Non-enhanced mode (local url lists) URL list to check for updates
pref("browser.safebrowsing.provider.0.updateURL", "http://safebrowsing.clients.google.com/safebrowsing/downloads?client={moz:client}&appver={moz:version}&pver=2.2");
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%");

pref("browser.safebrowsing.dataProvider", 0);

// Does the provider name need to be localizable?
pref("browser.safebrowsing.provider.0.name", "Google");
pref("browser.safebrowsing.provider.0.keyURL", "https://sb-ssl.google.com/safebrowsing/newkey?client={moz:client}&appver={moz:version}&pver=2.2");
pref("browser.safebrowsing.provider.0.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/report?");
pref("browser.safebrowsing.provider.0.gethashURL", "http://safebrowsing.clients.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2");
pref("browser.safebrowsing.provider.0.reportURL", "https://safebrowsing.google.com/safebrowsing/report?");
pref("browser.safebrowsing.provider.0.gethashURL", "https://safebrowsing.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2");

// HTML report pages
pref("browser.safebrowsing.provider.0.reportGenericURL", "http://{moz:locale}.phish-generic.mozilla.com/?hl={moz:locale}");
Expand All @@ -355,7 +353,7 @@ pref("urlclassifier.gethashnoise", 4);
pref("urlclassifier.max-complete-age", 2700);

// URL for checking the reason for a malware warning.
pref("browser.safebrowsing.malware.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
pref("browser.safebrowsing.malware.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
#endif

// True if this is the first time we are showing about:firstrun
Expand Down Expand Up @@ -621,9 +619,11 @@ pref("ui.useOverlayScrollbars", 1);

// Enable the ProcessPriorityManager, and give processes with no visible
// documents a 1s grace period before they're eligible to be marked as
// background.
// background. Background processes that are perceivable due to playing
// media are given a longer grace period to accomodate changing tracks, etc.
pref("dom.ipc.processPriorityManager.enabled", true);
pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000);
pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000);

// Number of different background levels for background processes. We use
Expand Down
10 changes: 10 additions & 0 deletions b2g/chrome/content/desktop.js
@@ -0,0 +1,10 @@

window.addEventListener("ContentStart", function(evt) {
// Enable touch event shim on desktop that translates mouse events
// into touch ones
let require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {})
.devtools.require;
let { TouchEventHandler } = require("devtools/touch-events");
let touchEventHandler = new TouchEventHandler(shell.contentBrowser);
touchEventHandler.start();
});
49 changes: 46 additions & 3 deletions b2g/chrome/content/settings.js
Expand Up @@ -597,9 +597,38 @@ SettingsListener.observe("debug.paint-flashing.enabled", false, function(value)
SettingsListener.observe("layers.draw-borders", false, function(value) {
Services.prefs.setBoolPref("layers.draw-borders", value);
});
SettingsListener.observe("layers.composer2d.enabled", true, function(value) {
Services.prefs.setBoolPref("layers.composer2d.enabled", value);
});
(function Composer2DSettingToPref() {
//layers.composer.enabled can be enabled in three ways
//In order of precedence they are:
//
//1. mozSettings "layers.composer.enabled"
//2. a gecko pref "layers.composer.enabled"
//3. presence of ro.display.colorfill at the Gonk level

var req = navigator.mozSettings.createLock().get('layers.composer2d.enabled');
req.onsuccess = function() {
if (typeof(req.result['layers.composer2d.enabled']) === 'undefined') {
var enabled = false;
if (Services.prefs.getPrefType('layers.composer2d.enabled') == Ci.nsIPrefBranch.PREF_BOOL) {
enabled = Services.prefs.getBoolPref('layers.composer2d.enabled');
} else {
#ifdef MOZ_WIDGET_GONK
enabled = (libcutils.property_get('ro.display.colorfill') === '1');
#endif
}
navigator.mozSettings.createLock().set({'layers.composer2d.enabled': enabled });
}

SettingsListener.observe("layers.composer2d.enabled", true, function(value) {
Services.prefs.setBoolPref("layers.composer2d.enabled", value);
});
};
req.onerror = function() {
dump("Error configuring layers.composer2d.enabled setting");
};

})();

// ================ Accessibility ============
SettingsListener.observe("accessibility.screenreader", false, function(value) {
Expand All @@ -608,3 +637,17 @@ SettingsListener.observe("accessibility.screenreader", false, function(value) {
AccessFu.attach(window);
}
});

// ================ Theming ============
(function themingSettingsListener() {
let themingPrefs = ['ui.menu', 'ui.menutext', 'ui.infobackground', 'ui.infotext',
'ui.window', 'ui.windowtext', 'ui.highlight'];

themingPrefs.forEach(function(pref) {
SettingsListener.observe('gaia.' + pref, null, function(value) {
if (value) {
Services.prefs.setCharPref(pref, value);
}
});
});
})();
4 changes: 3 additions & 1 deletion b2g/chrome/content/shell.html
Expand Up @@ -19,7 +19,9 @@
src="chrome://browser/content/shell.js"> </script>

#ifndef MOZ_WIDGET_GONK

<!-- various task that has to happen only on desktop -->
<script type="application/javascript;version=1.8"
src="chrome://browser/content/desktop.js"> </script>
<!-- this script handles the screen argument for desktop builds -->
<script type="application/javascript;version=1.8"
src="chrome://browser/content/screen.js"> </script>
Expand Down
10 changes: 7 additions & 3 deletions b2g/chrome/content/shell.js
Expand Up @@ -683,6 +683,10 @@ Services.obs.addObserver(function onBluetoothVolumeChange(subject, topic, data)
});
}, 'bluetooth-volume-change', false);

Services.obs.addObserver(function(subject, topic, data) {
shell.sendCustomEvent('mozmemorypressure');
}, 'memory-pressure', false);

var CustomEventManager = {
init: function custevt_init() {
window.addEventListener("ContentStart", (function(evt) {
Expand Down Expand Up @@ -812,7 +816,7 @@ var AlertsHelper = {
this._listeners[uid] = listener;

let app = DOMApplicationRegistry.getAppByManifestURL(listener.manifestURL);
DOMApplicationRegistry.getManifestFor(app.manifestURL, function(manifest) {
DOMApplicationRegistry.getManifestFor(app.manifestURL).then((manifest) => {
let helper = new ManifestHelper(manifest, app.origin);
let getNotificationURLFor = function(messages) {
if (!messages)
Expand Down Expand Up @@ -869,7 +873,7 @@ var AlertsHelper = {
// If we have a manifest URL, get the icon and title from the manifest
// to prevent spoofing.
let app = DOMApplicationRegistry.getAppByManifestURL(manifestUrl);
DOMApplicationRegistry.getManifestFor(manifestUrl, function(aManifest) {
DOMApplicationRegistry.getManifestFor(manifestUrl).then((aManifest) => {
let helper = new ManifestHelper(aManifest, app.origin);
send(helper.name, helper.iconURLForSize(128));
});
Expand Down Expand Up @@ -968,7 +972,7 @@ var WebappsHelper = {

switch(topic) {
case "webapps-launch":
DOMApplicationRegistry.getManifestFor(json.manifestURL, function(aManifest) {
DOMApplicationRegistry.getManifestFor(json.manifestURL).then((aManifest) => {
if (!aManifest)
return;

Expand Down
1 change: 1 addition & 0 deletions b2g/chrome/jar.mn
Expand Up @@ -14,6 +14,7 @@ chrome.jar:
* content/shell.html (content/shell.html)
* content/shell.js (content/shell.js)
#ifndef ANDROID
content/desktop.js (content/desktop.js)
content/screen.js (content/screen.js)
content/runapp.js (content/runapp.js)
#endif
Expand Down
3 changes: 2 additions & 1 deletion b2g/config/emulator-ics/config.json
Expand Up @@ -21,5 +21,6 @@
}
},
"b2g_manifest": "emulator.xml",
"b2g_manifest_branch": "master"
"b2g_manifest_branch": "master",
"b2g_manifest_intree": true
}

0 comments on commit e122782

Please sign in to comment.