mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 735214 - [inspector] Give the focus to the toolbar and make the buttons tabbable. (Part B - tabbable); r=rcampbell
This commit is contained in:
parent
84bcb38cd7
commit
b69e6c6e74
@ -1011,6 +1011,7 @@
|
|||||||
label="&htmlPanel.label;"
|
label="&htmlPanel.label;"
|
||||||
accesskey="&htmlPanel.accesskey;"
|
accesskey="&htmlPanel.accesskey;"
|
||||||
tooltiptext="&htmlPanel.tooltiptext;"
|
tooltiptext="&htmlPanel.tooltiptext;"
|
||||||
|
tabindex="0"
|
||||||
command="Inspector:HTMLPanel"/>
|
command="Inspector:HTMLPanel"/>
|
||||||
<arrowscrollbox id="inspector-breadcrumbs"
|
<arrowscrollbox id="inspector-breadcrumbs"
|
||||||
flex="1" orient="horizontal"
|
flex="1" orient="horizontal"
|
||||||
@ -1021,11 +1022,13 @@
|
|||||||
hidden="true"
|
hidden="true"
|
||||||
label="&inspect3DViewButton.label;"
|
label="&inspect3DViewButton.label;"
|
||||||
accesskey="&inspect3DViewButton.accesskey;"
|
accesskey="&inspect3DViewButton.accesskey;"
|
||||||
|
tabindex="0"
|
||||||
command="Inspector:Tilt"/>
|
command="Inspector:Tilt"/>
|
||||||
<toolbarbutton id="inspector-style-button"
|
<toolbarbutton id="inspector-style-button"
|
||||||
class="devtools-toolbarbutton"
|
class="devtools-toolbarbutton"
|
||||||
label="&inspectStyleButton.label;"
|
label="&inspectStyleButton.label;"
|
||||||
accesskey="&inspectStyleButton.accesskey;"
|
accesskey="&inspectStyleButton.accesskey;"
|
||||||
|
tabindex="0"
|
||||||
command="Inspector:Sidebar"/>
|
command="Inspector:Sidebar"/>
|
||||||
<!-- registered tools go here -->
|
<!-- registered tools go here -->
|
||||||
</hbox>
|
</hbox>
|
||||||
|
@ -392,6 +392,9 @@ InspectorUI.prototype = {
|
|||||||
|
|
||||||
this.setupNavigationKeys();
|
this.setupNavigationKeys();
|
||||||
this.highlighterReady();
|
this.highlighterReady();
|
||||||
|
|
||||||
|
// Focus the first focusable element in the toolbar
|
||||||
|
this.chromeDoc.commandDispatcher.advanceFocusIntoSubtree(this.toolbar);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -747,7 +750,6 @@ InspectorUI.prototype = {
|
|||||||
|
|
||||||
Services.obs.notifyObservers(null, INSPECTOR_NOTIFICATIONS.STATE_RESTORED, null);
|
Services.obs.notifyObservers(null, INSPECTOR_NOTIFICATIONS.STATE_RESTORED, null);
|
||||||
|
|
||||||
this.win.focus();
|
|
||||||
this.highlighter.highlight();
|
this.highlighter.highlight();
|
||||||
|
|
||||||
if (this.store.getValue(this.winID, "htmlPanelOpen")) {
|
if (this.store.getValue(this.winID, "htmlPanelOpen")) {
|
||||||
@ -2106,6 +2108,12 @@ HTMLBreadcrumbs.prototype = {
|
|||||||
|
|
||||||
button.setAttribute("tooltiptext", this.prettyPrintNodeAsText(aNode));
|
button.setAttribute("tooltiptext", this.prettyPrintNodeAsText(aNode));
|
||||||
|
|
||||||
|
button.onkeypress = function onBreadcrumbsKeypress(e) {
|
||||||
|
if (e.charCode == Ci.nsIDOMKeyEvent.DOM_VK_SPACE ||
|
||||||
|
e.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_RETURN)
|
||||||
|
button.click();
|
||||||
|
}
|
||||||
|
|
||||||
button.onBreadcrumbsClick = function onBreadcrumbsClick() {
|
button.onBreadcrumbsClick = function onBreadcrumbsClick() {
|
||||||
inspector.stopInspecting();
|
inspector.stopInspecting();
|
||||||
inspector.select(aNode, true, true, "breadcrumbs");
|
inspector.select(aNode, true, true, "breadcrumbs");
|
||||||
|
@ -115,6 +115,7 @@ function inspectorUIOpen2()
|
|||||||
InspectorUI.toggleInspection();
|
InspectorUI.toggleInspection();
|
||||||
ok(!InspectorUI.inspecting, "Inspector is not highlighting");
|
ok(!InspectorUI.inspecting, "Inspector is not highlighting");
|
||||||
|
|
||||||
|
|
||||||
// Switch back to tab 1.
|
// Switch back to tab 1.
|
||||||
executeSoon(function() {
|
executeSoon(function() {
|
||||||
Services.obs.addObserver(inspectorFocusTab1,
|
Services.obs.addObserver(inspectorFocusTab1,
|
||||||
@ -188,10 +189,11 @@ function inspectorFocusTab2()
|
|||||||
is(InspectorUI.store.length, 2, "Inspector.store.length is 2");
|
is(InspectorUI.store.length, 2, "Inspector.store.length is 2");
|
||||||
isnot(InspectorUI.selection, div, "selection does not match the div element");
|
isnot(InspectorUI.selection, div, "selection does not match the div element");
|
||||||
|
|
||||||
// Make sure keybindings still sork
|
|
||||||
synthesizeKeyFromKeyTag("key_inspect");
|
|
||||||
|
|
||||||
executeSoon(function() {
|
executeSoon(function() {
|
||||||
|
// Make sure keybindings still work
|
||||||
|
synthesizeKeyFromKeyTag("key_inspect");
|
||||||
|
|
||||||
ok(InspectorUI.inspecting, "Inspector is highlighting");
|
ok(InspectorUI.inspecting, "Inspector is highlighting");
|
||||||
InspectorUI.toggleInspection();
|
InspectorUI.toggleInspection();
|
||||||
|
|
||||||
|
@ -16,15 +16,12 @@ function test() {
|
|||||||
|
|
||||||
createTab(function() {
|
createTab(function() {
|
||||||
let id = TiltUtils.getWindowId(gBrowser.selectedBrowser.contentWindow);
|
let id = TiltUtils.getWindowId(gBrowser.selectedBrowser.contentWindow);
|
||||||
let initialActiveElement;
|
|
||||||
|
|
||||||
is(id, Tilt.currentWindowId,
|
is(id, Tilt.currentWindowId,
|
||||||
"The unique window identifiers should match for the same window.");
|
"The unique window identifiers should match for the same window.");
|
||||||
|
|
||||||
createTilt({
|
createTilt({
|
||||||
onInspectorOpen: function() {
|
onInspectorOpen: function() {
|
||||||
initialActiveElement = document.activeElement;
|
|
||||||
|
|
||||||
is(Tilt.visualizers[id], null,
|
is(Tilt.visualizers[id], null,
|
||||||
"A instance of the visualizer shouldn't be initialized yet.");
|
"A instance of the visualizer shouldn't be initialized yet.");
|
||||||
},
|
},
|
||||||
@ -40,8 +37,8 @@ function test() {
|
|||||||
},
|
},
|
||||||
onTiltClose: function()
|
onTiltClose: function()
|
||||||
{
|
{
|
||||||
is(document.activeElement, initialActiveElement,
|
is(document.activeElement, gBrowser.selectedBrowser,
|
||||||
"The focus wasn't correctly given back to the initial element.");
|
"The focus wasn't correctly given back to the selectedBrowser.");
|
||||||
|
|
||||||
is(Tilt.visualizers[id], null,
|
is(Tilt.visualizers[id], null,
|
||||||
"The current instance of the visualizer wasn't destroyed properly.");
|
"The current instance of the visualizer wasn't destroyed properly.");
|
||||||
|
@ -2195,6 +2195,10 @@ html|*#highlighter-nodeinfobar-pseudo-classes {
|
|||||||
padding: 0 9px;
|
padding: 0 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inspector-breadcrumbs-button:-moz-focusring > label {
|
||||||
|
border-bottom: 1px dotted hsla(210,30%,85%,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
|
.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
|
||||||
color: hsl(208,100%,60%);
|
color: hsl(208,100%,60%);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,11 @@
|
|||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.devtools-toolbarbutton:-moz-focusring {
|
||||||
|
outline: 1px dotted hsla(210,30%,85%,0.4);
|
||||||
|
outline-offset: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
.devtools-toolbarbutton:not([label]) {
|
.devtools-toolbarbutton:not([label]) {
|
||||||
min-width: 32px;
|
min-width: 32px;
|
||||||
}
|
}
|
||||||
|
@ -2934,6 +2934,10 @@ html|*#highlighter-nodeinfobar-pseudo-classes {
|
|||||||
padding: 0 9px;
|
padding: 0 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inspector-breadcrumbs-button:-moz-focusring > label {
|
||||||
|
border-bottom: 1px dotted hsla(210,30%,85%,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
|
.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
|
||||||
color: hsl(208,100%,60%);
|
color: hsl(208,100%,60%);
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,11 @@
|
|||||||
box-shadow: 0 1px 0 hsla(210,16%,76%,.15) inset, 0 0 0 1px hsla(210,16%,76%,.15) inset, 0 1px 0 hsla(210,16%,76%,.15);
|
box-shadow: 0 1px 0 hsla(210,16%,76%,.15) inset, 0 0 0 1px hsla(210,16%,76%,.15) inset, 0 1px 0 hsla(210,16%,76%,.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.devtools-toolbarbutton:-moz-focusring {
|
||||||
|
outline: 1px dotted hsla(210,30%,85%,0.4);
|
||||||
|
outline-offset: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
.devtools-toolbarbutton > .toolbarbutton-text {
|
.devtools-toolbarbutton > .toolbarbutton-text {
|
||||||
margin: 1px 6px;
|
margin: 1px 6px;
|
||||||
}
|
}
|
||||||
|
@ -2862,6 +2862,10 @@ html|*#highlighter-nodeinfobar-pseudo-classes {
|
|||||||
padding: 0 9px;
|
padding: 0 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inspector-breadcrumbs-button:-moz-focusring > label {
|
||||||
|
border-bottom: 1px dotted hsla(210,30%,85%,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
|
.inspector-breadcrumbs-button[checked] > .inspector-breadcrumbs-tag {
|
||||||
color: hsl(200,100%,60%);
|
color: hsl(200,100%,60%);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,11 @@
|
|||||||
-moz-margin-end: 3px;
|
-moz-margin-end: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.devtools-toolbarbutton:-moz-focusring {
|
||||||
|
outline: 1px dotted hsla(210,30%,85%,0.4);
|
||||||
|
outline-offset: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
.devtools-toolbarbutton > .toolbarbutton-icon {
|
.devtools-toolbarbutton > .toolbarbutton-icon {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user