зеркало из https://github.com/mozilla/pjs.git
Bug 235690 mozilla menu items' AtkAction interface is nonfunctional
r = kyle.yuan@sun.com sr = henry.jia@sun.com
This commit is contained in:
Родитель
9264864dfc
Коммит
adcf5f76f0
|
@ -140,7 +140,7 @@ getNameCB(AtkAction *aAction, gint aActionIndex)
|
|||
NS_ENSURE_TRUE(action, nsnull);
|
||||
|
||||
const char *name = action->GetName();
|
||||
if (!name) {
|
||||
if (!name || (strlen(name) == 0)) {
|
||||
nsAutoString autoStr;
|
||||
nsresult rv = accWrap->GetActionName(aActionIndex, autoStr);
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
|
|
|
@ -92,7 +92,7 @@ NS_IMETHODIMP nsXULButtonAccessible::GetActionName(PRUint8 index, nsAString& _re
|
|||
NS_IMETHODIMP nsXULButtonAccessible::DoAction(PRUint8 index)
|
||||
{
|
||||
if (index == 0) {
|
||||
nsCOMPtr<nsIDOMXULButtonElement> buttonElement(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIDOMXULElement> buttonElement(do_QueryInterface(mDOMNode));
|
||||
if ( buttonElement )
|
||||
{
|
||||
buttonElement->Click();
|
||||
|
@ -345,7 +345,7 @@ NS_IMETHODIMP nsXULCheckboxAccessible::GetActionName(PRUint8 index, nsAString& _
|
|||
NS_IMETHODIMP nsXULCheckboxAccessible::DoAction(PRUint8 index)
|
||||
{
|
||||
if (index == eAction_Click) {
|
||||
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIDOMXULElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
|
||||
if (xulCheckboxElement) {
|
||||
xulCheckboxElement->Click();
|
||||
return NS_OK;
|
||||
|
@ -473,7 +473,7 @@ nsRadioButtonAccessible(aNode, aShell)
|
|||
NS_IMETHODIMP nsXULRadioButtonAccessible::DoAction(PRUint8 index)
|
||||
{
|
||||
if (index == eAction_Click) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIDOMXULElement> radioButton(do_QueryInterface(mDOMNode));
|
||||
if (radioButton) {
|
||||
radioButton->Click();
|
||||
return NS_OK;
|
||||
|
|
|
@ -216,15 +216,9 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetChildCount(PRInt32 *aAccChildCount)
|
|||
NS_IMETHODIMP nsXULMenuitemAccessible::DoAction(PRUint8 index)
|
||||
{
|
||||
if (index == eAction_Select) { // default action
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectItem(do_QueryInterface(mDOMNode));
|
||||
if (selectItem)
|
||||
selectItem->DoCommand();
|
||||
else {
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(mDOMNode));
|
||||
if (xulElement) {
|
||||
xulElement->Click();
|
||||
}
|
||||
}
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(mDOMNode));
|
||||
if (xulElement)
|
||||
xulElement->Click();
|
||||
|
||||
nsCOMPtr<nsIAccessible> parentAccessible;
|
||||
GetParent(getter_AddRefs(parentAccessible));
|
||||
|
|
|
@ -87,7 +87,7 @@ NS_IMETHODIMP nsXULTabAccessible::GetActionName(PRUint8 index, nsAString& _retva
|
|||
NS_IMETHODIMP nsXULTabAccessible::DoAction(PRUint8 index)
|
||||
{
|
||||
if (index == eAction_Switch) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mDOMNode));
|
||||
nsCOMPtr<nsIDOMXULElement> tab(do_QueryInterface(mDOMNode));
|
||||
if ( tab )
|
||||
{
|
||||
tab->Click();
|
||||
|
|
Загрузка…
Ссылка в новой задаче