Bug 373240 Uppercase the VK_* bits for consistency with the rest of the codebase. p=Serge Gautherie <sgautherie.bz@free.fr>,r/sr=Neil

This commit is contained in:
bugzilla%standard8.demon.co.uk 2007-03-09 16:43:16 +00:00
Родитель 4bcbb105c2
Коммит 8f8efb73fd
3 изменённых файлов: 71 добавлений и 71 удалений

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

@ -4,13 +4,13 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="listbox-base" extends="chrome://global/content/bindings/general.xml#basecontrol">
<resources>
<stylesheet src="chrome://global/skin/listbox.css"/>
</resources>
</binding>
<binding id="listbox"
extends="chrome://global/content/bindings/listbox.xml#listbox-base">
<content>
@ -26,7 +26,7 @@
</xul:listboxbody>
</xul:listrows>
</content>
<implementation implements="nsIDOMXULMultiSelectControlElement, nsIAccessibleProvider">
<field name="_suppressOnSelect">false</field>
<field name="_selectionStart">null</field>
@ -52,7 +52,7 @@
]]>
</getter>
</property>
<!-- ///////////////// public listbox members ///////////////// -->
<property name="listBoxObject"
@ -176,7 +176,7 @@
]]>
</body>
</method>
<method name="insertItemAt">
<parameter name="index"/>
<parameter name="label"/>
@ -252,7 +252,7 @@
]]>
</body>
</method>
<method name="addItemToSelection">
<parameter name="item"/>
<body>
@ -262,22 +262,22 @@
if (item.selected)
return;
this.selectedItems.push(item);
item.selected = true;
this._fireOnSelect();
]]>
</body>
</method>
</method>
<method name="removeItemFromSelection">
<parameter name="item"/>
<body>
<![CDATA[
if (!item.selected)
return;
for (var i = 0; i < this.selectedItems.length; ++i) {
if (this.selectedItems[i] == item) {
this.selectedItems.splice(i, 1);
@ -285,12 +285,12 @@
break;
}
}
this._fireOnSelect();
]]>
</body>
</method>
</method>
<method name="toggleItemSelection">
<parameter name="item"/>
<body>
@ -301,33 +301,33 @@
this.addItemToSelection(item);
]]>
</body>
</method>
</method>
<method name="selectItem">
<parameter name="item"/>
<body>
<![CDATA[
if (!item)
return;
if (this.selectedItems.length == 1 && this.selectedItems[0] == item)
return;
this._selectionStart = null;
var suppress = this._suppressOnSelect;
this._suppressOnSelect = true;
this.clearSelection();
this.addItemToSelection(item);
this.currentItem = item;
this._suppressOnSelect = suppress;
this._fireOnSelect();
]]>
</body>
</method>
</method>
<method name="selectItemRange">
<parameter name="startItem"/>
<parameter name="endItem"/>
@ -340,12 +340,12 @@
startItem = this._selectionStart ? this._selectionStart : this.currentItem;
if (!startItem)
startItem = endItem;
var suppressSelect = this._suppressOnSelect;
this._suppressOnSelect = true;
this._selectionStart = startItem;
var currentItem;
var startIndex = this.getIndexOfItem(startItem);
var endIndex = this.getIndexOfItem(endItem);
@ -382,47 +382,47 @@
this._fireOnSelect();
]]>
</body>
</method>
</method>
<method name="selectAll">
<body>
<![CDATA[
var suppress = this._suppressOnSelect;
this._suppressOnSelect = true;
var item = this.getItemAtIndex(0);
while (item) {
this.addItemToSelection(item);
item = this.getNextItem(item, 1);
item = this.getNextItem(item, 1);
}
this._suppressOnSelect = suppress;
this._fireOnSelect();
]]>
</body>
</method>
</method>
<method name="invertSelection">
<body>
<![CDATA[
var suppress = this._suppressOnSelect;
this._suppressOnSelect = true;
var item = this.getItemAtIndex(0);
while (item) {
if (item.selected)
this.removeItemFromSelection(item);
else
this.addItemToSelection(item);
item = this.getNextItem(item, 1);
item = this.getNextItem(item, 1);
}
this._suppressOnSelect = suppress;
this._fireOnSelect();
]]>
</body>
</method>
</method>
<method name="clearSelection">
<body>
<![CDATA[
@ -430,15 +430,15 @@
{
for (var i = this.selectedItems.length-1; i >= 0; --i)
this.selectedItems[i].selected = false;
this.selectedItems.splice(0, this.selectedItems.length);
}
this._selectionStart = null;
this._fireOnSelect();
]]>
</body>
</method>
</method>
<!-- ///////////////// nsIListBoxObject ///////////////// -->
<method name="getNextItem">
@ -566,17 +566,17 @@
</implementation>
<handlers>
<handler event="keypress" keycode="vk_up" modifiers="control shift any"
<handler event="keypress" keycode="VK_UP" modifiers="control shift any"
phase="target" action="moveByOffset(-1, !event.ctrlKey, event.shiftKey);"/>
<handler event="keypress" keycode="vk_down" modifiers="control shift any"
<handler event="keypress" keycode="VK_DOWN" modifiers="control shift any"
phase="target" action="moveByOffset(1, !event.ctrlKey, event.shiftKey);"/>
<handler event="keypress" keycode="vk_home" modifiers="control shift any"
<handler event="keypress" keycode="VK_HOME" modifiers="control shift any"
phase="target" action="moveByOffset(-this.currentIndex, !event.ctrlKey, event.shiftKey);"/>
<handler event="keypress" keycode="vk_end" modifiers="control shift any"
<handler event="keypress" keycode="VK_END" modifiers="control shift any"
phase="target" action="moveByOffset(this.getRowCount() - this.currentIndex - 1, !event.ctrlKey, event.shiftKey);"/>
<handler event="keypress" keycode="vk_page_up" modifiers="control shift any"
<handler event="keypress" keycode="VK_PAGE_UP" modifiers="control shift any"
phase="target" action="moveByOffset(this.scrollOnePage(-1), !event.ctrlKey, event.shiftKey);"/>
<handler event="keypress" keycode="vk_page_down" modifiers="control shift any"
<handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="control shift any"
phase="target" action="moveByOffset(this.scrollOnePage(1), !event.ctrlKey, event.shiftKey);"/>
<handler event="keypress" key=" " phase="target">
<![CDATA[

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

@ -585,27 +585,27 @@
]]>
</handler>
<handler event="keypress" keycode="vk_left">
<handler event="keypress" keycode="VK_LEFT">
<![CDATA[
var direction = window.getComputedStyle(this.parentNode, null).direction;
this.parentNode.advanceSelectedTab(direction == 'ltr' ? -1 : 1);
]]>
</handler>
<handler event="keypress" keycode="vk_right">
<handler event="keypress" keycode="VK_RIGHT">
<![CDATA[
var direction = window.getComputedStyle(this.parentNode, null).direction;
this.parentNode.advanceSelectedTab(direction == 'ltr' ? 1 : -1);
]]>
</handler>
<handler event="keypress" keycode="vk_up">
<handler event="keypress" keycode="VK_UP">
<![CDATA[
this.parentNode.advanceSelectedTab(-1);
]]>
</handler>
<handler event="keypress" keycode="vk_down">
<handler event="keypress" keycode="VK_DOWN">
<![CDATA[
this.parentNode.advanceSelectedTab(1);
]]>

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

