Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merge inbound to m-c. a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rvandermeulen committed Aug 23, 2015
2 parents 4e587ee + 41f71c8 commit 1b62b3c
Show file tree
Hide file tree
Showing 552 changed files with 13,740 additions and 7,585 deletions.
10 changes: 5 additions & 5 deletions accessible/atk/AccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,19 +1089,19 @@ GetInterfacesForProxy(ProxyAccessible* aProxy, uint32_t aInterfaces)
| (1 << MAI_INTERFACE_EDITABLE_TEXT);

if (aInterfaces & Interfaces::HYPERLINK)
interfaces |= MAI_INTERFACE_HYPERLINK_IMPL;
interfaces |= 1 << MAI_INTERFACE_HYPERLINK_IMPL;

if (aInterfaces & Interfaces::VALUE)
interfaces |= MAI_INTERFACE_VALUE;
interfaces |= 1 << MAI_INTERFACE_VALUE;

if (aInterfaces & Interfaces::TABLE)
interfaces |= MAI_INTERFACE_TABLE;
interfaces |= 1 << MAI_INTERFACE_TABLE;

if (aInterfaces & Interfaces::IMAGE)
interfaces |= MAI_INTERFACE_IMAGE;
interfaces |= 1 << MAI_INTERFACE_IMAGE;

if (aInterfaces & Interfaces::DOCUMENT)
interfaces |= MAI_INTERFACE_DOCUMENT;
interfaces |= 1 << MAI_INTERFACE_DOCUMENT;

