Skip to content

Commit

Permalink
merge mozilla-inbound to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Aug 10, 2016
2 parents 5a14c55 + 6ed5110 commit 553a2da
Show file tree
Hide file tree
Showing 494 changed files with 3,158 additions and 1,931 deletions.
4 changes: 4 additions & 0 deletions .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
def FlagsForFile(filename):
mach = mach_module.get_mach()
out = StringIO()

# Mach calls sys.stdout.fileno(), so we need to fake it when capturing it.
# Returning an invalid file descriptor does the trick.
out.fileno = lambda: -1
out.encoding = None
mach.run(['compileflags', filename], stdout=out, stderr=out)

Expand Down
2 changes: 1 addition & 1 deletion accessible/jsat/AccessFu.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ this.AccessFu = { // jshint ignore:line

_output: function _output(aPresentationData, aBrowser) {
if (!Utils.isAliveAndVisible(
Utils.AccRetrieval.getAccessibleFor(aBrowser))) {
Utils.AccService.getAccessibleFor(aBrowser))) {
return;
}
for (let presenter of aPresentationData) {
Expand Down
6 changes: 3 additions & 3 deletions accessible/jsat/ContentControl.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ this.ContentControl.prototype = {
// (via ARIA roles, etc.), so we need to generate a click.
// Could possibly be made simpler in the future. Maybe core
// engine could expose nsCoreUtiles::DispatchMouseEvent()?
let docAcc = Utils.AccRetrieval.getAccessibleFor(this.document);
let docAcc = Utils.AccService.getAccessibleFor(this.document);
let docX = {}, docY = {}, docW = {}, docH = {};
docAcc.getBounds(docX, docY, docW, docH);

Expand All @@ -249,7 +249,7 @@ this.ContentControl.prototype = {
}
};

let focusedAcc = Utils.AccRetrieval.getAccessibleFor(
let focusedAcc = Utils.AccService.getAccessibleFor(
this.document.activeElement);
if (focusedAcc && this.vc.position === focusedAcc
&& focusedAcc.role === Roles.ENTRY) {
Expand Down Expand Up @@ -478,7 +478,7 @@ this.ContentControl.prototype = {
}

if (aOptions.moveToFocused) {
acc = Utils.AccRetrieval.getAccessibleFor(
acc = Utils.AccService.getAccessibleFor(
this.document.activeElement) || acc;
}

Expand Down
4 changes: 2 additions & 2 deletions accessible/jsat/EventManager.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -559,15 +559,15 @@ this.EventManager.prototype = {
}

if (tabstate) {
let docAcc = Utils.AccRetrieval.getAccessibleFor(aWebProgress.DOMWindow.document);
let docAcc = Utils.AccService.getAccessibleFor(aWebProgress.DOMWindow.document);
this.present(Presentation.tabStateChanged(docAcc, tabstate));
}
},

onProgressChange: function onProgressChange() {},

onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
let docAcc = Utils.AccRetrieval.getAccessibleFor(aWebProgress.DOMWindow.document);
let docAcc = Utils.AccService.getAccessibleFor(aWebProgress.DOMWindow.document);
this.present(Presentation.tabStateChanged(docAcc, 'newdoc'));
},

Expand Down
4 changes: 2 additions & 2 deletions accessible/jsat/OutputGenerator.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var OutputGenerator = {
output.push.apply(output, self.genForObject(aAccessible, aContext));
};
let ignoreSubtree = function ignoreSubtree(aAccessible) {
let roleString = Utils.AccRetrieval.getStringRole(aAccessible.role);
let roleString = Utils.AccService.getStringRole(aAccessible.role);
let nameRule = self.roleRuleMap[roleString] || 0;
// Ignore subtree if the name is explicit and the role's name rule is the
// NAME_FROM_SUBTREE_RULE.
Expand Down Expand Up @@ -108,7 +108,7 @@ var OutputGenerator = {
* determined by {@link roleRuleMap}.
*/
genForObject: function genForObject(aAccessible, aContext) {
let roleString = Utils.AccRetrieval.getStringRole(aAccessible.role);
let roleString = Utils.AccService.getStringRole(aAccessible.role);
let func = this.objectOutputFunctions[
OutputGenerator._getOutputName(roleString)] ||
this.objectOutputFunctions.defaultFunc;
Expand Down
2 changes: 1 addition & 1 deletion accessible/jsat/Traversal.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ this.TraversalHelper = {
getHelperPivot: function TraversalHelper_getHelperPivot(aRoot) {
let pivot = this.helperPivotCache.get(aRoot.DOMNode);
if (!pivot) {
pivot = Utils.AccRetrieval.createAccessiblePivot(aRoot);
pivot = Utils.AccService.createAccessiblePivot(aRoot);
this.helperPivotCache.set(aRoot.DOMNode, pivot);
}

Expand Down
24 changes: 12 additions & 12 deletions accessible/jsat/Utils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ this.Utils = { // jshint ignore:line
Ci.nsIDOMWindowUtils);
},

get AccRetrieval() {
if (!this._AccRetrieval) {
this._AccRetrieval = Cc['@mozilla.org/accessibleRetrieval;1'].
getService(Ci.nsIAccessibleRetrieval);
get AccService() {
if (!this._AccService) {
this._AccService = Cc['@mozilla.org/accessibilityService;1'].
getService(Ci.nsIAccessibilityService);
}

return this._AccRetrieval;
return this._AccService;
},

set MozBuildApp(value) {
Expand Down Expand Up @@ -295,7 +295,7 @@ this.Utils = { // jshint ignore:line

getVirtualCursor: function getVirtualCursor(aDocument) {
let doc = (aDocument instanceof Ci.nsIAccessible) ? aDocument :
this.AccRetrieval.getAccessibleFor(aDocument);
this.AccService.getAccessibleFor(aDocument);

return doc.QueryInterface(Ci.nsIAccessibleDocument).virtualCursor;
},
Expand Down Expand Up @@ -539,7 +539,7 @@ State.prototype = {
return !!(this.base & other.base || this.extended & other.extended);
},
toString: function State_toString() {
let stateStrings = Utils.AccRetrieval.
let stateStrings = Utils.AccService.
getStringStates(this.base, this.extended);
let statesArray = new Array(stateStrings.length);
for (let i = 0; i < statesArray.length; i++) {
Expand Down Expand Up @@ -640,20 +640,20 @@ this.Logger = { // jshint ignore:line
}

try {
return'[ ' + Utils.AccRetrieval.getStringRole(aAccessible.role) +
return'[ ' + Utils.AccService.getStringRole(aAccessible.role) +
' | ' + aAccessible.name + ' ]';
} catch (x) {
return '[ defunct ]';
}
},

eventToString: function eventToString(aEvent) {
let str = Utils.AccRetrieval.getStringEventType(aEvent.eventType);
let str = Utils.AccService.getStringEventType(aEvent.eventType);
if (aEvent.eventType == Events.STATE_CHANGE) {
let event = aEvent.QueryInterface(Ci.nsIAccessibleStateChangeEvent);
let stateStrings = event.isExtraState ?
Utils.AccRetrieval.getStringStates(0, event.state) :
Utils.AccRetrieval.getStringStates(event.state, 0);
Utils.AccService.getStringStates(0, event.state) :
Utils.AccService.getStringStates(event.state, 0);
str += ' (' + stateStrings.item(0) + ')';
}

Expand Down Expand Up @@ -887,7 +887,7 @@ PivotContext.prototype = {
hints.push(hint);
} else if (aAccessible.actionCount > 0) {
hints.push({
string: Utils.AccRetrieval.getStringRole(
string: Utils.AccService.getStringRole(
aAccessible.role).replace(/\s/g, '') + '-hint'
});
}
Expand Down
2 changes: 1 addition & 1 deletion accessible/jsat/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ addMessageListener(
eventManager.start();

function contentStarted() {
let accDoc = Utils.AccRetrieval.getAccessibleFor(content.document);
let accDoc = Utils.AccService.getAccessibleFor(content.document);
if (accDoc && !Utils.getState(accDoc).contains(States.BUSY)) {
sendAsyncMessage('AccessFu:ContentStarted');
} else {
Expand Down
4 changes: 2 additions & 2 deletions accessible/tests/crashtests/448064.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

function A(o) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var acc = Components.classes['@mozilla.org/accessibleRetrieval;1']
.getService(Components.interfaces.nsIAccessibleRetrieval);
var acc = Components.classes['@mozilla.org/accessibilityService;1']
.getService(Components.interfaces.nsIAccessibilityService);
return acc.getAccessibleFor(o);
}

Expand Down
6 changes: 3 additions & 3 deletions accessible/tests/crashtests/471493.xul
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<![CDATA[
function doTest()
{
var accRetrieval = SpecialPowers.Cc["@mozilla.org/accessibleRetrieval;1"].
getService(SpecialPowers.Ci.nsIAccessibleRetrieval);
var accService = SpecialPowers.Cc["@mozilla.org/accessibilityService;1"].
getService(SpecialPowers.Ci.nsIAccessibilityService);
var treecol = document.getElementById("col");
var x = treecol.boxObject.screenX;
var y = treecol.boxObject.screenY;
var tree = document.getElementById("tree");
var treeAcc = accRetrieval.getAccessibleFor(tree);
var treeAcc = accService.getAccessibleFor(tree);
treeAcc.getChildAtPoint(x + 1, y + 1);
}
]]>
Expand Down
28 changes: 14 additions & 14 deletions accessible/tests/mochitest/common.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// Interfaces

const nsIAccessibleRetrieval = Components.interfaces.nsIAccessibleRetrieval;
const nsIAccessibilityService = Components.interfaces.nsIAccessibilityService;

const nsIAccessibleEvent = Components.interfaces.nsIAccessibleEvent;
const nsIAccessibleStateChangeEvent =
Expand Down Expand Up @@ -94,25 +94,25 @@ const MAX_TRIM_LENGTH = 100;
Components.utils.import('resource://gre/modules/Services.jsm');

/**
* nsIAccessibleRetrieval service.
* nsIAccessibilityService service.
*/
var gAccRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
getService(nsIAccessibleRetrieval);
var gAccService = Components.classes["@mozilla.org/accessibilityService;1"].
getService(nsIAccessibilityService);

/**
* Enable/disable logging.
*/
function enableLogging(aModules)
{
gAccRetrieval.setLogging(aModules);
gAccService.setLogging(aModules);
}
function disableLogging()
{
gAccRetrieval.setLogging("");
gAccService.setLogging("");
}
function isLogged(aModule)
{
return gAccRetrieval.isLogged(aModule);
return gAccService.isLogged(aModule);
}

/**
Expand Down Expand Up @@ -272,7 +272,7 @@ function getAccessible(aAccOrElmOrID, aInterfaces, aElmObj, aDoNotFailIf)
var acc = (aAccOrElmOrID instanceof nsIAccessible) ? aAccOrElmOrID : null;
if (!acc) {
try {
acc = gAccRetrieval.getAccessibleFor(elm);
acc = gAccService.getAccessibleFor(elm);
} catch (e) {
}

Expand Down Expand Up @@ -363,7 +363,7 @@ function getTabDocAccessible(aAccOrElmOrID)
*/
function getApplicationAccessible()
{
return gAccRetrieval.getApplicationAccessible().
return gAccService.getApplicationAccessible().
QueryInterface(nsIAccessibleApplication);
}

Expand Down Expand Up @@ -584,7 +584,7 @@ function testAccessibleTree(aAccOrElmOrID, aAccTree, aFlags)
function isAccessibleInCache(aNodeOrId)
{
var node = getNode(aNodeOrId);
return gAccRetrieval.getAccessibleFromCache(node) ? true : false;
return gAccService.getAccessibleFromCache(node) ? true : false;
}

/**
Expand Down Expand Up @@ -671,15 +671,15 @@ function testDefunctAccessible(aAcc, aNodeOrId)
*/
function roleToString(aRole)
{
return gAccRetrieval.getStringRole(aRole);
return gAccService.getStringRole(aRole);
}

/**
* Convert states to human readable string.
*/
function statesToString(aStates, aExtraStates)
{
var list = gAccRetrieval.getStringStates(aStates, aExtraStates);
var list = gAccService.getStringStates(aStates, aExtraStates);

var str = "";
for (var index = 0; index < list.length - 1; index++)
Expand All @@ -696,15 +696,15 @@ function statesToString(aStates, aExtraStates)
*/
function eventTypeToString(aEventType)
{
return gAccRetrieval.getStringEventType(aEventType);
return gAccService.getStringEventType(aEventType);
}

/**
* Convert relation type to human readable string.
*/
function relationTypeToString(aRelationType)
{
return gAccRetrieval.getStringRelationType(aRelationType);
return gAccService.getStringRelationType(aRelationType);
}

function getLoadContext() {
Expand Down
12 changes: 6 additions & 6 deletions accessible/tests/mochitest/events/docload_wnd.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<script>
const STATE_BUSY = Components.interfaces.nsIAccessibleStates.STATE_BUSY;

var gRetrieval = null;
var gService = null;
function waitForDocLoad()
{
if (!gRetrieval) {
gRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
getService(Components.interfaces.nsIAccessibleRetrieval);
if (!gService) {
gService = Components.classes["@mozilla.org/accessibilityService;1"].
getService(Components.interfaces.nsIAccessibilityService);
}

var accDoc = gRetrieval.getAccessibleFor(document);
var accDoc = gService.getAccessibleFor(document);

var state = {};
accDoc.getState(state, {});
Expand All @@ -27,7 +27,7 @@
function hideIFrame()
{
var iframe = document.getElementById("iframe");
gRetrieval.getAccessibleFor(iframe.contentDocument);
gService.getAccessibleFor(iframe.contentDocument);
iframe.style.display = 'none';
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions accessible/tests/mochitest/events/test_docload.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

// Force the creation of an accessible for the hidden window's document.
var doc = Services.appShell.hiddenDOMWindow.document;
gAccRetrieval.getAccessibleFor(doc);
gAccService.getAccessibleFor(doc);

// The private hidden window will be lazily created that's why we need to do
// it here *before* loading '../events.js' or else we'll have a duplicate
// reorder event.
var privateDoc = Services.appShell.hiddenPrivateDOMWindow.document;

// Force the creation of an accessible for the private hidden window's doc.
gAccRetrieval.getAccessibleFor(privateDoc);
gAccService.getAccessibleFor(privateDoc);
</script>

<script type="application/javascript"
Expand Down
2 changes: 1 addition & 1 deletion accessible/tests/mochitest/pivot.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ function removeVCRootChecker(aPivot)
*/
function removeVCRootInvoker(aRootNode)
{
this.pivot = gAccRetrieval.createAccessiblePivot(getAccessible(aRootNode));
this.pivot = gAccService.createAccessiblePivot(getAccessible(aRootNode));
this.invoke = function removeVCRootInvoker_invoke()
{
this.pivot.position = this.pivot.root.firstChild;
Expand Down
6 changes: 3 additions & 3 deletions accessible/tests/mochitest/states/z_frames_update.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<script>
function replaceBody()
{
var accRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
getService(Components.interfaces.nsIAccessibleRetrieval);
accRetrieval.getAccessibleFor(document);
var accService = Components.classes["@mozilla.org/accessibilityService;1"].
getService(Components.interfaces.nsIAccessibilityService);
accService.getAccessibleFor(document);

var newBody = document.createElement("body");
newBody.setAttribute("contentEditable", "true");
Expand Down
2 changes: 2 additions & 0 deletions b2g/common.configure
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ def package_moztt(value):

set_define('PACKAGE_MOZTT', package_moztt)

imply_option('MOZ_ENABLE_WARNINGS_AS_ERRORS',
depends(target)(lambda t: t.os == 'Android'), reason='--target')

include('../toolkit/moz.configure')
3 changes: 0 additions & 3 deletions b2g/config/mozconfigs/linux32_gecko/debug
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ export MOZILLA_OFFICIAL=1

export MOZ_TELEMETRY_REPORTING=1

# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
ac_add_options --enable-warnings-as-errors

# Use sccache
no_sccache=

Expand Down
Loading

0 comments on commit 553a2da

Please sign in to comment.