Last Comment Bug 702528 - IAccessible::get_accName should return S_FALSE when there's no accessible name
: IAccessible::get_accName should return S_FALSE when there's no accessible name
Status: RESOLVED FIXED
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
http://msdn.microsoft.com/en-us/libra...
Depends on:
Blocks: namea11y
  Show dependency treegraph
 
Reported: 2011-11-14 23:13 PST by alexander :surkov
Modified: 2011-11-17 03:04 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.24 KB, patch)
2011-11-14 23:13 PST, alexander :surkov
dbolter: review+
Details | Diff | Splinter Review

Description alexander :surkov 2011-11-14 23:13:29 PST
Created attachment 574543 [details] [diff] [review]
patch
Comment 1 Trevor Saunders (:tbsaunde) 2011-11-15 00:09:41 PST
In general I think I prefer

// some comment
// blah blah blah
// and more comment
if (x)
  return y;

to

if (x) {
  // a comment
  / more coment
  // blah blah blah
  return x;
}
other wise this seems fine to me if its what the docs say we should do (I haven't looked)
Comment 2 alexander :surkov 2011-11-15 01:06:17 PST
Ok, done, the comment before if:

// The name was not provided, e.g. no alt attribute for an image. A screen
// reader may choose to invent its own accessible name, e.g. from an image src
// attribute. Refer to NS_OK_EMPTY_NAME return value.
Comment 3 alexander :surkov 2011-11-15 01:10:26 PST
(In reply to Trevor Saunders (:tbsaunde) from comment #1)

> other wise this seems fine to me if its what the docs say we should do (I
> haven't looked)

that's per spec, see URL: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318483%28v=VS.85%29.aspx

As Jamie noticed that was for years but we get asked about discrepancy between browser implementations. This return value shouldn't harm anybody and it appears to be correct.
Comment 4 Marco Zehe (:MarcoZ) 2011-11-15 01:46:25 PST
Comment on attachment 574543 [details] [diff] [review]
patch

Yup looks good!
Comment 5 David Bolter [:davidb] 2011-11-15 08:01:13 PST
Comment on attachment 574543 [details] [diff] [review]
patch

r=me. I'd have a preference for only changing the return value and the last line of the comment (and otherwise preserving blame) - but I wouldn't block on it.
Comment 6 alexander :surkov 2011-11-15 08:04:31 PST
(In reply to David Bolter [:davidb] from comment #5)
> Comment on attachment 574543 [details] [diff] [review] [diff] [details] [review]
> patch
> 
> r=me. I'd have a preference for only changing the return value and the last
> line of the comment (and otherwise preserving blame) - but I wouldn't block
> on it.

small clean up while I'm about this code ;)
Comment 7 alexander :surkov 2011-11-16 22:38:41 PST
inbound land https://hg.mozilla.org/integration/mozilla-inbound/rev/e7d5dd9efeca
Comment 8 Marco Bonardo [::mak] 2011-11-17 03:04:57 PST
https://hg.mozilla.org/mozilla-central/rev/e7d5dd9efeca

Note You need to log in before you can comment on or make changes to this bug.