Closed Bug 638684 Opened 14 years ago Closed 11 years ago

nsAccessible::GetFirstAvailableAccessible should use the same DOM tree traversal as in accessible tree creation

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

spun off bug 638326. I think it should be fixed by bug 634202. But prefer to keep this bug separately just in case. Don't forget to fix todo in text/test_hypertext.html.
Blocks: texta11y
Attached patch patch (obsolete) (deleted) — Splinter Review
Assignee: nobody → surkov.alexander
Attachment #8374787 - Flags: review?(trev.saunders)
Attachment #8374787 - Flags: review?(trev.saunders)
Attachment #8374787 - Attachment is obsolete: true
Attached patch patch (deleted) — Splinter Review
Attachment #8375709 - Flags: review?(trev.saunders)
Comment on attachment 8375709 [details] [diff] [review] patch >+ if (childNode == anchorNode) >+ return NextChildInternal(false); >+ } >+ PopState(); >+ >+ anchorNode = parentNode->AsElement(); why do you need the AsElement() >+ enum { >+ eWalkCache = 1, >+ eWalkContextTree = 2 | eWalkCache Its weird how one flag implies another. also comment what they mean? > virtual ~TreeWalker(); btw why is that virtual? >+ descendant = mDoc->GetAccessible(findNode); >+ if (!descendant && findNode->IsElement()) { >+ Accessible* container = mDoc->GetContainerAccessible(findNode); what's wrong with text nodes?
Attachment #8375709 - Flags: review?(trev.saunders) → review+
(In reply to Trevor Saunders (:tbsaunde) from comment #3) > >+ anchorNode = parentNode->AsElement(); > > why do you need the AsElement() to assign it to anchorNode which is a content > >+ enum { > >+ eWalkCache = 1, > >+ eWalkContextTree = 2 | eWalkCache > > Its weird how one flag implies another. also comment what they mean? not sure how to make it nicer, I don't want to have an option to go outside the given element and create the tree. I will document. > > virtual ~TreeWalker(); > > btw why is that virtual? change it to MOZ_FINAL while I'm here? > >+ descendant = mDoc->GetAccessible(findNode); > >+ if (!descendant && findNode->IsElement()) { > >+ Accessible* container = mDoc->GetContainerAccessible(findNode); > > what's wrong with text nodes? text nodes should be accessible in general, I guess it's technically possible to stop at not accessible text node though. I will change that to nsIContent then.
> > >+ enum { > > >+ eWalkCache = 1, > > >+ eWalkContextTree = 2 | eWalkCache > > > > Its weird how one flag implies another. also comment what they mean? > > not sure how to make it nicer, I don't want to have an option to go outside > the given element and create the tree. I will document. fair enough > > > virtual ~TreeWalker(); > > > > btw why is that virtual? > > change it to MOZ_FINAL while I'm here? it shouldn't have any virtual functions, but I guess you might as well.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: