зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1414020 - Remove the "searchbar-treebody" binding and instead migrate the behavior to an attribute on "autocomplete-treebody". r=adw
This commit is contained in:
Родитель
02c9050df5
Коммит
95d6b1b58e
|
@ -945,7 +945,7 @@
|
|||
<xul:treecols anonid="treecols">
|
||||
<xul:treecol id="treecolAutoCompleteValue" class="autocomplete-treecol" flex="1" overflow="true"/>
|
||||
</xul:treecols>
|
||||
<xul:treechildren class="autocomplete-treebody searchbar-treebody"/>
|
||||
<xul:treechildren class="autocomplete-treebody searchbar-treebody" noSelectOnMouseMove="true"/>
|
||||
</xul:tree>
|
||||
<xul:vbox anonid="search-one-off-buttons" class="search-one-offs"/>
|
||||
</content>
|
||||
|
@ -1153,19 +1153,6 @@
|
|||
|
||||
</binding>
|
||||
|
||||
|
||||
<!-- This is the same as the autocomplete-treebody binding except it does not
|
||||
select rows on mousemove. -->
|
||||
<binding id="searchbar-treebody"
|
||||
extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-treebody">
|
||||
<handlers>
|
||||
<handler event="mousemove"><![CDATA[
|
||||
// Cancel the event so that the base binding doesn't select the row.
|
||||
event.preventDefault();
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<!-- Used for additional open search providers in the search panel. -->
|
||||
<binding id="addengine-icon" extends="xul:box">
|
||||
<content>
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar-textbox");
|
||||
}
|
||||
|
||||
.searchbar-treebody {
|
||||
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar-treebody");
|
||||
}
|
||||
|
||||
.search-one-offs {
|
||||
-moz-binding: url("chrome://browser/content/search/search.xml#search-one-offs");
|
||||
}
|
||||
|
|
|
@ -2506,6 +2506,19 @@ extends="chrome://global/content/bindings/popup.xml#popup">
|
|||
<binding id="autocomplete-treebody">
|
||||
<implementation>
|
||||
<field name="mLastMoveTime">Date.now()</field>
|
||||
<property name="noSelectOnMouseMove">
|
||||
<getter><![CDATA[
|
||||
return this.getAttribute("noSelectOnMouseMove") == "true";
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
if (val) {
|
||||
this.setAttribute("noSelectOnMouseMove", "true");
|
||||
} else {
|
||||
this.removeAttribute("noSelectOnMouseMove");
|
||||
}
|
||||
return !!val;
|
||||
]]></setter>
|
||||
</property>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
|
@ -2518,8 +2531,8 @@ extends="chrome://global/content/bindings/popup.xml#popup">
|
|||
]]></handler>
|
||||
|
||||
<handler event="mousemove"><![CDATA[
|
||||
if (event.defaultPrevented) {
|
||||
// Allow bindings that extend this one to cancel the event so that
|
||||
if (this.noSelectOnMouseMove) {
|
||||
// Allow uses of this binding to cancel the event so that
|
||||
// nothing is selected.
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче