expose stale state on accessibles unattached from tree

RESOLVED FIXED in mozilla8

Status

()

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

People

(Reporter: surkov, Assigned: surkov)

Tracking

(Blocks: 1 bug, {access})

unspecified
mozilla8
access
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

6 years ago
Created attachment 550414 [details] [diff] [review]
patch
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #550414 - Flags: review?(trev.saunders)
Comment on attachment 550414 [details] [diff] [review]
patch

>    */
>-  inline bool HasAccessible(nsINode* aNode)
>+  inline bool HasAccessible(nsINode* aNode) const
>   {
>     return GetAccessible(aNode);
>   }

nit, don't we usually use { return blah; } in cases like this?

> 
>   /**
>+   * Return true if the given accessible is in document.
>+   */
>+  inline bool IsInDocument(nsAccessible* aAccessible) const
>+  {
>+    nsAccessible* acc = aAccessible;

why do you need this local var? why not just mutate aAcc? 

>+    while (acc && !acc->IsPrimaryForNode())
>+      acc = acc->Parent();
>+
>+    return acc ? !!mNodeToAccessibleMap.Get(acc->GetNode()) : false;
>+  }

why do you need !! does some compiler complain?
Attachment #550414 - Flags: review?(trev.saunders) → review+
(Assignee)

Comment 3

6 years ago
(In reply to comment #2)

> nit, don't we usually use { return blah; } in cases like this?

ok, fine with me

> >+  {
> >+    nsAccessible* acc = aAccessible;
> 
> why do you need this local var? why not just mutate aAcc? 

harder to debug, following the rule "keep in arguments unchanged"

> >+    return acc ? !!mNodeToAccessibleMap.Get(acc->GetNode()) : false;
> >+  }
> 
> why do you need !! does some compiler complain?

I didn't try, just this is usual way to convert pointer to boolean
(Assignee)

Comment 4

6 years ago
landed on inbound http://hg.mozilla.org/integration/mozilla-inbound/rev/dd38dafe931b
Flags: in-testsuite+
Whiteboard: [inbound]
(Assignee)

Comment 5

6 years ago
landed http://hg.mozilla.org/mozilla-central/rev/dd38dafe931b
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
(Assignee)

Updated

6 years ago
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.