Closed Bug 443764 Opened 15 years ago Closed 15 years ago

nsHTMLSelectListAccessible::GetState -- |if| condition is always true

Categories

(Core :: Disability Access APIs, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: jruderman, Assigned: surkov)

References

()

Details

Attachments

(1 file)

The reporter of bug 440771 points out that this condition is always true:

accessible/src/html/nsHTMLSelectAccessible.cpp:338
if (*aState | nsIAccessibleStates::STATE_FOCUSED) {

I'm guessing it was intended to be "&" or "!(...&...)", but I don't know which, so I'm not attaching a patch.

This |if| statement was added in bug 391490.
Bug 391490 was about JAWS reading *all* options within a combobox or listbox, and this bug was meant to fix that. So this may just be a quirk to work around a special case for JAWS. But I'll have to defer to devs here for final clarification.
Attached patch patchSplinter Review
actually | and & give the same result, but & should give some performance win, I think Aaron had in view that.
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #328290 - Flags: review?(aaronleventhal)
Am running with this patch now and don't see any regressions.
Attachment #328290 - Flags: review?(aaronleventhal) → review+
checked in
http://hg.mozilla.org/mozilla-central/index.cgi/rev/b0476bcee6e9
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
You need to log in before you can comment on or make changes to this bug.