Closed Bug 289858 Opened 20 years ago Closed 20 years ago

Expose number of children for a given tree item

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

For tree item accessibles, we don't currently expose the number of children in a
way that is efficient for an AT to get to.
Attachment #180347 - Flags: review?(pkwarren)
Attachment #180362 - Flags: review?(pkwarren) → review?(timeless)
Attachment #180362 - Flags: superreview?(neil.parkwaycc.co.uk)
Comment on attachment 180362 [details] [diff] [review]
Also remove unnecessary value support for tree items and make sure we don't expose this discription for lists implemented with a tree

>+  // Count the number of children
You do know that in general it's not possible to know how many potential
children a collapsed parent has, right? All of these methods just return the
number of visible children.

>+  testRow = mRow;
>+  PRInt32 numChildren = 0;
>+  while (++ testRow < numRows) {
>+    PRInt32 testLevel = 0;
>+    mTreeView->GetLevel(testRow, &testLevel);
>+    if (testLevel != level + 1) {
>+      break;
>+    }
>+    ++ numChildren;
>+  }
This needs to work like the loop for the number of siblings, i.e. you only want
to count the immediate children, and you should only break when the testLevel
<= level.

sr=me with these nits addressed.
Attachment #180362 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment on attachment 180362 [details] [diff] [review]
Also remove unnecessary value support for tree items and make sure we don't expose this discription for lists implemented with a tree

Timeless gave r= on IRC.
Neil's nits will be addressed.
Attachment #180362 - Flags: review?(timeless)
Attachment #180362 - Flags: review+
Attachment #180362 - Flags: approval1.8b2?
Comment on attachment 180362 [details] [diff] [review]
Also remove unnecessary value support for tree items and make sure we don't expose this discription for lists implemented with a tree

a=asa
Attachment #180362 - Flags: approval1.8b2? → approval1.8b2+
Checking in src/msaa/nsAccessibleWrap.cpp;
/cvsroot/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp,v  <-- 
nsAccessibleWrap.cpp
new revision: 1.26; previous revision: 1.25
done
Checking in src/msaa/nsXULTreeAccessibleWrap.cpp;
/cvsroot/mozilla/accessible/src/msaa/nsXULTreeAccessibleWrap.cpp,v  <-- 
nsXULTreeAccessibleWrap.cpp
new revision: 1.5; previous revision: 1.4
done
Checking in src/xul/nsXULTreeAccessible.cpp;
/cvsroot/mozilla/accessible/src/xul/nsXULTreeAccessible.cpp,v  <-- 
nsXULTreeAccessible.cpp
new revision: 1.32; previous revision: 1.31
done
Checking in src/xul/nsXULTreeAccessible.h;
/cvsroot/mozilla/accessible/src/xul/nsXULTreeAccessible.h,v  <-- 
nsXULTreeAccessible.h
new revision: 1.16; previous revision: 1.15
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: