Bug 443764 – nsHTMLSelectListAccessible::GetState -- |if| condition is always true, r=aaronlev
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 08 Jul 2008 22:30:46 +0800
changeset 15721 b0476bcee6e9029c5e4dbb16d7498792d8f45da7
parent 15720 0a6633de6e31e0e8569ab3a22270f9284e955a63
child 15723 5b0941eae33c12b95f8d204fdd6cac3efe4e4db9
push id447
push usersurkov.alexander@gmail.com
push dateTue, 08 Jul 2008 13:31:51 +0000
treeherdermozilla-central@b0476bcee6e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaaronlev
bugs443764
milestone1.9.1a1pre
Bug 443764 – nsHTMLSelectListAccessible::GetState -- |if| condition is always true, r=aaronlev
accessible/src/html/nsHTMLSelectAccessible.cpp
--- a/accessible/src/html/nsHTMLSelectAccessible.cpp
+++ b/accessible/src/html/nsHTMLSelectAccessible.cpp
@@ -330,17 +330,17 @@ nsHTMLSelectListAccessible::GetState(PRU
 {
   nsresult rv = nsHTMLSelectableAccessible::GetState(aState, aExtraState);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!mDOMNode)
     return NS_OK;
 
   nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
   if (select) {
-    if (*aState | nsIAccessibleStates::STATE_FOCUSED) {
+    if (*aState & nsIAccessibleStates::STATE_FOCUSED) {
       // Treat first focusable option node as actual focus, in order
       // to avoid confusing JAWS, which needs focus on the option
       nsCOMPtr<nsIDOMNode> focusedOption;
       nsHTMLSelectOptionAccessible::GetFocusedOptionNode(mDOMNode, 
                                                          getter_AddRefs(focusedOption));
       if (focusedOption) { // Clear focused state since it is on option
         *aState &= ~nsIAccessibleStates::STATE_FOCUSED;
       }