Use GetNativeInterface, GetAccessibleWrap instead of CAST

RESOLVED FIXED

Status

()

Core
Disability Access APIs
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Ginn Chen, Assigned: Ginn Chen)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
I think using nsIAccessible::GetNativeInterface is a safer, cleaner way than NS_STATIC_CAST nsIAccessible to nsAccessibleWrap and then GetAtkObject().

And we can use
nsAccessibleWrap *accWrap = GetAccessible(aAtkObj);
instead of
nsAccessibleWrap *accWrap = NS_REINTERPTET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
(Assignee)

Comment 1

11 years ago
Created attachment 266723 [details] [diff] [review]
patch
Attachment #266723 - Flags: review?(surkov.alexander)
(Assignee)

Updated

11 years ago
OS: Mac OS X → Linux

Comment 2

11 years ago
Comment on attachment 266723 [details] [diff] [review]
patch

I like this approach. Probably you would save some code lines if you add GetAtkObject(nsIAccessible*) like GetAccessibleWrap(). But it's not worth to do. Also you removed checking of nsresult but it's safely to have it but I'm sure you know what you do :).
Attachment #266723 - Flags: review?(surkov.alexander) → review+
(Assignee)

Comment 3

11 years ago
There is a typo in my patch, sorry for that.
+    AtkObject *cellAtkObj = ATK_OBJECT(cellAtkObj);
should be
+    AtkObject *cellAtkObj = ATK_OBJECT(cellAtkObjPtr);
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.