Closed
Bug 590176
Opened 14 years ago
Closed 14 years ago
add pseudo SelectAccessible interface
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
References
Details
(Keywords: access)
Attachments
(1 file)
111.10 KB,
patch
|
MarcoZ
:
review+
davidb
:
review+
davidb
:
approval2.0+
|
Details | Diff | Splinter Review |
similar to bug 589399
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #470471 -
Flags: review?(marco.zehe)
Attachment #470471 -
Flags: review?(bolterbugz)
Attachment #470471 -
Flags: approval2.0?
Comment 2•14 years ago
|
||
Comment on attachment 470471 [details] [diff] [review] patch >+ return index >= 0 ? 1 : 0; Please "return (index >= 0) ? 1: 0;" (still going... this isn't just renames and code movement)
Comment 3•14 years ago
|
||
Comment on attachment 470471 [details] [diff] [review] patch >+ nsIMutableArray* items = nsnull; >+ selectedItems.forget(&items); >+ return items; >+} I'm not familiar with calling forget with an argument. I assume this keeps the reference while nulling out our comptr?
Comment 4•14 years ago
|
||
I mean the ref count.
Assignee | ||
Comment 5•14 years ago
|
||
items = selectedItems.mRefPtr; selectedItems.mRefPtr = nsnull; no addref/release, just grants the pointer
Comment 6•14 years ago
|
||
Comment on attachment 470471 [details] [diff] [review] patch >+ // XXX: nsIAccessibleText and nsIAccessibleSelectable both have >+ // selectionCount property. >+ //is(acc.selectionCount, aSelectedChildren.length, >+ // "selectionCount: wrong selected children count for " + prettyName(aIdentifier)); Do we have a bug filed for this so that it always behaves consistently and we can uncomment this? Other than that, r=me for the tests, thanks!
Attachment #470471 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6) > Comment on attachment 470471 [details] [diff] [review] > patch > > >+ // XXX: nsIAccessibleText and nsIAccessibleSelectable both have > >+ // selectionCount property. > >+ //is(acc.selectionCount, aSelectedChildren.length, > >+ // "selectionCount: wrong selected children count for " + prettyName(aIdentifier)); > > Do we have a bug filed for this so that it always behaves consistently and we > can uncomment this? technically we don't but I plan to fix this as part of dexpcom'ing.
Comment 8•14 years ago
|
||
Comment on attachment 470471 [details] [diff] [review] patch >+++ b/accessible/src/base/nsAccUtils.cpp >@@ -371,26 +371,21 @@ nsAccessible * > nsAccUtils::GetSelectableContainer(nsAccessible *aAccessible, PRUint32 aState) > { > if (!aAccessible) > return nsnull; > > if (!(aState & nsIAccessibleStates::STATE_SELECTABLE)) > return nsnull; > >- nsCOMPtr<nsIAccessibleSelectable> container; >- nsAccessible *parent = aAccessible; >- while (!container) { >- parent = parent->GetParent(); >- if (!parent || Role(parent) == nsIAccessibleRole::ROLE_PANE) >+ nsAccessible* parent = aAccessible; >+ while ((parent = parent->GetParent()) && !parent->IsSelect()) { >+ if (Role(parent) == nsIAccessibleRole::ROLE_PANE) > return nsnull; What about null checking parent before accessing it?
Assignee | ||
Comment 9•14 years ago
|
||
(In reply to comment #8) > Comment on attachment 470471 [details] [diff] [review] > What about null checking parent before accessing it? because > > nsAccUtils::GetSelectableContainer(nsAccessible *aAccessible, PRUint32 aState) > > { > > if (!aAccessible) > > return nsnull; ... > >+ nsAccessible* parent = aAccessible; if you mean that
Comment 10•14 years ago
|
||
Actually I didn't mean that, but I see we are okay where I was worried. False alarm (3 hrs sleep).
Comment 11•14 years ago
|
||
Comment on attachment 470471 [details] [diff] [review] patch r+a=me. Nice. I didn't look at the tests... just trusting Marco.
Attachment #470471 -
Flags: review?(bolterbugz)
Attachment #470471 -
Flags: review+
Attachment #470471 -
Flags: approval2.0?
Attachment #470471 -
Flags: approval2.0+
Assignee | ||
Comment 12•14 years ago
|
||
landed on 2.0 - http://hg.mozilla.org/mozilla-central/rev/cbbccc115e55
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•