Closed Bug 566551 Opened 14 years ago Closed 14 years ago

ARIA grid and accessible selectable methods shouldn't use GetNextSibling

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) (deleted) — Splinter Review
Attachment #445924 - Flags: superreview?(neil)
Attachment #445924 - Flags: review?(marco.zehe)
Attachment #445924 - Flags: review?(bolterbugz)
Comment on attachment 445924 [details] [diff] [review] patch Nit: >+ var acc = getAccessible(aIdentifier, [nsIAccessibleSelectable]); >+ var len = aSelectedChildren.length; Please bail if acc is null.
Attachment #445924 - Flags: review?(marco.zehe) → review+
(In reply to comment #2) > (From update of attachment 445924 [details] [diff] [review]) > Nit: > >+ var acc = getAccessible(aIdentifier, [nsIAccessibleSelectable]); > >+ var len = aSelectedChildren.length; > > Please bail if acc is null. ok
Comment on attachment 445924 [details] [diff] [review] patch >+nsAccessible* >+nsAccIterator::GetNext() >+{ >+ if (!mState) >+ return nsnull; >+ >+ nsAccessible *child = mState->mParent->GetChildAt(mState->mIndex++); >+ if (!child) { >+ IteratorState *tmp = mState; >+ mState = mState->mParentState; >+ delete tmp; >+ >+ return GetNext(); >+ } >+ >+ PRBool isComplying = mFilterFunc(child); >+ if (isComplying) >+ return child; >+ >+ if (mIsDeep) { >+ IteratorState *childState = new IteratorState(child, mState); >+ mState = childState; >+ } >+ >+ return GetNext(); >+} It might look nice but I'm scared by this "loop" ;-) Would you mind using a while (mState) loop instead?
Attachment #445924 - Flags: superreview?(neil) → superreview+
Attached patch patch2 (deleted) — Splinter Review
Neil's comment is addressed
Attachment #445924 - Attachment is obsolete: true
Attachment #445942 - Flags: review?(bolterbugz)
Attachment #445924 - Flags: review?(bolterbugz)
Neil, is the patch ok?
Yeah, that looks OK now thanks!
Comment on attachment 445942 [details] [diff] [review] patch2 After discussing on IRC, -Alex and I agreed that I do the code review in David's absence. r=me with nits/requests: >+ /** >+ * Return next accessible complying with filter function. >+ */ Please add a sentence saying that when calling for the first time, returns the first item (so that it is clear there is no extra method for getting the first item). >+ // The index out of range. The index *is* out of range. >+ ++ (*aSelectionCount); Remove space before ( please.
Attachment #445942 - Flags: review?(bolterbugz) → review+
landed on 1.9.3 with addressed Marco's comments - http://hg.mozilla.org/mozilla-central/rev/f646d72f612d
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: