Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'embedlite' into embedlite_processImpl
  • Loading branch information
tmeshkova committed Dec 4, 2014
2 parents 985593a + a72164c commit b712677
Show file tree
Hide file tree
Showing 3,226 changed files with 126,689 additions and 48,946 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .hgtags
Expand Up @@ -105,3 +105,11 @@ cfde3603b0206e119abea76fdd6e134b634348f1 FIREFOX_AURORA_31_BASE
dc23164ba2a289a8b22902e30990c77d9677c214 FIREFOX_AURORA_33_BASE
c360f3d1c00d73b0c1fb0a2c0da525cb55e58b83 FIREFOX_AURORA_34_BASE
cec1a116c4f9a3e887d52e9a26e8bbec200fe162 FIREFOX_AURORA_35_BASE
ca89fe55717059e4e43040d16d260765ffa9dca7 FIREFOX_AURORA_36_BASE
6047f510fb73c7dbe9866066fb01ddda3c170c9c FIREFOX_AURORA_37_BASE
ca89fe55717059e4e43040d16d260765ffa9dca7 FIREFOX_AURORA_36_BASE
0000000000000000000000000000000000000000 FIREFOX_AURORA_36_BASE
6047f510fb73c7dbe9866066fb01ddda3c170c9c FIREFOX_AURORA_37_BASE
0000000000000000000000000000000000000000 FIREFOX_AURORA_37_BASE
0000000000000000000000000000000000000000 FIREFOX_AURORA_36_BASE
b297a6727acfd21e757ddd38cd61894812666265 FIREFOX_AURORA_36_BASE
7 changes: 6 additions & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,9 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 1084498 - Android build tools dependency.
Bug 1105308 - Cleanup BluetoothUtils.{cpp,h}

This patch set moves some files around and requires a rebuild
of the build system's dependency information.

