Bug 890476 - Don't build a menubar on OSX, r=dao

This commit is contained in:
Gijs Kruitbosch 2013-07-08 17:15:16 +02:00
parent a1f9619073
commit 1f5207e084
3 changed files with 33 additions and 0 deletions

View File

@ -18,6 +18,10 @@ toolbar[customizable="true"] {
}
%ifdef XP_MACOSX
#toolbar-menubar {
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-stub");
}
toolbar[customizable="true"]:not([nowindowdrag="true"]) {
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
}

View File

@ -146,6 +146,33 @@
</implementation>
</binding>
<binding id="toolbar-menubar-stub">
<implementation>
<property name="toolbox" readonly="true">
<getter><![CDATA[
if (this._toolbox)
return this._toolbox;
if (this.parentNode && this.parentNode.localName == "toolbox") {
this._toolbox = this.parentNode;
}
return this._toolbox;
]]></getter>
</property>
<property name="currentSet" readonly="true">
<getter><![CDATA[
return this.getAttribute("defaultset");
]]></getter>
</property>
<method name="insertItem">
<body><![CDATA[
return null;
]]></body>
</method>
</implementation>
</binding>
<!-- The toolbar-menubar-autohide and toolbar-drag bindings are almost
verbatim copies of their toolkit counterparts - they just inherit from
the customizableui's toolbar binding instead of toolkit's. We're currently

View File

@ -148,6 +148,7 @@ let CustomizableUIInternal = {
"social-share-button",
]
});
#ifndef XP_MACOSX
this.registerArea(CustomizableUI.AREA_MENUBAR, {
legacy: true,
type: CustomizableUI.TYPE_TOOLBAR,
@ -155,6 +156,7 @@ let CustomizableUIInternal = {
"menubar-items",
]
});
#endif
this.registerArea(CustomizableUI.AREA_TABSTRIP, {
legacy: true,
type: CustomizableUI.TYPE_TOOLBAR,