Last Comment Bug 495624 - accessibility shouldn't be caching the current focus
: accessibility shouldn't be caching the current focus
Status: RESOLVED FIXED
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: alexander :surkov
:
: alexander :surkov
Mentors:
: 545436 (view as bug list)
Depends on: 178324
Blocks: cleana11y
  Show dependency treegraph
 
Reported: 2009-05-30 08:40 PDT by Neil Deakin
Modified: 2011-09-28 02:15 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Neil Deakin 2009-05-30 08:40:54 PDT
From bug 178324, it should instead be retrieved from the focus manager when needed. A cached value is likely to be inaccurate.
Comment 1 David Bolter [:davidb] 2010-02-10 12:05:05 PST
Why don't we use nsDocument::GetActiveElement?

Note Enn comments in our code:

NS_IMETHODIMP nsDocAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
{
  // XXXndeakin P3 accessibility shouldn't be caching the focus

In any event we should investigate when our cached node is different from what
this API gives us. For cases it should be the same we should add test coverage.
Comment 2 David Bolter [:davidb] 2010-02-10 12:08:11 PST
*** Bug 545436 has been marked as a duplicate of this bug. ***
Comment 3 alexander :surkov 2010-02-10 12:13:22 PST
(In reply to comment #1)
> Why don't we use nsDocument::GetActiveElement?

> In any event we should investigate when our cached node is different from what
> this API gives us. 

Yep, it's different, for example, menuitems and etc. I don't have clever idea how we could combine gecko cached focused node with our rules.
Comment 4 alexander :surkov 2010-02-10 12:14:01 PST
Also we cache frame type of the focused node, it's kind of related with cached focused node.
Comment 5 David Bolter [:davidb] 2010-02-10 12:15:14 PST
Yeah I keep mid air colliding with you :)

Note we also store:
PRUint32 nsDocAccessible::gLastFocusedAccessiblesState
nsIAtom *nsDocAccessible::gLastFocusedFrameType

We probably need a hybrid of storing what we thought the last focus state was, and asking what currently the focus state is.
Comment 6 alexander :surkov 2011-09-28 02:15:53 PDT
fixed by bug 673958

Note You need to log in before you can comment on or make changes to this bug.