@ -224,7 +224,7 @@
return false;
]]></body>
</method>
<method name="keyNavigate">
<parameter name="event"/>
<body><![CDATA[
@ -389,7 +389,7 @@
<handler event="blur" action="this.treeBoxObject.focused = false;"/>
<handler event="blur" phase="capturing"
action="if (event.originalTarget == this.inputField.inputField) this.stopEditing(true);"/>
<handler event="keypress" keycode="vk_enter">
<handler event="keypress" keycode="VK_ENTER">
<![CDATA[
if (this._editingColumn) {
this.stopEditing(true);
@ -401,7 +401,7 @@
}
]]>
</handler>
<handler event="keypress" keycode="vk_return">
<handler event="keypress" keycode="VK_RETURN">
<![CDATA[
if (this._editingColumn) {
this.stopEditing(true);
@ -413,7 +413,7 @@
}
]]>
</handler>
<handler event="keypress" keycode="vk_escape">
<handler event="keypress" keycode="VK_ESCAPE">
<![CDATA[
if (this._editingColumn) {
this.stopEditing(false);
@ -422,7 +422,7 @@
}
]]>
</handler>
<handler event="keypress" keycode="vk_left">
<handler event="keypress" keycode="VK_LEFT">
<![CDATA[
if (this._editingColumn)
return;
@ -466,7 +466,7 @@
}
]]>
</handler>
<handler event="keypress" keycode="vk_right">
<handler event="keypress" keycode="VK_RIGHT">
<![CDATA[
if (this._editingColumn)
return;
@ -518,7 +518,7 @@
}
]]>
</handler>
<handler event="keypress" keycode="vk_up"
<handler event="keypress" keycode="VK_UP"
modifiers="control any">
<![CDATA[
if (this._editingColumn)
@ -552,7 +552,7 @@
this.treeBoxObject.ensureRowIsVisible(c);
]]>
</handler>
<handler event="keypress" keycode="vk_down"
<handler event="keypress" keycode="VK_DOWN"
modifiers="control any">
<![CDATA[
if (this._editingColumn)
@ -586,7 +586,7 @@
this.treeBoxObject.ensureRowIsVisible(c);
]]>
</handler>
<handler event="keypress" keycode="vk_up"
<handler event="keypress" keycode="VK_UP"
modifiers="control any, shift">
<![CDATA[
if (this._editingColumn || this.view.selection.single)
@ -599,7 +599,7 @@
this.treeBoxObject.ensureRowIsVisible(c - 1);
]]>
</handler>
<handler event="keypress" keycode="vk_down"
<handler event="keypress" keycode="VK_DOWN"
modifiers="control any, shift">
<![CDATA[
if (this._editingColumn || this.view.selection.single)
@ -612,7 +612,7 @@
this.treeBoxObject.ensureRowIsVisible(c + 1);
]]>
</handler>
<handler event="keypress" keycode="vk_page_up"
<handler event="keypress" keycode="VK_PAGE_UP"
modifiers="control any">
<![CDATA[
if (this._editingColumn)
@ -638,7 +638,7 @@
this.view.selection.timedSelect(i, this._selectDelay);
]]>
</handler>
<handler event="keypress" keycode="vk_page_down"
<handler event="keypress" keycode="VK_PAGE_DOWN"
modifiers="control any">
<![CDATA[
if (this._editingColumn)
@ -665,7 +665,7 @@
this.view.selection.timedSelect(i > l ? l : i, this._selectDelay);
]]>
</handler>
<handler event="keypress" keycode="vk_page_up"
<handler event="keypress" keycode="VK_PAGE_UP"
modifiers="control any, shift">
<![CDATA[
if (this._editingColumn || this.view.selection.single)
@ -687,7 +687,7 @@
this.view.selection.rangedSelect(-1, i, event.ctrlKey);
]]>
</handler>
<handler event="keypress" keycode="vk_page_down"
<handler event="keypress" keycode="VK_PAGE_DOWN"
modifiers="control any, shift">
<![CDATA[
if (this._editingColumn || this.view.selection.single)
@ -710,7 +710,7 @@
this.view.selection.rangedSelect(-1, i > l ? l : i, event.ctrlKey);
]]>
</handler>
<handler event="keypress" keycode="vk_home"
<handler event="keypress" keycode="VK_HOME"
modifiers="control any">
<![CDATA[
if (this._editingColumn || this.view.rowCount == 0)
@ -724,7 +724,7 @@
this.treeBoxObject.ensureRowIsVisible(0);
]]>
</handler>
<handler event="keypress" keycode="vk_end"
<handler event="keypress" keycode="VK_END"
modifiers="control any">
<![CDATA[
if (this._editingColumn)
@ -742,7 +742,7 @@
this.treeBoxObject.ensureRowIsVisible(l);
]]>
</handler>
<handler event="keypress" keycode="vk_home"
<handler event="keypress" keycode="VK_HOME"
modifiers="control any, shift">
<![CDATA[
if (this._editingColumn || this.view.selection.single)
@ -752,7 +752,7 @@
this.treeBoxObject.ensureRowIsVisible(0);
]]>
</handler>
<handler event="keypress" keycode="vk_end"
<handler event="keypress" keycode="VK_END"
modifiers="control any, shift">
<![CDATA[
if (this._editingColumn || this.view.selection.single)
@ -791,7 +791,7 @@
<xul:hbox class="tree-scrollable-columns" flex="1">
<children includes="treecol|splitter"/>
</xul:hbox>
<xul:treecolpicker class="treecol-image" fixed="true" xbl:inherits="tooltiptext=pickertooltiptext"/>
<xul:treecolpicker class="treecol-image" fixed="true" xbl:inherits="tooltiptext=pickertooltiptext"/>
</content>
<implementation implements="nsIAccessibleProvider">
<property name="accessibleType" readonly="true">
@ -869,9 +869,9 @@
// save off the last selected row
this._lastSelectedRow = row.value;
if (row.value == -1)
return;
if (row.value == -1)
return;
if (obj.value == "twisty")
return;