mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Fix menubuttons to not rely on the "open" attribute opening menus; open them
via the boxobject. Bug 282359, r=mconnor, sr=neil
This commit is contained in:
parent
bf95c180db
commit
56b2bc8030
@ -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…
Reference in New Issue
Block a user