зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366148 - Making menulist and menupopup highlightable r=jaws,mossop
MozReview-Commit-ID: 14HG16oPb0g --HG-- extra : rebase_source : 2b1f1c16f8ab4605f73c36f376997ddd18ad08d5
This commit is contained in:
Родитель
e45ddffb1e
Коммит
3025ba0bee
|
@ -272,7 +272,7 @@ var gSearchResultsPane = {
|
|||
*/
|
||||
searchWithinNode(nodeObject, searchPhrase) {
|
||||
let matchesFound = false;
|
||||
if (nodeObject.childElementCount == 0) {
|
||||
if (nodeObject.childElementCount == 0 || nodeObject.tagName == "menulist") {
|
||||
let simpleTextNodes = this.textNodeDescendants(nodeObject);
|
||||
|
||||
for (let node of simpleTextNodes) {
|
||||
|
@ -312,7 +312,8 @@ var gSearchResultsPane = {
|
|||
valueResult = this.stringMatchesFilters(nodeObject.getAttribute("value"), searchPhrase);
|
||||
}
|
||||
|
||||
if (nodeObject.tagName == "button" && (labelResult || valueResult)) {
|
||||
if ((nodeObject.tagName == "button" || nodeObject.tagName == "menulist" || nodeObject.tagName == "menuitem") &&
|
||||
(labelResult || valueResult)) {
|
||||
nodeObject.setAttribute("highlightable", "true");
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
|
||||
<binding id="menuitem" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
|
||||
<content>
|
||||
<xul:label class="menu-text" xbl:inherits="value=label,accesskey,crop" crop="right"/>
|
||||
<xul:label class="menu-text" xbl:inherits="value=label,accesskey,crop,highlightable" crop="right"/>
|
||||
<xul:hbox class="menu-accel-container" anonid="accel">
|
||||
<xul:label class="menu-accel" xbl:inherits="value=acceltext"/>
|
||||
</xul:hbox>
|
||||
|
@ -216,7 +216,8 @@
|
|||
xbl:inherits="selected,_moz-menuactive,disabled,checked">
|
||||
<xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop,highlightable" crop="right"/>
|
||||
<xul:label class="menu-iconic-highlightable-text" xbl:inherits="xbl:text=label,crop,accesskey,highlightable" crop="right"/>
|
||||
<children/>
|
||||
<xul:hbox class="menu-accel-container" anonid="accel">
|
||||
<xul:label class="menu-iconic-accel" xbl:inherits="value=acceltext"/>
|
||||
|
@ -230,7 +231,8 @@
|
|||
xbl:inherits="selected,disabled,checked">
|
||||
<xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop,highlightable" crop="right"/>
|
||||
<xul:label class="menu-iconic-highlightable-text" xbl:inherits="xbl:text=label,crop,accesskey,highlightable" crop="right"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
@ -240,7 +242,8 @@
|
|||
xbl:inherits="selected,disabled,checked">
|
||||
<xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,crop" crop="right"/>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,crop,highlightable" crop="right"/>
|
||||
<xul:label class="menu-iconic-highlightable-text" xbl:inherits="xbl:text=label,crop,highlightable" crop="right"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
@ -261,7 +264,8 @@
|
|||
<xul:hbox class="menu-iconic-left" align="center" pack="center">
|
||||
<xul:image class="menu-iconic-icon" xbl:inherits="src=image"/>
|
||||
</xul:hbox>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
|
||||
<xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop,highlightable" crop="right"/>
|
||||
<xul:label class="menu-iconic-highlightable-text" xbl:inherits="xbl:text=label,crop,accesskey,highlightable" crop="right"/>
|
||||
<xul:hbox class="menu-accel-container" anonid="accel">
|
||||
<xul:label class="menu-iconic-accel" xbl:inherits="value=acceltext"/>
|
||||
</xul:hbox>
|
||||
|
@ -271,14 +275,14 @@
|
|||
<children includes="menupopup|template"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
|
||||
<binding id="menubutton-item" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
|
||||
<content>
|
||||
<xul:label class="menubutton-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
|
||||
<children includes="menupopup"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
</binding>
|
||||
|
||||
<binding id="menuseparator" role="xul:menuseparator"
|
||||
extends="chrome://global/content/bindings/menu.xml#menuitem-base">
|
||||
</binding>
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
<content sizetopopup="pref">
|
||||
<xul:hbox class="menulist-label-box" flex="1">
|
||||
<xul:image class="menulist-icon" xbl:inherits="src=image,src"/>
|
||||
<xul:label class="menulist-label" xbl:inherits="value=label,crop,accesskey" crop="right" flex="1"/>
|
||||
<xul:label class="menulist-label" xbl:inherits="value=label,crop,accesskey,highlightable" crop="right" flex="1"/>
|
||||
<xul:label class="menulist-highlightable-label" xbl:inherits="xbl:text=label,crop,accesskey,highlightable" crop="right" flex="1"/>
|
||||
</xul:hbox>
|
||||
<xul:dropmarker class="menulist-dropmarker" type="menu" xbl:inherits="disabled,open"/>
|
||||
<children includes="menupopup"/>
|
||||
|
|
|
@ -1224,6 +1224,10 @@ tabmodalprompt {
|
|||
}
|
||||
|
||||
.button-highlightable-text:not([highlightable="true"]),
|
||||
.button-text[highlightable="true"] {
|
||||
.button-text[highlightable="true"],
|
||||
.menulist-highlightable-label:not([highlightable="true"]),
|
||||
.menulist-label[highlightable="true"],
|
||||
.menu-iconic-highlightable-text:not([highlightable="true"]),
|
||||
.menu-iconic-text[highlightable="true"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче