Skip to content

Commit

Permalink
Merge inbound to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoroiu committed Apr 10, 2018
2 parents 8fffdac + 4f4a35c commit fd524a0
Show file tree
Hide file tree
Showing 91 changed files with 1,832 additions and 625 deletions.
13 changes: 6 additions & 7 deletions accessible/tests/mochitest/name/test_general.xul
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@
//////////////////////////////////////////////////////////////////////////
// Name from subtree (single relation labelled_by).
// Gets the name from text nodes contained by nested elements.
testName("btn_labelledby_mixed", "nomore text");
// Gets the name from text nodes and selected item of menulist
// (other items are ignored).
testName("btn_labelledby_mixed_menulist",
"nomore text selected item more text");
// Gets the name from text nodes contained by nested elements, ignores
// hidden elements (bug 443081).
testName("btn_labelledby_mixed_hidden_child", "nomore text2");
// Gets the name from hidden text nodes contained by nested elements,
// Gets the name from hidden text nodes contained by nested elements,
// (label element is hidden entirely), (bug 443081)
testName("btn_labelledby_mixed_hidden", "lala more hidden text");
Expand Down Expand Up @@ -234,7 +234,7 @@
<checkbox id="rememberHistoryDays"
label="Remember "
aria-labelledby="rememberHistoryDays historyDays rememberAfter"/>
<textbox id="historyDays" type="number" size="3" value="3"
<textbox id="historyDays" type="number" value="3"
aria-labelledby="rememberHistoryDays historyDays rememberAfter"/>
<label id="rememberAfter">days</label>

Expand Down Expand Up @@ -313,8 +313,8 @@
class="first"
role="group"/>

<box id="box_label_anon2"
class="second"
<box id="box_label_anon2"
class="second"
role="group"/>

<!-- tooltiptext -->
Expand Down Expand Up @@ -379,4 +379,3 @@
</vbox> <!-- close tests area -->
</hbox> <!-- close main area -->
</window>

4 changes: 4 additions & 0 deletions browser/base/content/browser-context.inc
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@
label="&inspectContextMenu.label;"
accesskey="&inspectContextMenu.accesskey;"
oncommand="gContextMenu.inspectNode();"/>
<menuitem id="context-inspect-a11y"
hidden="true"
label="&inspectA11YContextMenu.label;"
oncommand="gContextMenu.inspectA11Y();"/>
<menuseparator id="context-media-eme-separator" hidden="true"/>
<menuitem id="context-media-eme-learnmore"
class="menuitem-iconic"
Expand Down
14 changes: 14 additions & 0 deletions browser/base/content/nsContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,14 @@ nsContextMenu.prototype = {
Services.prefs.getBoolPref("devtools.inspector.enabled", true) &&
!Services.prefs.getBoolPref("devtools.policy.disabled", false);

var showInspectA11Y = showInspect &&
// Only when accessibility service started.
Services.appinfo.accessibilityEnabled &&
this.inTabBrowser &&
Services.prefs.getBoolPref("devtools.enabled", true) &&
Services.prefs.getBoolPref("devtools.accessibility.enabled", true) &&
!Services.prefs.getBoolPref("devtools.policy.disabled", false);

this.showItem("context-viewsource", shouldShow);
this.showItem("context-viewinfo", shouldShow);
// The page info is broken for WebExtension popups, as the browser is
Expand All @@ -447,6 +455,8 @@ nsContextMenu.prototype = {
this.showItem("inspect-separator", showInspect);
this.showItem("context-inspect", showInspect);

this.showItem("context-inspect-a11y", showInspectA11Y);

this.showItem("context-sep-viewsource", shouldShow);

// Set as Desktop background depends on whether an image was clicked on,
Expand Down Expand Up @@ -754,6 +764,10 @@ nsContextMenu.prototype = {
return DevToolsShim.inspectNode(gBrowser.selectedTab, this.targetSelectors);
},

inspectA11Y() {
return DevToolsShim.inspectA11Y(gBrowser.selectedTab, this.targetSelectors);
},

_openLinkInParameters(extra) {
let params = { charset: gContextMenuContentData.charSet,
originPrincipal: this.principal,
Expand Down
6 changes: 6 additions & 0 deletions browser/base/content/test/general/contextmenu_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ async function test_contextmenu(selector, menuItems, options = {}) {
menuItems = menuItems.concat(inspectItems);
}

if (Services.prefs.getBoolPref("devtools.accessibility.enabled", true) &&
Services.appinfo.accessibilityEnabled) {
let inspectA11YItems = ["context-inspect-a11y", true];
menuItems = menuItems.concat(inspectA11YItems);
}

if (options.maybeScreenshotsPresent &&
!Services.prefs.getBoolPref("extensions.screenshots.disabled", false)) {
let screenshotItems = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ let contextMenuItems = {
"context-viewinfo": "disabled",
"inspect-separator": "hidden",
"context-inspect": "hidden",
"context-inspect-a11y": "hidden",
"context-bookmarkpage": "hidden",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ let contextMenuItems = {
"context-viewinfo": "disabled",
"inspect-separator": "hidden",
"context-inspect": "hidden",
"context-inspect-a11y": "hidden",
"context-bookmarkpage": "hidden",
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ let contextMenuItems = {
"context-viewinfo": "",
"inspect-separator": "hidden",
"context-inspect": "hidden",
"context-inspect-a11y": "hidden",
"context-bookmarkpage": "hidden",
};

Expand Down
14 changes: 7 additions & 7 deletions browser/components/preferences/connection.xul
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<textbox id="networkProxyHTTP" flex="1"
preference="network.proxy.http" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyServer();"/>
<label accesskey="&HTTPport.accesskey;" control="networkProxyHTTP_Port">&port2.label;</label>
<textbox id="networkProxyHTTP_Port" type="number" max="65535" size="5"
<textbox id="networkProxyHTTP_Port" class="proxy-port-input" type="number" max="65535" hidespinbuttons="true"
preference="network.proxy.http_port" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyPort();"/>
</hbox>
</row>
Expand All @@ -97,8 +97,8 @@
<textbox id="networkProxySSL" flex="1" preference="network.proxy.ssl"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', false);"/>
<label accesskey="&SSLport.accesskey;" control="networkProxySSL_Port">&port2.label;</label>
<textbox id="networkProxySSL_Port" type="number" max="65535" size="5" preference="network.proxy.ssl_port"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/>
<textbox id="networkProxySSL_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ssl_port"
hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/>
</hbox>
</row>
<row align="center">
Expand All @@ -109,8 +109,8 @@
<textbox id="networkProxyFTP" flex="1" preference="network.proxy.ftp"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', false);"/>
<label accesskey="&FTPport.accesskey;" control="networkProxyFTP_Port">&port2.label;</label>
<textbox id="networkProxyFTP_Port" type="number" max="65535" size="5" preference="network.proxy.ftp_port"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/>
<textbox id="networkProxyFTP_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ftp_port"
hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/>
</hbox>
</row>
<row align="center">
Expand All @@ -121,8 +121,8 @@
<textbox id="networkProxySOCKS" flex="1" preference="network.proxy.socks"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', false);"/>
<label accesskey="&SOCKSport.accesskey;" control="networkProxySOCKS_Port">&port2.label;</label>
<textbox id="networkProxySOCKS_Port" type="number" max="65535" size="5" preference="network.proxy.socks_port"
onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/>
<textbox id="networkProxySOCKS_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.socks_port"
hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/>
</hbox>
</row>
<row>
Expand Down
2 changes: 2 additions & 0 deletions browser/locales/en-US/chrome/browser/browser.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY inspectContextMenu.label "Inspect Element">
<!ENTITY inspectContextMenu.accesskey "Q">

<!ENTITY inspectA11YContextMenu.label "Inspect Accessibility Properties">

<!ENTITY fileMenu.label "File">
<!ENTITY fileMenu.accesskey "F">
<!ENTITY newUserContext.label "New Container Tab">
Expand Down
2 changes: 1 addition & 1 deletion browser/modules/BrowserUITelemetry.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ var BrowserUITelemetry = {
"spell-add-dictionaries-main", "spell-dictionaries",
"spell-dictionaries-menu", "spell-add-dictionaries",
"bidi-text-direction-toggle", "bidi-page-direction-toggle", "inspect",
"media-eme-learn-more"
"inspect-a11y", "media-eme-learn-more"
]),

_contextMenuInteractions: {},
Expand Down
6 changes: 6 additions & 0 deletions browser/themes/shared/incontentprefs/preferences.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -889,3 +889,9 @@ menulist[indicator=true] > menupopup menuitem[indicator=true]:not([image]) > .me
.no-results-message[query*=🔥🦊] > .no-results-container {
visibility: hidden;
}

/* Proxy port input */

.proxy-port-input {
width: calc(5ch + 22px); /* 5 chars + 11px padding on both sides */
}
4 changes: 3 additions & 1 deletion build/mobile/remoteautomation.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ def __init__(self, device, cmd, stdout=None, env=None, cwd=None, app=None,
else:
args = args[:-1]
if 'geckoview' in app:
self.device.launch_geckoview_example(app, moz_env=env, extra_args=args, url=url)
activity = "TestRunnerActivity"
self.device.launch_activity(app, activity, e10s=True, moz_env=env,
extra_args=args, url=url)
else:
self.device.launch_fennec(app, moz_env=env, extra_args=args, url=url)

Expand Down
1 change: 1 addition & 0 deletions devtools/client/accessibility/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ support-files =
!/devtools/client/inspector/test/shared-head.js
!/devtools/client/shared/test/shared-redux-head.js

[browser_accessibility_context_menu_browser.js]
[browser_accessibility_context_menu_inspector.js]
[browser_accessibility_mutations.js]
[browser_accessibility_reload.js]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

const TEST_URI = "<h1 id=\"h1\">header</h1><p id=\"p\">paragraph</p>";

add_task(async function testNoShowAccessibilityPropertiesContextMenu() {
let tab = await addTab(buildURL(TEST_URI));
let { linkedBrowser: browser } = tab;

let contextMenu = document.getElementById("contentAreaContextMenu");
let awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
await BrowserTestUtils.synthesizeMouse("#h1", 0, 0, {
type: "contextmenu",
button: 2,
centered: true,
}, browser);
await awaitPopupShown;

let inspectA11YPropsItem = contextMenu.querySelector("#context-inspect-a11y");
ok(inspectA11YPropsItem.hidden, "Accessibility tools are not enabled.");
contextMenu.hidePopup();
gBrowser.removeCurrentTab();
});

addA11YPanelTask("Test show accessibility properties context menu in browser.",
TEST_URI,
async function({ panel, toolbox, browser }) {
let headerSelector = "#h1";

let contextMenu = document.getElementById("contentAreaContextMenu");
let awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
await BrowserTestUtils.synthesizeMouse(headerSelector, 0, 0, {
type: "contextmenu",
button: 2,
centered: true,
}, browser);
await awaitPopupShown;

let inspectA11YPropsItem = contextMenu.querySelector("#context-inspect-a11y");

info("Triggering 'Inspect Accessibility Properties' and waiting for " +
"accessibility panel to open");
inspectA11YPropsItem.click();
contextMenu.hidePopup();

let selected = await panel.once("new-accessible-front-selected");
let expectedSelectedNode = await getNodeFront(headerSelector,
toolbox.getPanel("inspector"));
let expectedSelected = await panel.walker.getAccessibleFor(expectedSelectedNode);
is(toolbox.getCurrentPanel(), panel, "Accessibility panel is currently selected");
is(selected, expectedSelected, "Accessible front selected correctly");
});
4 changes: 2 additions & 2 deletions devtools/client/debugger/new/README.mozilla
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
This is the debugger.html project output.
See https://github.com/devtools-html/debugger.html

Version 32.0
Version 33.0

Comparison: https://github.com/devtools-html/debugger.html/compare/release-31...release-32
Comparison: https://github.com/devtools-html/debugger.html/compare/release-32...release-33

Packages:
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
Expand Down
Loading

0 comments on commit fd524a0

Please sign in to comment.