зеркало из https://github.com/mozilla/gecko-dev.git
Bug 443609, key usage for scales isn't intuitive, r=neil
This commit is contained in:
Родитель
d0f450ad52
Коммит
eaf08406b2
|
@ -102,17 +102,19 @@ function testtag_scale_UI(element, testid, horiz, reverse)
|
|||
|
||||
element.focus();
|
||||
|
||||
var leftIncrements = horiz && reverse;
|
||||
var upDecrements = !horiz && !reverse;
|
||||
synthesizeKeyExpectEvent("VK_LEFT", { }, element, "change", testid + "key left");
|
||||
is(element.value, reverse ? 9 : 5, testid + " key left");
|
||||
is(element.value, leftIncrements ? 9 : 5, testid + " key left");
|
||||
synthesizeKeyExpectEvent("VK_RIGHT", { }, element, "change", testid + "key right");
|
||||
is(element.value, 7, testid + " key right");
|
||||
synthesizeKeyExpectEvent("VK_UP", { }, element, "change", testid + "key up");
|
||||
is(element.value, reverse ? 9 : 5, testid + " key up");
|
||||
is(element.value, upDecrements ? 5 : 9, testid + " key up");
|
||||
synthesizeKeyExpectEvent("VK_DOWN", { }, element, "change", testid + "key down");
|
||||
is(element.value, 7, testid + " key down");
|
||||
|
||||
synthesizeKeyExpectEvent("VK_PAGE_UP", { }, element, "change", testid + "key page up");
|
||||
is(element.value, reverse ? 11 : 3, testid + " key page up");
|
||||
is(element.value, upDecrements ? 3 : 11, testid + " key page up");
|
||||
synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, element, "change", testid + "key page down");
|
||||
is(element.value, 7, testid + " key page down");
|
||||
|
||||
|
|
|
@ -181,35 +181,47 @@
|
|||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="keypress" keycode="VK_UP" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
(this.dir == "reverse") ? this.increase() : this.decrease();
|
||||
this._userChanged = false;
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_LEFT" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
(this.dir == "reverse") ? this.increase() : this.decrease();
|
||||
this._userChanged = false;
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_DOWN" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
(this.dir == "reverse") ? this.decrease() : this.increase();
|
||||
this._userChanged = false;
|
||||
<![CDATA[
|
||||
this._userChanged = true;
|
||||
(this.orient != "vertical" && this.dir == "reverse") ? this.increase() : this.decrease();
|
||||
this._userChanged = false;
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_RIGHT" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
(this.dir == "reverse") ? this.decrease() : this.increase();
|
||||
this._userChanged = false;
|
||||
<![CDATA[
|
||||
this._userChanged = true;
|
||||
(this.orient != "vertical" && this.dir == "reverse") ? this.decrease() : this.increase();
|
||||
this._userChanged = false;
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_UP" preventdefault="true">
|
||||
<![CDATA[
|
||||
this._userChanged = true;
|
||||
(this.orient == "vertical" && this.dir != "reverse") ? this.decrease() : this.increase();
|
||||
this._userChanged = false;
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_DOWN" preventdefault="true">
|
||||
<![CDATA[
|
||||
this._userChanged = true;
|
||||
(this.orient == "vertical" && this.dir != "reverse") ? this.increase() : this.decrease();
|
||||
this._userChanged = false;
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_PAGE_UP" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
(this.dir == "reverse") ? this.increasePage() : this.decreasePage();
|
||||
this._userChanged = false;
|
||||
<![CDATA[
|
||||
this._userChanged = true;
|
||||
(this.orient == "vertical" && this.dir != "reverse") ? this.decreasePage() : this.increasePage();
|
||||
this._userChanged = false;
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_PAGE_DOWN" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
(this.dir == "reverse") ? this.decreasePage() : this.increasePage();
|
||||
this._userChanged = false;
|
||||
<![CDATA[
|
||||
this._userChanged = true;
|
||||
(this.orient == "vertical" && this.dir != "reverse") ? this.increasePage() : this.decreasePage();
|
||||
this._userChanged = false;
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_HOME" preventdefault="true">
|
||||
this._userChanged = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче