mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 149858 [XBLFC] Active Accessibility: support XBL-based HTML radio
r=aaronl, sr=jst Add nsIAccessibleProvider in radio.xml, create accessible object for XBL radio button
This commit is contained in:
parent
ba59803131
commit
61c5b0b4db
@ -50,6 +50,7 @@ interface nsIAccessibilityService : nsISupports
|
||||
nsIAccessible createHTMLNativeWindowAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell, in PRInt32 aHWnd);
|
||||
nsIAccessible createHTMLPluginAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell);
|
||||
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLRadioButtonAccessibleXBL(in nsIDOMNode aNode);
|
||||
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
|
||||
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
|
||||
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
|
||||
|
@ -605,6 +605,25 @@ nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsISupports *aFrame, nsI
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLRadioButtonAccessibleXBL(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIWeakReference> weakShell;
|
||||
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||
|
||||
// reusing the HTML accessible widget and enhancing for XUL
|
||||
*_retval = new nsHTMLRadioButtonAccessible(aNode, weakShell);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(*_retval);
|
||||
#else
|
||||
*_retval = nsnull;
|
||||
#endif // MOZ_XUL
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIAccessible *aAccParent, nsISupports* aPresContext, nsIAccessible **_retval)
|
||||
{
|
||||
|
@ -46,6 +46,18 @@
|
||||
<xul:image class="input-radio-check"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessible">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); // Temporary, until bug 104907 is fixed
|
||||
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||
return accService.createHTMLRadioButtonAccessibleXBL(this);
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
@ -46,6 +46,18 @@
|
||||
<xul:image class="input-radio-check"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessible">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); // Temporary, until bug 104907 is fixed
|
||||
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||
return accService.createHTMLRadioButtonAccessibleXBL(this);
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
Loading…
Reference in New Issue
Block a user