Minor cleanup including followup to b=577727. r=tbsaunde
authorDavid Bolter <dbolter@mozilla.com>
Mon, 10 Jun 2013 10:43:18 -0400
changeset 146012 2ece779610559fb425fe221e3efbc1cf6ffdb79c
parent 146011 1c4403cbda5732fb4f18be1ea28059ea23e5617c
child 146013 a4ce5dd1db0b02bd27b753d7c397f303050fac55
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs577727
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Minor cleanup including followup to b=577727. r=tbsaunde
accessible/src/atk/nsStateMap.h
accessible/src/xul/XULTabAccessible.cpp
--- a/accessible/src/atk/nsStateMap.h
+++ b/accessible/src/atk/nsStateMap.h
@@ -56,17 +56,17 @@ struct AtkStateMap {
       ++ stateIndex;
       aState >>= 1;
     }
     return stateIndex;  // Returns -1 if not mapped
   }
 };
 
 
-// Map array from cross platform roles to  ATK roles
+// Map array from cross platform states to ATK states
 static const AtkStateMap gAtkStateMap[] = {                     // Cross Platform States
   { kNone,                                    kMapOpposite },   // states::UNAVAILABLE             = 1 << 0
   { ATK_STATE_SELECTED,                       kMapDirectly },   // states::SELECTED                = 1 << 1
   { ATK_STATE_FOCUSED,                        kMapDirectly },   // states::FOCUSED                 = 1 << 2
   { ATK_STATE_PRESSED,                        kMapDirectly },   // states::PRESSED                 = 1 << 3
   { ATK_STATE_CHECKED,                        kMapDirectly },   // states::CHECKED                 = 1 << 4
   { ATK_STATE_INDETERMINATE,                  kMapDirectly },   // states::MIXED                   = 1 << 5
   { kNone,                                    kMapDirectly },   // states::READONLY                = 1 << 6
--- a/accessible/src/xul/XULTabAccessible.cpp
+++ b/accessible/src/xul/XULTabAccessible.cpp
@@ -85,20 +85,20 @@ XULTabAccessible::NativeState()
 
   // Check whether the tab is selected and/or pinned
   nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mContent));
   if (tab) {
     bool selected = false;
     if (NS_SUCCEEDED(tab->GetSelected(&selected)) && selected)
       state |= states::SELECTED;
 
-    if (mContent && mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::pinned) &&
-        mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::pinned,
+    if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::pinned,
                               nsGkAtoms::_true, eCaseMatters))
       state |= states::PINNED;
+
   }
 
   return state;
 }
 
 uint64_t
 XULTabAccessible::NativeInteractiveState() const
 {