Fix menubuttons to not rely on the "open" attribute opening menus; open them
via the boxobject. Bug 282359, r=mconnor, sr=neil git-svn-id: svn://10.0.0.236/trunk@169601 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
678fff63d6
commit
d603b075d5
@ -28,10 +28,17 @@
|
||||
onget="return this.getAttribute('group');"
|
||||
onset="this.setAttribute('group', val); return val;"/>
|
||||
|
||||
<property name="open"
|
||||
onget="return this.hasAttribute('open');"
|
||||
onset="if (val) this.setAttribute('open', 'true');
|
||||
else this.removeAttribute('open'); return val;"/>
|
||||
<property name="open" onget="return this.hasAttribute('open');">
|
||||
<setter><![CDATA[
|
||||
// Note that the QI may throw if we're not a menu, but we want that
|
||||
// to happen, since in that case setting our "open" property is
|
||||
// somewhat bogus
|
||||
this.boxObject
|
||||
.QueryInterface(Components.interfaces.nsIMenuBoxObject)
|
||||
.openMenu(val);
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
<property name="checked" onget="return this.hasAttribute('checked');">
|
||||
<setter><![CDATA[
|
||||
|
||||
@ -28,10 +28,17 @@
|
||||
onget="return this.getAttribute('group');"
|
||||
onset="this.setAttribute('group', val); return val;"/>
|
||||
|
||||
<property name="open"
|
||||
onget="return this.hasAttribute('open');"
|
||||
onset="if (val) this.setAttribute('open', 'true');
|
||||
else this.removeAttribute('open'); return val;"/>
|
||||
<property name="open" onget="return this.hasAttribute('open');">
|
||||
<setter><![CDATA[
|
||||
// Note that the QI may throw if we're not a menu, but we want that
|
||||
// to happen, since in that case setting our "open" property is
|
||||
// somewhat bogus
|
||||
this.boxObject
|
||||
.QueryInterface(Components.interfaces.nsIMenuBoxObject)
|
||||
.openMenu(val);
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
<property name="checked" onget="return this.hasAttribute('checked');">
|
||||
<setter><![CDATA[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user