зеркало из https://github.com/mozilla/gecko-dev.git
Bug 374610 - xul:menuitem should have a way to get parent xul:menu, r=enndeaking, sr=neil, a=mtschrep
This commit is contained in:
Родитель
d8aebfb510
Коммит
abe6a728ae
|
@ -37,9 +37,19 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIDOMXULElement.idl"
|
||||
interface nsIDOMXULContainerElement;
|
||||
|
||||
[scriptable, uuid(edfeaf37-3b24-4466-af7a-b3851044f1c1)]
|
||||
interface nsIDOMXULContainerElement : nsIDOMXULElement
|
||||
[scriptable, uuid(4650e55f-4777-4271-8b62-9603a7dd4614)]
|
||||
interface nsIDOMXULContainerItemElement : nsIDOMXULElement
|
||||
{
|
||||
/**
|
||||
* Returns the parent container if any.
|
||||
*/
|
||||
readonly attribute nsIDOMXULContainerElement parentContainer;
|
||||
};
|
||||
|
||||
[scriptable, uuid(bc07c626-4294-43ae-9b0a-e726de0adcad)]
|
||||
interface nsIDOMXULContainerElement : nsIDOMXULContainerItemElement
|
||||
{
|
||||
/**
|
||||
* Creates an item for the given label and value and appends it to the
|
||||
|
@ -87,9 +97,5 @@ interface nsIDOMXULContainerElement : nsIDOMXULElement
|
|||
* @param aIndex - the index of the item to return
|
||||
*/
|
||||
nsIDOMXULElement getItemAtIndex(in long aIndex);
|
||||
|
||||
/**
|
||||
* Returns the parent container if any.
|
||||
*/
|
||||
readonly attribute nsIDOMXULElement parentContainer;
|
||||
};
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
<resources>
|
||||
<stylesheet src="chrome://global/skin/menu.css"/>
|
||||
</resources>
|
||||
<implementation implements="nsIDOMXULSelectControlItemElement, nsIAccessibleProvider">
|
||||
<implementation implements="nsIDOMXULSelectControlItemElement, nsIDOMXULContainerItemElement, nsIAccessibleProvider">
|
||||
<!-- nsIAccessibleProvider -->
|
||||
<property name="accessibleType" readonly="true">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
|
@ -25,6 +26,8 @@
|
|||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<!-- nsIDOMXULSelectControlItemElement -->
|
||||
<property name="selected" readonly="true"
|
||||
onget="return this.getAttribute('selected') == 'true';"/>
|
||||
<property name="control" readonly="true">
|
||||
|
@ -38,6 +41,17 @@
|
|||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<!-- nsIDOMXULContainerItemElement -->
|
||||
<property name="parentContainer" readonly="true">
|
||||
<getter>
|
||||
for (var parent = this.parentNode; parent; parent = parent.parentNode) {
|
||||
if (parent instanceof Components.interfaces.nsIDOMXULContainerElement)
|
||||
return parent;
|
||||
}
|
||||
return null;
|
||||
</getter>
|
||||
</property>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
|
@ -141,16 +155,6 @@
|
|||
</body>
|
||||
</method>
|
||||
|
||||
<property name="parentContainer" readonly="true">
|
||||
<getter>
|
||||
for (var parent = this.parentNode; parent; parent = parent.parentNode) {
|
||||
if (parent instanceof Components.interfaces.nsIDOMXULContainerElement)
|
||||
return parent;
|
||||
}
|
||||
return null;
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<property name="menupopup" readonly="true">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
|
|
Загрузка…
Ссылка в новой задаче