Merge day clobber
2 changes: 2 additions & 0 deletions accessible/base/ARIAMap.cpp
Expand Up @@ -681,6 +681,7 @@ static const EStateRule sWAIUnivStateMap[] = {
eARIAExpanded, // Currently under spec review but precedent exists
eARIAHasPopup, // Note this is technically a "property"
eARIAInvalid,
eARIAModal,
eARIARequired, // XXX not global, Bug 553117
eARIANone
};
Expand Down Expand Up @@ -716,6 +717,7 @@ static const AttrCharacteristics gWAIUnivAttrMap[] = {
{&nsGkAtoms::aria_labelledby, ATTR_BYPASSOBJ | ATTR_GLOBAL },
{&nsGkAtoms::aria_level, ATTR_BYPASSOBJ }, /* handled via groupPosition */
{&nsGkAtoms::aria_live, ATTR_VALTOKEN | ATTR_GLOBAL },
{&nsGkAtoms::aria_modal, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
{&nsGkAtoms::aria_multiline, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_multiselectable, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
{&nsGkAtoms::aria_owns, ATTR_BYPASSOBJ | ATTR_GLOBAL },
Expand Down
10 changes: 5 additions & 5 deletions accessible/base/ARIAMap.h
Expand Up @@ -228,15 +228,15 @@ uint64_t UniversalStatesFor(mozilla::dom::Element* aElement);
uint8_t AttrCharacteristicsFor(nsIAtom* aAtom);

/**
* Represents a simple enumerator for iterating through ARIA attributes
* exposed as object attributes on a given accessible.
* Represents a simple enumerator for iterating through ARIA attributes
* exposed as object attributes on a given accessible.
*/
class AttrIterator
{
public:
explicit AttrIterator(nsIContent* aContent) :
mContent(aContent), mAttrIdx(0)
{
explicit AttrIterator(nsIContent* aContent) :
mContent(aContent), mAttrIdx(0)
{
mAttrCount = mContent->GetAttrCount();
}

Expand Down
10 changes: 10 additions & 0 deletions accessible/base/ARIAStateMap.cpp
Expand Up @@ -185,6 +185,16 @@ aria::MapToState(EStateRule aRule, dom::Element* aElement, uint64_t* aState)
return true;
}

case eARIAModal:
{
static const TokenTypeData data(
nsGkAtoms::aria_modal, eBoolType,
0, states::MODAL);

MapTokenType(aElement, aState, data);
return true;
}

case eARIAMultiline:
{
static const TokenTypeData data(
Expand Down
1 change: 1 addition & 0 deletions accessible/base/ARIAStateMap.h
Expand Up @@ -33,6 +33,7 @@ enum EStateRule
eARIAExpanded,
eARIAHasPopup,
eARIAInvalid,
eARIAModal,
eARIAMultiline,
eARIAMultiSelectable,
eARIAOrientation,
Expand Down
3 changes: 3 additions & 0 deletions accessible/base/nsAccessibilityService.cpp
Expand Up @@ -1555,6 +1555,9 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
if (aContext->IsList() &&
aContext->GetContent() == aContent->GetParent()) {
newAcc = new HTMLLIAccessible(aContent, document);
} else {
// Otherwise create a generic text accessible to avoid text jamming.
newAcc = new HyperTextAccessibleWrap(aContent, document);
}
break;
case eHTMLSelectListType:
Expand Down
2 changes: 1 addition & 1 deletion accessible/generic/HyperTextAccessible.cpp
Expand Up @@ -508,7 +508,7 @@ HyperTextAccessible::FindOffset(uint32_t aOffset, nsDirection aDirection,
const bool kIsKeyboardSelect = true; // is keyboard selection
const bool kIsVisualBidi = false; // use visual order for bidi text
nsPeekOffsetStruct pos(aAmount, aDirection, innerContentOffset,
0, kIsJumpLinesOk, kIsScrollViewAStop,
nsPoint(0, 0), kIsJumpLinesOk, kIsScrollViewAStop,
kIsKeyboardSelect, kIsVisualBidi,
aWordMovementType);
nsresult rv = frameAtOffset->PeekOffset(&pos);
Expand Down
18 changes: 13 additions & 5 deletions accessible/jsat/Utils.jsm
Expand Up @@ -160,14 +160,14 @@ this.Utils = { // jshint ignore:line
},

get AllMessageManagers() {
let messageManagers = [];
let messageManagers = new Set();

function collectLeafMessageManagers(mm) {
for (let i = 0; i < mm.childCount; i++) {
let childMM = mm.getChildAt(i);

if ('sendAsyncMessage' in childMM) {
messageManagers.push(childMM);
messageManagers.add(childMM);
} else {
collectLeafMessageManagers(childMM);
}
Expand All @@ -179,12 +179,19 @@ this.Utils = { // jshint ignore:line
let document = this.CurrentContentDoc;

if (document) {
if (document.location.host === 'b2g') {
// The document is a b2g app chrome (ie. Mulet).
let contentBrowser = this.win.content.shell.contentBrowser;
messageManagers.add(this.getMessageManager(contentBrowser));
document = contentBrowser.contentDocument;
}

let remoteframes = document.querySelectorAll('iframe');

for (let i = 0; i < remoteframes.length; ++i) {
let mm = this.getMessageManager(remoteframes[i]);
if (mm) {
messageManagers.push(mm);
messageManagers.add(mm);
}
}

Expand Down Expand Up @@ -457,9 +464,10 @@ this.Utils = { // jshint ignore:line
typeof aDetails === 'string' ? { eventType : aDetails } : aDetails)
};
let window = this.win;
if (window.shell) {
let shell = window.shell || window.content.shell;
if (shell) {
// On B2G device.
window.shell.sendChromeEvent(details);
shell.sendChromeEvent(details);
} else {
// Dispatch custom event to have support for desktop and screen reader
// emulator add-on.
Expand Down
2 changes: 1 addition & 1 deletion accessible/jsat/content-script.js
Expand Up @@ -23,7 +23,7 @@ XPCOMUtils.defineLazyModuleGetter(this, 'Roles',
XPCOMUtils.defineLazyModuleGetter(this, 'States',
'resource://gre/modules/accessibility/Constants.jsm');

Logger.debug('content-script.js');
Logger.info('content-script.js', content.document.location);

let eventManager = null;
let contentControl = null;
Expand Down
16 changes: 10 additions & 6 deletions accessible/tests/mochitest/attributes/test_obj.html
Expand Up @@ -28,16 +28,18 @@
testAbsentAttrs(getNode("atomic_false").firstChild, {"container-atomic" : "false"});

testAttrs("autocomplete", {"autocomplete" : "true"}, true);
testAttrs("checkbox", {"checkable" : "true"}, true);
testAttrs("checkedCheckbox", {"checkable" : "true"}, true);
testAttrs("checkedMenuitem", {"checkable" : "true"}, true);
testAttrs("checkedOption", {"checkable" : "true"}, true);
testAttrs("checkedRadio", {"checkable" : "true"}, true);
testAttrs("checkedTreeitem", {"checkable" : "true"}, true);
testAttrs("checkbox", {"checkable" : "true"}, true);
testAttrs("checkedCheckbox", {"checkable" : "true"}, true);
testAttrs("checkedMenuitem", {"checkable" : "true"}, true);
testAttrs("checkedOption", {"checkable" : "true"}, true);
testAttrs("checkedRadio", {"checkable" : "true"}, true);
testAttrs("checkedTreeitem", {"checkable" : "true"}, true);
testAttrs("dropeffect", {"dropeffect" : "copy"}, true);
testAttrs("grabbed", {"grabbed" : "true"}, true);
testAbsentAttrs("haspopup", { "haspopup": "false" });
testAttrs("hidden", {"hidden" : "true"}, true);
testAbsentAttrs("hidden_false", { "hidden": "false" });
testAbsentAttrs("modal", {"modal" : "true"});
testAttrs("sortAscending", {"sort" : "ascending"}, true);
testAttrs("sortDescending", {"sort" : "descending"}, true);
testAttrs("sortNone", {"sort" : "none"}, true);
Expand Down Expand Up @@ -198,8 +200,10 @@
<div id="checkedTreeitem" role="treeitem" aria-checked="true"></div>
<div id="dropeffect" aria-dropeffect="copy"></div>
<div id="grabbed" aria-grabbed="true"></div>
<div id="haspopup" aria-haspopup="true"></div>
<div id="hidden" aria-hidden="true"></div>
<div id="hidden_false" aria-hidden="false"></div>
<div id="modal" aria-modal="true"></div>
<div id="sortAscending" role="columnheader" aria-sort="ascending"></div>
<div id="sortDescending" role="columnheader" aria-sort="descending"></div>
<div id="sortNone" role="columnheader" aria-sort="none"></div>
Expand Down
1 change: 1 addition & 0 deletions accessible/tests/mochitest/states.js
Expand Up @@ -42,6 +42,7 @@ const EXT_STATE_EDITABLE = nsIAccessibleStates.EXT_STATE_EDITABLE;
const EXT_STATE_ENABLED = nsIAccessibleStates.EXT_STATE_ENABLED;
const EXT_STATE_EXPANDABLE = nsIAccessibleStates.EXT_STATE_EXPANDABLE;
const EXT_STATE_HORIZONTAL = nsIAccessibleStates.EXT_STATE_HORIZONTAL;
const EXT_STATE_MODAL = nsIAccessibleStates.EXT_STATE_MODAL;
const EXT_STATE_MULTI_LINE = nsIAccessibleStates.EXT_STATE_MULTI_LINE;
const EXT_STATE_PINNED = nsIAccessibleStates.EXT_STATE_PINNED;
const EXT_STATE_SENSITIVE = nsIAccessibleStates.EXT_STATE_SENSITIVE;
Expand Down
6 changes: 6 additions & 0 deletions accessible/tests/mochitest/states/test_aria.html
Expand Up @@ -97,6 +97,10 @@
// disabled, too. See bug 429285.
testAriaDisabledTree("group");

// aria-modal
testStates("aria_modal", 0, EXT_STATE_MODAL);
testStates("aria_modal_false", 0, 0, 0, EXT_STATE_MODAL);

// aria-multiline
testStates("aria_multiline_textbox", 0, EXT_STATE_MULTI_LINE);

Expand Down Expand Up @@ -379,6 +383,8 @@
<div id="aria_mixed_checkbox" role="checkbox" aria-checked="mixed">
I might agree
</div>
<div id="aria_modal" aria-modal="true">modal stuff</div>
<div id="aria_modal_false" aria-modal="false">non modal stuff</div>div>
<div id="aria_multiline_textbox" role="textbox" aria-multiline="true"></div>
<div id="aria_multiselectable_listbox" role="listbox" aria-multiselectable="true"></div>
<div id="aria_pressed_button" role="button" aria-pressed="true">Button</div>
Expand Down
13 changes: 9 additions & 4 deletions accessible/tests/mochitest/tree/test_aria_list.html
Expand Up @@ -34,10 +34,15 @@
accTree = { // div@role="list"
role: ROLE_LIST,
children: [
{ // li text leaf
role: ROLE_TEXT_LEAF,
name: "item1",
children: [ ]
{ // li
role: ROLE_PARAGRAPH,
children: [
{ // li text leaf
role: ROLE_TEXT_LEAF,
name: "item1",
children: [ ]
}
]
},
{ // li@role="listitem"
role: ROLE_LISTITEM,
Expand Down
15 changes: 15 additions & 0 deletions accessible/tests/mochitest/tree/test_aria_presentation.html
Expand Up @@ -56,6 +56,15 @@
] };
testAccessibleTree("tblfocusable_cnt", tree);

// Presentation list, expose generic accesisble for list items.
tree =
{ SECTION: [ // container
{ PARAGRAPH: [ // li generic accessible
{ TEXT_LEAF: [ ] } // li text
] }
] };
testAccessibleTree("list_cnt", tree);

// Has ARIA globals or referred by ARIA relationship.
tree =
{ SECTION: [ // container
Expand Down Expand Up @@ -113,6 +122,12 @@
</table>
</div>

<div id="list_cnt">
<ul role="presentation">
<li>item</li>
</ul>
</div>

<div id="airaglobalprop_cnt">
<label role="presentation" aria-owns="ariaowned">has aria-owns</label>
<label role="presentation" id="ariaowned">referred by aria-owns</label>
Expand Down
12 changes: 6 additions & 6 deletions accessible/tests/mochitest/tree/test_brokencontext.html
Expand Up @@ -80,15 +80,15 @@

ok(!isAccessible("presentation_ul"),
"presentational ul shouldn't be accessible");
ok(!isAccessible("item_in_presentation_ul"),
"li in presentational ul shouldn't be accessible");
ok(!isAccessible("styleditem_in_presentation_ul"),
"list styled span in presentational ul shouldn't be accessible");
ok(isAccessible("item_in_presentation_ul"),
"li in presentational ul should have generic accessible");
ok(isAccessible("styleditem_in_presentation_ul"),
"list styled span in presentational ul should have generic accessible");

ok(!isAccessible("presentation_ol"),
"presentational ol shouldn't be accessible");
ok(!isAccessible("item_in_presentation_ol"),
"li in presentational ol shouldn't be accessible");
ok(isAccessible("item_in_presentation_ol"),
"li in presentational ol should have generic accessible");

ok(!isAccessible("presentation_dl"),
"presentational dl shouldn't be accessible");
Expand Down
17 changes: 11 additions & 6 deletions accessible/tests/mochitest/tree/test_combobox.xul
Expand Up @@ -24,6 +24,15 @@
//////////////////////////////////////////////////////////////////////////
// menulist
var selectedOptionChildren = [];
if (MAC) {
// checkmark is part of the Mac menu styling
selectedOptionChildren = [{
role: ROLE_STATICTEXT,
children: []
}];
}
var accTree = {
role: ROLE_COMBOBOX,
children: [
Expand All @@ -32,7 +41,7 @@
children: [
{
role: ROLE_COMBOBOX_OPTION,
children: []
children: selectedOptionChildren
},
{
role: ROLE_COMBOBOX_OPTION,
Expand All @@ -43,11 +52,7 @@
]
};
if (!MAC) {
testAccessibleTree("menulist", accTree);
} else {
todo(false, "Make this test pass on OSX (bug 650366)");
}
testAccessibleTree("menulist", accTree);
//////////////////////////////////////////////////////////////////////////
// editable menulist
Expand Down
1 change: 1 addition & 0 deletions addon-sdk/Makefile.in
Expand Up @@ -12,6 +12,7 @@ ADDONS = $(patsubst $(ADDONSRC)/%/package.json,$(TESTADDONS)/%.xpi,$(wildcard $(
INSTALL_TARGETS += test_addons
test_addons_FILES = $(ADDONS)
test_addons_DEST = $(TESTROOT)
test_addons_TARGET := misc

sinclude $(topsrcdir)/config/rules.mk

Expand Down
2 changes: 2 additions & 0 deletions addon-sdk/moz.build
Expand Up @@ -9,6 +9,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

HAS_MISC_RULE = True

BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
JETPACK_PACKAGE_MANIFESTS += ['source/test/jetpack-package.ini']
JETPACK_ADDON_MANIFESTS += ['source/test/addons/jetpack-addon.ini']
Expand Down
38 changes: 35 additions & 3 deletions addon-sdk/source/lib/sdk/indexed-db.js
Expand Up @@ -36,10 +36,42 @@ let principal = Cc["@mozilla.org/scriptsecuritymanager;1"].
getService(Ci.nsIScriptSecurityManager).
getCodebasePrincipal(principaluri);

function toArray(args) {
return Array.prototype.slice.call(args);
}

function openInternal(args, forPrincipal, deleting) {
if (forPrincipal) {
args = toArray(args);
} else {
args = [principal].concat(toArray(args));
}
if (args.length == 2) {
args.push({ storage: "persistent" });
} else if (!deleting && args.length >= 3 && typeof args[2] === "number") {
args[2] = { version: args[2], storage: "persistent" };
}

if (deleting) {
return indexedDB.deleteForPrincipal.apply(indexedDB, args);
}

return indexedDB.openForPrincipal.apply(indexedDB, args);
}

exports.indexedDB = Object.freeze({
open: indexedDB.openForPrincipal.bind(indexedDB, principal),
openForPrincipal: indexedDB.openForPrincipal.bind(indexedDB),
deleteDatabase: indexedDB.deleteForPrincipal.bind(indexedDB, principal),
open: function () {
return openInternal(arguments, false, false);
},
deleteDatabase: function () {
return openInternal(arguments, false, true);
},
openForPrincipal: function () {
return openInternal(arguments, true, false);
},
deleteForPrincipal: function () {
return openInternal(arguments, true, true);
},
cmp: indexedDB.cmp.bind(indexedDB)
});

Expand Down

0 comments on commit b712677

Please sign in to comment.