Closed
Bug 147756
Opened 22 years ago
Closed 22 years ago
nsIAccessible's accValue returns NS_ERROR_FAILURE
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: dsirnapalli, Assigned: aaronlev)
Details
Attachments
(2 files, 1 obsolete file)
2.84 KB,
application/vnd.mozilla.xul+xml
|
Details | |
2.61 KB,
patch
|
yuanyi21
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
-- Test case attached. If accValue is not implemented for listbox then it should return NS_ERROR_NOT_IMPLEMENTED. It should not return NS_ERROR_FAILURE.
Reporter | ||
Comment 1•22 years ago
|
||
take it for me...
Assignee: aaronl → kyle.yuan
Summary: nsIAccessible's accValue returns NS_ERROR_FAILURE → nsIAccessible's accValue returns NS_ERROR_FAILURE
aaron, I found that, we can call nsCOMPtr<nsIDOMXULMultiSelectControlElement> select(do_QueryInterface (mDOMNode)); to get a nsIDOMXULMultiSelectControlElement*, but nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode)); will failed, although nsIDOMXULMultiSelectControlElement inherits from nsIDOMXULSelectControlElement. I'm not sure whether this is a bug of XUL or it should like this.
Assignee | ||
Comment 4•22 years ago
|
||
Kyle, how's this? That returns a value if something in the listbox is selected. It still returns an error if nothing is selected.
Assignee | ||
Comment 5•22 years ago
|
||
Kyle, seeking r= on this as well.
1) we should check selectedItem != nsnull, before use it http://lxr.mozilla.org/seamonkey/source/accessible/src/xul/nsXULSelectAccessible .cpp#196 2) there is a similar bug for nsXULComboboxAccessible http://lxr.mozilla.org/seamonkey/source/xpfe/global/resources/content/bindings/m enulist.xml#42 3) should we add _retval = NS_LITERAL_STRING(""); at the beginning of GetAccValue?
Assignee: kyle.yuan → aaronl
Assignee | ||
Comment 7•22 years ago
|
||
Attachment #85686 -
Attachment is obsolete: true
Comment on attachment 85788 [details] [diff] [review] Adds Kyle's suggestions r=kyle
Attachment #85788 -
Flags: review+
Comment 9•22 years ago
|
||
Comment on attachment 85788 [details] [diff] [review] Adds Kyle's suggestions @@ -190,11 +190,13 @@ */ NS_IMETHODIMP nsXULListboxAccessible::GetAccValue(nsAString& _retval) { + _retval.Assign(NS_LITERAL_STRING("")); This is just wrong, if you want to empty out the string, then just truncate it, no need to construct a string wrapper for an empty string just to assign it into another string. _retval.Truncate(0)! sr=jst with that change.
Attachment #85788 -
Flags: superreview+
Assignee | ||
Comment 10•22 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 11•22 years ago
|
||
-- Hi aaron, did you check in the fix.
Assignee | ||
Comment 12•22 years ago
|
||
Yep, that's why I marked it "fixed". Is that crazy or what? :)
Reporter | ||
Comment 13•22 years ago
|
||
-- no, you usually mention "checked in" after "fixed". I see that for almost all the bugs you fixed.
Reporter | ||
Comment 14•22 years ago
|
||
-- I still get NS_ERROR_FAILURE when i run the attached test case. I verified it on todays trunk build.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 15•22 years ago
|
||
-- hi aaron, it works fine. In Inspect tool it shows right value. Works as described. Returns a value if something in the listbox is selected. It still returns an error if nothing is selected. Marking the bug back as Fixed.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 16•22 years ago
|
||
-- Verified in todays trunk build. works fine. marking bug as verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•