Bug 1178817 - Fix segfault in mozilla::a11y::HTMLTableRowAccessible::GroupPosition(). r=MarcoZ, a=ritu
authorFrédéric Wang <fred.wang@free.fr>
Wed, 01 Jul 2015 05:02:00 -0400
changeset 281397 e796c66eb475951c6235d0cbd055ea0a94d301f5
parent 281396 1d71a95a50bbe1fccb5ba7b0349544085657e005
child 281398 e1952e51b9c70dc74839650bf687650b9d6a291c
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMarcoZ, ritu
bugs1178817
milestone41.0a2
Bug 1178817 - Fix segfault in mozilla::a11y::HTMLTableRowAccessible::GroupPosition(). r=MarcoZ, a=ritu CLOSED TREE
accessible/base/nsAccUtils.cpp
--- a/accessible/base/nsAccUtils.cpp
+++ b/accessible/base/nsAccUtils.cpp
@@ -250,18 +250,18 @@ nsAccUtils::TableFor(Accessible* aRow)
     if (table) {
       roles::Role tableRole = table->Role();
       if (tableRole == roles::GROUPING) { // if there's a rowgroup.
         table = table->Parent();
         if (table)
           tableRole = table->Role();
       }
 
-      return tableRole == roles::TABLE || tableRole == roles::TREE_TABLE ?
-        table : nullptr;
+      return (tableRole == roles::TABLE || tableRole == roles::TREE_TABLE ||
+              tableRole == roles::MATHML_TABLE) ? table : nullptr;
     }
   }
 
   return nullptr;
 }
 
 HyperTextAccessible*
 nsAccUtils::GetTextContainer(nsINode* aNode)