Closed Bug 570405 Opened 13 years ago Closed 13 years ago

nsAccEvent should deal with nsAccessible

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch patch (obsolete) — Splinter Review
Attachment #449526 - Flags: review?(bolterbugz)
Attached patch patch2Splinter Review
fix failure on linux
Attachment #449526 - Attachment is obsolete: true
Attachment #449527 - Flags: review?(bolterbugz)
Attachment #449526 - Flags: review?(bolterbugz)
Comment on attachment 449527 [details] [diff] [review]
patch2

r=me with comment (optional nits):

>+nsAccessible *
>+nsAccEvent::GetAccessible()
>+{
>+  if (!mAccessible)
>+    mAccessible = GetAccessibleByNode();
>+
>+  return mAccessible;
>+}
>+
> nsINode*
> nsAccEvent::GetNode()
> {
>-  if (!mNode) {
>-    nsRefPtr<nsAccessNode> accessNode(do_QueryObject(mAccessible));
>-    if (accessNode)
>-      mNode = accessNode->GetNode();
>-  }
>+  if (!mNode && mAccessible)
>+    mNode = mAccessible->GetNode();
> 
>   return mNode;
> }

For these you could just do:

return foo ? foo : bar->GetFoo();
Attachment #449527 - Flags: review?(bolterbugz) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.