зеркало из https://github.com/mozilla/gecko-dev.git
Make autocomplete work using selection without the extra hacky property.
This commit is contained in:
Родитель
8aaafdccf0
Коммит
424961c55a
|
@ -402,13 +402,15 @@ nsAutoCompleteController::GetRowProperties(PRInt32 index, nsISupportsArray *prop
|
|||
PRInt32 currentIndex;
|
||||
mSelection->GetCurrentIndex(¤tIndex);
|
||||
|
||||
/*
|
||||
if (index == currentIndex) {
|
||||
nsCOMPtr<nsIAtomService> atomSvc = do_GetService("@mozilla.org/atom-service;1");
|
||||
nsCOMPtr<nsIAtom> atom;
|
||||
atomSvc->GetAtom(NS_LITERAL_STRING("menuactive").get(), getter_AddRefs(atom));
|
||||
properties->AppendElement(atom);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -382,6 +382,7 @@
|
|||
|
||||
<binding id="autocomplete-result-popup" extends="chrome://global/content/bindings/popup.xml#popup">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tree.css"/>
|
||||
<stylesheet src="chrome://global/skin/autocomplete.css"/>
|
||||
</resources>
|
||||
|
||||
|
@ -417,7 +418,7 @@
|
|||
<property name="selectedIndex"
|
||||
onget="return this.tree.currentIndex;">
|
||||
<setter><![CDATA[
|
||||
this.tree.currentIndex = val;
|
||||
this.tree.treeBoxObject.selection.select(val);
|
||||
if (this.tree.treeBoxObject.height > 0)
|
||||
this.tree.treeBoxObject.ensureRowIsVisible(val < 0 ? 0 : val);
|
||||
return val;
|
||||
|
@ -643,9 +644,9 @@
|
|||
<handler event="mousemove"><![CDATA[
|
||||
if (new Date() - this.mLastMoveTime > 30) {
|
||||
var rc = this.getHoverCell(event);
|
||||
if (rc && rc.row != this.parentNode.currentIndex)
|
||||
this.parentNode.currentIndex = rc.row;
|
||||
this.mLastMoveTime = new Date();
|
||||
if (rc && rc.row != this.parentNode.currentIndex)
|
||||
this.parentNode.treeBoxObject.selection.select(rc.row);
|
||||
this.mLastMoveTime = new Date();
|
||||
}
|
||||
]]></handler>
|
||||
</handlers>
|
||||
|
|
|
@ -836,4 +836,4 @@ wizardpage {
|
|||
|
||||
.wizard-buttons {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-buttons");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,10 +113,10 @@ textbox {
|
|||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.autocomplete-treebody:-moz-tree-row(menuactive) {
|
||||
background-color: Highlight;
|
||||
treechildren.autocomplete-treebody:-moz-tree-row(selected) {
|
||||
background-color: Highlight;
|
||||
}
|
||||
|
||||
.autocomplete-treebody:-moz-tree-cell-text(menuactive) {
|
||||
treechildren.autocomplete-treebody:-moz-tree-cell-text(selected) {
|
||||
color: HighlightText !important;
|
||||
}
|
||||
|
|
|
@ -102,11 +102,11 @@ popup[type="autocomplete"],
|
|||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.autocomplete-treebody:-moz-tree-row(menuactive) {
|
||||
background-color: Highlight;
|
||||
treechildren.autocomplete-treebody:-moz-tree-row(selected) {
|
||||
background-color: Highlight;
|
||||
}
|
||||
|
||||
.autocomplete-treebody:-moz-tree-cell-text(menuactive) {
|
||||
treechildren.autocomplete-treebody:-moz-tree-cell-text(selected) {
|
||||
color: HighlightText !important;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче