mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Bug 1321556 - Remove unused bindings from urlbarbindings.xml. r=dao
MozReview-Commit-ID: FfIsoh76ajn --HG-- extra : rebase_source : cfc30eb7a1d9961d108dbad9ca0fb32d5c208043
This commit is contained in:
parent
4f0ada8315
commit
975f9b571e
@ -834,7 +834,6 @@ var BookmarksEventHandler = {
|
||||
if (node.localName == "menupopup")
|
||||
node.hidePopup();
|
||||
else if (node.localName != "menu" &&
|
||||
node.localName != "splitmenu" &&
|
||||
node.localName != "hbox" &&
|
||||
node.localName != "vbox" )
|
||||
break;
|
||||
|
@ -434,13 +434,7 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
|
||||
background-position: bottom left;
|
||||
}
|
||||
|
||||
.menuitem-tooltip {
|
||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-tooltip");
|
||||
}
|
||||
|
||||
.menuitem-iconic-tooltip,
|
||||
.menuitem-tooltip[type="checkbox"],
|
||||
.menuitem-tooltip[type="radio"] {
|
||||
.menuitem-iconic-tooltip {
|
||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-iconic-tooltip");
|
||||
}
|
||||
|
||||
|
@ -2528,131 +2528,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="splitmenu">
|
||||
<content>
|
||||
<xul:hbox anonid="menuitem" flex="1"
|
||||
class="splitmenu-menuitem"
|
||||
xbl:inherits="iconic,label,disabled,onclick=oncommand,_moz-menuactive=active"/>
|
||||
<xul:menu anonid="menu" class="splitmenu-menu"
|
||||
xbl:inherits="disabled,_moz-menuactive=active"
|
||||
oncommand="event.stopPropagation();">
|
||||
<children includes="menupopup"/>
|
||||
</xul:menu>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
<constructor><![CDATA[
|
||||
this._parentMenupopup.addEventListener("DOMMenuItemActive", this, false);
|
||||
this._parentMenupopup.addEventListener("popuphidden", this, false);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
this._parentMenupopup.removeEventListener("DOMMenuItemActive", this, false);
|
||||
this._parentMenupopup.removeEventListener("popuphidden", this, false);
|
||||
]]></destructor>
|
||||
|
||||
<field name="menuitem" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "menuitem");
|
||||
</field>
|
||||
<field name="menu" readonly="true">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "menu");
|
||||
</field>
|
||||
|
||||
<field name="_menuDelay">600</field>
|
||||
|
||||
<field name="_parentMenupopup"><![CDATA[
|
||||
this._getParentMenupopup(this);
|
||||
]]></field>
|
||||
|
||||
<method name="_getParentMenupopup">
|
||||
<parameter name="aNode"/>
|
||||
<body><![CDATA[
|
||||
let node = aNode.parentNode;
|
||||
while (node) {
|
||||
if (node.localName == "menupopup")
|
||||
break;
|
||||
node = node.parentNode;
|
||||
}
|
||||
return node;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="handleEvent">
|
||||
<parameter name="event"/>
|
||||
<body><![CDATA[
|
||||
switch (event.type) {
|
||||
case "DOMMenuItemActive":
|
||||
if (this.getAttribute("active") == "true" &&
|
||||
event.target != this &&
|
||||
this._getParentMenupopup(event.target) == this._parentMenupopup)
|
||||
this.removeAttribute("active");
|
||||
break;
|
||||
case "popuphidden":
|
||||
if (event.target == this._parentMenupopup)
|
||||
this.removeAttribute("active");
|
||||
break;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="mouseover"><![CDATA[
|
||||
if (this.getAttribute("active") != "true") {
|
||||
this.setAttribute("active", "true");
|
||||
|
||||
let menuItemActiveEvent = document.createEvent("Events");
|
||||
menuItemActiveEvent.initEvent("DOMMenuItemActive", true, false);
|
||||
this.dispatchEvent(menuItemActiveEvent);
|
||||
|
||||
if (this.getAttribute("disabled") != "true") {
|
||||
let self = this;
|
||||
setTimeout(function() {
|
||||
if (self.getAttribute("active") == "true")
|
||||
self.menu.open = true;
|
||||
}, this._menuDelay);
|
||||
}
|
||||
}
|
||||
]]></handler>
|
||||
|
||||
<handler event="popupshowing"><![CDATA[
|
||||
if (event.target == this.firstChild &&
|
||||
this._parentMenupopup._currentPopup)
|
||||
this._parentMenupopup._currentPopup.hidePopup();
|
||||
]]></handler>
|
||||
|
||||
<handler event="click" phase="capturing"><![CDATA[
|
||||
if (this.getAttribute("disabled") == "true") {
|
||||
// Prevent the command from being carried out
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
let node = event.originalTarget;
|
||||
while (true) {
|
||||
if (node == this.menuitem)
|
||||
break;
|
||||
if (node == this)
|
||||
return;
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
||||
this._parentMenupopup.hidePopup();
|
||||
]]></handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="menuitem-tooltip" extends="chrome://global/content/bindings/menu.xml#menuitem">
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
this.setAttribute("tooltiptext", this.getAttribute("acceltext"));
|
||||
// TODO: Simplify this to this.setAttribute("acceltext", "") once bug
|
||||
// 592424 is fixed
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "accel").firstChild.setAttribute("value", "");
|
||||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- This binding is only retained for add-ons compatibility -->
|
||||
<binding id="menuitem-iconic-tooltip" extends="chrome://global/content/bindings/menu.xml#menuitem-iconic">
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
|
@ -1172,7 +1172,6 @@ GK_ATOM(span, "span")
|
||||
GK_ATOM(spellcheck, "spellcheck")
|
||||
GK_ATOM(spinner, "spinner")
|
||||
GK_ATOM(split, "split")
|
||||
GK_ATOM(splitmenu, "splitmenu")
|
||||
GK_ATOM(splitter, "splitter")
|
||||
GK_ATOM(spring, "spring")
|
||||
GK_ATOM(src, "src")
|
||||
|
@ -1759,7 +1759,6 @@ ConsumeOutsideClicksResult nsMenuPopupFrame::ConsumeOutsideClicks()
|
||||
#if defined(XP_WIN)
|
||||
// Don't consume outside clicks for menus in Windows
|
||||
if (ni->Equals(nsGkAtoms::menu, kNameSpaceID_XUL) ||
|
||||
ni->Equals(nsGkAtoms::splitmenu, kNameSpaceID_XUL) ||
|
||||
ni->Equals(nsGkAtoms::popupset, kNameSpaceID_XUL) ||
|
||||
((ni->Equals(nsGkAtoms::button, kNameSpaceID_XUL) ||
|
||||
ni->Equals(nsGkAtoms::toolbarbutton, kNameSpaceID_XUL)) &&
|
||||
|
@ -12,8 +12,7 @@
|
||||
|
||||
menu,
|
||||
menuitem,
|
||||
menucaption,
|
||||
.splitmenu-menuitem {
|
||||
menucaption {
|
||||
-moz-appearance: menuitem;
|
||||
-moz-box-align: center;
|
||||
max-width: 42em;
|
||||
@ -28,15 +27,13 @@ menuitem[default="true"] {
|
||||
}
|
||||
|
||||
menu[_moz-menuactive="true"],
|
||||
menuitem[_moz-menuactive="true"],
|
||||
.splitmenu-menuitem[_moz-menuactive="true"] {
|
||||
menuitem[_moz-menuactive="true"] {
|
||||
color: -moz-menuhovertext;
|
||||
background-color: -moz-menuhover;
|
||||
}
|
||||
|
||||
menu[disabled="true"],
|
||||
menuitem[disabled="true"],
|
||||
.splitmenu-menuitem[disabled="true"],
|
||||
menucaption[disabled="true"] {
|
||||
color: GrayText;
|
||||
}
|
||||
|
@ -12,8 +12,7 @@
|
||||
|
||||
menu,
|
||||
menuitem,
|
||||
menucaption,
|
||||
.splitmenu-menuitem {
|
||||
menucaption {
|
||||
-moz-appearance: menuitem;
|
||||
-moz-box-align: center;
|
||||
color: MenuText;
|
||||
@ -28,10 +27,8 @@ menuitem[default="true"] {
|
||||
|
||||
menu[disabled="true"],
|
||||
menuitem[disabled="true"],
|
||||
.splitmenu-menuitem[disabled="true"],
|
||||
menu[_moz-menuactive="true"][disabled="true"],
|
||||
menuitem[_moz-menuactive="true"][disabled="true"],
|
||||
.splitmenu-menuitem[_moz-menuactive="true"][disabled="true"] {
|
||||
menuitem[_moz-menuactive="true"][disabled="true"] {
|
||||
color: GrayText;
|
||||
text-shadow: none;
|
||||
}
|
||||
@ -39,8 +36,7 @@ menuitem[_moz-menuactive="true"][disabled="true"],
|
||||
@media (-moz-windows-classic) {
|
||||
menu[disabled="true"],
|
||||
menubar > menu[disabled="true"][_moz-menuactive="true"],
|
||||
menuitem[disabled="true"],
|
||||
.splitmenu-menuitem[disabled="true"] {
|
||||
menuitem[disabled="true"] {
|
||||
color: ThreeDShadow;
|
||||
text-shadow: 1px 1px ThreeDHighlight;
|
||||
}
|
||||
@ -102,8 +98,7 @@ menucaption > .menu-iconic-text {
|
||||
}
|
||||
|
||||
menu.menu-iconic > .menu-iconic-left,
|
||||
menuitem.menuitem-iconic > .menu-iconic-left,
|
||||
.splitmenu-menuitem[iconic="true"] > .menu-iconic-left {
|
||||
menuitem.menuitem-iconic > .menu-iconic-left {
|
||||
-moz-appearance: menuimage;
|
||||
padding-top: 2px;
|
||||
}
|
||||
@ -186,8 +181,7 @@ menupopup > menucaption {
|
||||
}
|
||||
|
||||
menu[_moz-menuactive="true"],
|
||||
menuitem[_moz-menuactive="true"],
|
||||
.splitmenu-menuitem[_moz-menuactive="true"] {
|
||||
menuitem[_moz-menuactive="true"] {
|
||||
background-color: -moz-menuhover;
|
||||
color: -moz-menuhovertext;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user