return interfaces;
}
Expand Down
16 changes: 16 additions & 0 deletions accessible/jsat/AccessFu.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ this.AccessFu = { // jshint ignore:line
Services.obs.addObserver(this, 'Accessibility:Focus', false);
Services.obs.addObserver(this, 'Accessibility:ActivateObject', false);
Services.obs.addObserver(this, 'Accessibility:LongPress', false);
Services.obs.addObserver(this, 'Accessibility:ScrollForward', false);
Services.obs.addObserver(this, 'Accessibility:ScrollBackward', false);
Services.obs.addObserver(this, 'Accessibility:MoveByGranularity', false);
Utils.win.addEventListener('TabOpen', this);
Utils.win.addEventListener('TabClose', this);
Expand Down Expand Up @@ -187,6 +189,8 @@ this.AccessFu = { // jshint ignore:line
Services.obs.removeObserver(this, 'Accessibility:Focus');
Services.obs.removeObserver(this, 'Accessibility:ActivateObject');
Services.obs.removeObserver(this, 'Accessibility:LongPress');
Services.obs.removeObserver(this, 'Accessibility:ScrollForward');
Services.obs.removeObserver(this, 'Accessibility:ScrollBackward');
Services.obs.removeObserver(this, 'Accessibility:MoveByGranularity');

delete this._quicknavModesPref;
Expand Down Expand Up @@ -315,6 +319,12 @@ this.AccessFu = { // jshint ignore:line
case 'Accessibility:LongPress':
this.Input.sendContextMenuMessage();
break;
case 'Accessibility:ScrollForward':
this.Input.androidScroll('forward');
break;
case 'Accessibility:ScrollBackward':
this.Input.androidScroll('backward');
break;
case 'Accessibility:Focus':
this._focused = JSON.parse(aData);
if (this._focused) {
Expand Down Expand Up @@ -837,6 +847,12 @@ var Input = {
adjustRange: aAdjustRange });
},

androidScroll: function androidScroll(aDirection) {
let mm = Utils.getMessageManager(Utils.CurrentBrowser);
mm.sendAsyncMessage('AccessFu:AndroidScroll',
{ direction: aDirection, origin: 'top' });
},

moveByGranularity: function moveByGranularity(aDetails) {
const MOVEMENT_GRANULARITY_PARAGRAPH = 8;

Expand Down
24 changes: 23 additions & 1 deletion accessible/jsat/ContentControl.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ this.ContentControl.prototype = {
'AccessFu:AutoMove',
'AccessFu:Activate',
'AccessFu:MoveCaret',
'AccessFu:MoveByGranularity'],
'AccessFu:MoveByGranularity',
'AccessFu:AndroidScroll'],

start: function cc_start() {
let cs = this._contentScope.get();
Expand Down Expand Up @@ -91,6 +92,27 @@ this.ContentControl.prototype = {
}
},

handleAndroidScroll: function cc_handleAndroidScroll(aMessage) {
let vc = this.vc;
let position = vc.position;

if (aMessage.json.origin != 'child' && this.sendToChild(vc, aMessage)) {
// Forwarded succesfully to child cursor.
return;
}

// Counter-intuitive, but scrolling backward (ie. up), actually should
// increase range values.
if (this.adjustRange(position, aMessage.json.direction === 'backward')) {
return;
}

this._contentScope.get().sendAsyncMessage('AccessFu:DoScroll',
{ bounds: Utils.getBounds(position, true),
page: aMessage.json.direction === 'forward' ? 1 : -1,
horizontal: false });
},

handleMoveCursor: function cc_handleMoveCursor(aMessage) {
let origin = aMessage.json.origin;
let action = aMessage.json.action;
Expand Down
14 changes: 14 additions & 0 deletions accessible/tests/mochitest/jsat/jsatcommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,20 @@ var ContentMessages = {
}
},

androidScrollForward: function adjustUp() {
return {
name: 'AccessFu:AndroidScroll',
json: { origin: 'top', direction: 'forward' }
};
},

androidScrollBackward: function adjustDown() {
return {
name: 'AccessFu:AndroidScroll',
json: { origin: 'top', direction: 'backward' }
};
},

focusSelector: function focusSelector(aSelector, aBlur) {
return {
name: 'AccessFuTest:Focus',
Expand Down
2 changes: 2 additions & 0 deletions accessible/tests/mochitest/jsat/test_content_integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
[ContentMessages.simpleMovePrevious,
new ExpectedCursorChange(['much range', '6', {'string': 'slider'}, 'such app'])],
[ContentMessages.moveOrAdjustDown(), new ExpectedValueChange('5')],
[ContentMessages.androidScrollForward(), new ExpectedValueChange('6')],
[ContentMessages.androidScrollBackward(), new ExpectedValueChange('5')],
[ContentMessages.simpleMovePrevious,
new ExpectedCursorChange(['much range', {'string': 'label'}])],
[ContentMessages.simpleMovePrevious,
Expand Down
2 changes: 1 addition & 1 deletion addon-sdk/source/test/context-menu/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const TEST_DOC_URL = module.uri.replace(/context-menu\/test-helper\.js$/, "test-
function TestHelper(assert, done) {
// Methods on the wrapped test can be called on this object.
for (var prop in assert)
this[prop] = () => assert[prop].apply(assert, arguments);
this[prop] = (...args) => assert[prop].apply(assert, args);
this.assert = assert;
this.end = done;
this.loaders = [];
Expand Down
4 changes: 2 additions & 2 deletions addon-sdk/source/test/event/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { defer } = require("sdk/core/promise");
* A promise resolved once the delay given is passed, or the object
* receives the event specified
*/
const wait = (target, type, capture) => {
const wait = function(target, type, capture) {
let { promise, resolve, reject } = defer();

if (!arguments.length) {
Expand Down Expand Up @@ -105,4 +105,4 @@ exports.FIFO = scenario(function(target, expected, actual) {
return expected.reduce(function(result, value) {
return result.concat(value + "#1", value + "#2", value + "#3");
}, []);
});
});
7 changes: 1 addition & 6 deletions b2g/app/b2g.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,6 @@ 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"

// W3C draft pointer events
pref("dom.w3c_pointer_events.enabled", false);
// W3C touch-action css property (related to touch and pointer events)
pref("layout.css.touch_action.enabled", false);

#ifdef MOZ_SAFE_BROWSING
// Safe browsing does nothing unless this pref is set
pref("browser.safebrowsing.enabled", false);
Expand Down Expand Up @@ -603,7 +598,7 @@ pref("app.update.incompatible.mode", 0);
pref("app.update.staging.enabled", true);
pref("app.update.service.enabled", true);

pref("app.update.url", "https://aus4.mozilla.org/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%PRODUCT_DEVICE%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("app.update.url", "https://aus5.mozilla.org/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%PRODUCT_DEVICE%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");

// Interval at which update manifest is fetched. In units of seconds.
Expand Down
5 changes: 0 additions & 5 deletions b2g/dev/app/mulet.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@ pref("devtools.toolbox.sidebar.width", 800);
pref("browser.tabs.remote.autostart", false);
pref("browser.tabs.remote.autostart.1", false);
pref("browser.tabs.remote.autostart.2", false);

// W3C draft pointer events
pref("dom.w3c_pointer_events.enabled", false);
// W3C touch-action css property (related to touch and pointer events)
pref("layout.css.touch_action.enabled", false);
18 changes: 8 additions & 10 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pref("app.update.badge", false);
pref("app.update.staging.enabled", true);

// Update service URL:
pref("app.update.url", "https://aus4.mozilla.org/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("app.update.url", "https://aus5.mozilla.org/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
// app.update.url.manual is in branding section
// app.update.url.details is in branding section

Expand Down Expand Up @@ -489,17 +489,10 @@ pref("dom.disable_window_move_resize", false);
// prevent JS from monkeying with window focus, etc
pref("dom.disable_window_flip", true);

// Disable touch events on Desktop Firefox by default
// until they are properly supported (bug 736048)
// Disable touch events on Desktop Firefox by default until they are properly
// supported (bug 736048)
pref("dom.w3c_touch_events.enabled", 0);

#ifdef NIGHTLY_BUILD
// W3C draft pointer events
pref("dom.w3c_pointer_events.enabled", true);
// W3C touch-action css property (related to touch and pointer events)
pref("layout.css.touch_action.enabled", true);
#endif

// popups.policy 1=allow,2=reject
pref("privacy.popups.policy", 1);
pref("privacy.popups.usecustom", true);
Expand Down Expand Up @@ -1184,7 +1177,12 @@ pref("security.sandbox.windows.log", false);
// 3 - the strongest settings we seem to be able to use without breaking
// everything, but will probably cause some functionality restrictions
pref("dom.ipc.plugins.sandbox-level.default", 0);
#if defined(_AMD64_)
// The lines in PluginModuleParent.cpp should be changed in line with this.
pref("dom.ipc.plugins.sandbox-level.flash", 2);
#else
pref("dom.ipc.plugins.sandbox-level.flash", 0);
#endif

#if defined(MOZ_CONTENT_SANDBOX)
// This controls the strength of the Windows content process sandbox for testing
Expand Down
17 changes: 17 additions & 0 deletions browser/base/content/tabbrowser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3077,6 +3077,11 @@
// Map from tabs to STATE_* (below).
tabState: new Map(),

// Keep an exact list of content processes (tabParent) in which
// we're actively suppressing the display port. This gives a robust
// way to make sure we don't forget to un-suppress.
activeSuppressDisplayport: new Set(),

// Set of tabs that might be visible right now. We maintain
// this set because we can't be sure when a tab is actually
// drawn. A tab is added to this set when we ask to make it
Expand Down Expand Up @@ -3140,6 +3145,11 @@
window.removeEventListener("TabRemotenessChange", this);

this.tabbrowser._switcher = null;

this.activeSuppressDisplayport.forEach(function(tabParent) {
tabParent.suppressDisplayport(false);
});
this.activeSuppressDisplayport.clear();
},

finish: function() {
Expand Down Expand Up @@ -3438,6 +3448,13 @@

this.requestedTab = tab;

let browser = this.requestedTab.linkedBrowser;
let fl = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
if (fl && fl.tabParent && !this.activeSuppressDisplayport.has(fl.tabParent)) {
fl.tabParent.suppressDisplayport(true);
this.activeSuppressDisplayport.add(fl.tabParent);
}

this.preActions();

clearTimeout(this.unloadTimer);
Expand Down
1 change: 0 additions & 1 deletion browser/base/content/test/general/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ skip-if = e10s # Bug 1093153 - no about:home support yet
[browser_search_favicon.js]
[browser_alltabslistener.js]
[browser_audioTabIcon.js]
skip-if = e10s # Bug 1192449
[browser_autocomplete_a11y_label.js]
skip-if = e10s # Bug 1101993 - times out for unknown reasons when run in the dir (works on its own)
[browser_autocomplete_cursor.js]
Expand Down
3 changes: 0 additions & 3 deletions browser/base/content/test/general/browser_audioTabIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ function* test_browser_swapping(tab, browser) {
}, function*(newBrowser) {
yield test_swapped_browser(tab, newBrowser, true)

// FIXME: this is needed to work around bug 1190903.
yield new Promise(resolve => setTimeout(resolve, 3000));

// Now, test swapping with a muted but not playing tab.
// Note that the tab remains muted, so we only need to pause playback.
tab = gBrowser.getTabForBrowser(newBrowser);
Expand Down
18 changes: 11 additions & 7 deletions browser/base/content/test/general/browser_selectpopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// in a child process. This is different than single-process as a <menulist> is used
// to implement the dropdown list.

const XHTML_DTD = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';

const PAGECONTENT =
"<html xmlns='http://www.w3.org/1999/xhtml'>" +
"<body onload='gChangeEvents = 0; document.body.firstChild.focus()'><select onchange='gChangeEvents++'>" +
Expand All @@ -19,8 +21,8 @@ const PAGECONTENT =
" </optgroup>" +
" <option value='Six' disabled='true'>Six</option>" +
" <optgroup label='Third Group'>" +
" <option value='Seven'>Seven</option>" +
" <option value='Eight'>Eight</option>" +
" <option value='Seven'> Seven </option>" +
" <option value='Eight'>&nbsp;&nbsp;Eight&nbsp;&nbsp;</option>" +
" </optgroup></select><input />" +
"</body></html>";

Expand Down Expand Up @@ -58,11 +60,11 @@ function getChangeEvents()
});
}

function doSelectTests(contentType)
function doSelectTests(contentType, dtd)
{
let tab = gBrowser.selectedTab = gBrowser.addTab();
let browser = gBrowser.getBrowserForTab(tab);
yield promiseTabLoadEvent(tab, "data:" + contentType + "," + escape(PAGECONTENT));
yield promiseTabLoadEvent(tab, "data:" + contentType + "," + escape(dtd + "\n" + PAGECONTENT));

yield SimpleTest.promiseFocus(browser.contentWindow);

Expand Down Expand Up @@ -127,15 +129,17 @@ function doSelectTests(contentType)
EventUtils.synthesizeKey("VK_TAB", { shiftKey: true });
is((yield getChangeEvents()), isWindows ? 2 : 1, "Tab away from select with change - number of change events");

is(selectPopup.lastChild.previousSibling.label, "Seven", "Spaces collapsed");
is(selectPopup.lastChild.label, "\xA0\xA0Eight\xA0\xA0", "Non-breaking spaces not collapsed");

gBrowser.removeCurrentTab();
}

add_task(function*() {
yield doSelectTests("text/html");
yield doSelectTests("text/html", "");
});

add_task(function*() {
yield doSelectTests("application/xhtml+xml");
yield doSelectTests("application/xhtml+xml", XHTML_DTD);
});


8 changes: 4 additions & 4 deletions browser/base/content/test/general/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ let FullZoomHelper = {
let didPs = false;
let didZoom = false;

gBrowser.addEventListener("pageshow", function (event) {
gBrowser.removeEventListener("pageshow", arguments.callee, true);
gBrowser.addEventListener("pageshow", function listener(event) {
gBrowser.removeEventListener("pageshow", listener, true);
didPs = true;
if (didZoom)
resolve();
Expand Down Expand Up @@ -718,9 +718,9 @@ function assertWebRTCIndicatorStatus(expected) {
let win = Services.wm.getMostRecentWindow("Browser:WebRTCGlobalIndicator");
if (win) {
yield new Promise((resolve, reject) => {
win.addEventListener("unload", (e) => {
win.addEventListener("unload", function listener(e) {
if (e.target == win.document) {
win.removeEventListener("unload", arguments.callee);
win.removeEventListener("unload", listener);
resolve();
}
}, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ add_task(function* test_date_container() {

// Execute the delete command and check visit has been removed.
let promiseURIRemoved = promiseHistoryNotification("onDeleteURI",
() => TEST_URI.equals(arguments[0]));
v => TEST_URI.equals(v));
PO._places.controller.doCommand("cmd_delete");
yield promiseURIRemoved;

Expand Down Expand Up @@ -125,7 +125,7 @@ add_task(function* test_query_on_toolbar() {

// Execute the delete command and check bookmark has been removed.
let promiseItemRemoved = promiseBookmarksNotification("onItemRemoved",
() => query.guid == arguments[5]);
(...args) => query.guid == args[5]);
PO._places.controller.doCommand("cmd_delete");
yield promiseItemRemoved;

Expand Down
Loading

0 comments on commit 1b62b3c

Please sign in to comment.