Bug 1451406 - Always use type="menu" instead of the type="panel" alias for buttons. r=bgrins

MozReview-Commit-ID: CMFd4J4n6rk

--HG--
extra : rebase_source : 4a8a0127ba8f34bfe74f5b7471c84ab8c58cd05d
This commit is contained in:
Paolo Amadini 2018-04-04 18:06:42 +01:00
Родитель 764cd472b6
Коммит b0487a9569
3 изменённых файлов: 6 добавлений и 12 удалений

Просмотреть файл

@ -18,8 +18,7 @@
</hbox>
<hbox>
<button id="four" type="menu" label="Four"/>
<button id="five" type="panel" label="Five"/>
<button id="six" label="Six"/>
<button id="five" label="Five"/>
</hbox>
<!-- test results are displayed in the html:body -->
@ -48,9 +47,6 @@ function test_button()
is(document.activeElement, $("four"), "key cursor right on button");
synthesizeKey("KEY_ArrowDown");
is(document.activeElement, $("four"), "key cursor down on menu button");
$("five").focus();
synthesizeKey("KEY_ArrowDown");
is(document.activeElement, $("five"), "key cursor down on panel button");
$("three").focus();
synthesizeKey("KEY_ArrowUp");

Просмотреть файл

@ -36,14 +36,14 @@
<textbox/>
</panel>
<button id="button" type="panel" label="Button">
<button id="button" type="menu" label="Button">
<panel onpopupshown="panelOnButtonOpened(this)"
onpopuphidden="$('tbutton').open = true;">
<button label="OK" oncommand="this.parentNode.parentNode.open = false"/>
</panel>
</button>
<toolbarbutton id="tbutton" type="panel" label="Toolbarbutton">
<toolbarbutton id="tbutton" type="menu" label="Toolbarbutton">
<panel onpopupshown="panelOnToolbarbuttonOpened(this)"
onpopuphidden="SimpleTest.finish()">
<textbox/>

Просмотреть файл

@ -110,7 +110,7 @@ button[type="repeat"] {
-moz-binding: url("chrome://global/content/bindings/button.xml#button-repeat");
}
button[type="menu"], button[type="panel"] {
button[type="menu"] {
-moz-binding: url("chrome://global/content/bindings/button.xml#menu");
}
@ -134,13 +134,11 @@ toolbarbutton.badged-button {
display: none;
}
toolbarbutton[type="menu"],
toolbarbutton[type="panel"] {
toolbarbutton[type="menu"] {
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu");
}
toolbarbutton.badged-button[type="menu"],
toolbarbutton.badged-button[type="panel"] {
toolbarbutton.badged-button[type="menu"] {
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-badged-menu");
}