Bug 406595. Accessible hierarchy broken. r=davidb, a=dsicore
authoraaronleventhal@moonset.net
Mon, 03 Dec 2007 14:49:42 -0800
changeset 8617 909a0ca5ba42fe677d4795253acf22a8e133276c
parent 8616 0ac795900d6743c14a3e1ca115387491aa3dd769
child 8618 5e5c191bac739457b59d38297f16cc26e4c74ff7
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherderautoland@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb, dsicore
bugs406595
milestone1.9b2pre
Bug 406595. Accessible hierarchy broken. r=davidb, a=dsicore
accessible/src/html/nsHyperTextAccessible.cpp
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -193,29 +193,29 @@ void nsHyperTextAccessible::CacheChildre
   if (!mWeakShell) {
     // This node has been shut down
     mAccChildCount = eChildCountUninitialized;
     return;
   }
 
   // Special case for text entry fields, go directly to editor's root for children
   if (mAccChildCount == eChildCountUninitialized) {
-    mAccChildCount = 0;  // Avoid reentry
     PRUint32 role;
     GetRole(&role);
     if (role != nsIAccessibleRole::ROLE_ENTRY && role != nsIAccessibleRole::ROLE_PASSWORD_TEXT) {
       nsAccessible::CacheChildren();
       return;
     }
     nsCOMPtr<nsIEditor> editor;
     GetAssociatedEditor(getter_AddRefs(editor));
     if (!editor) {
       nsAccessible::CacheChildren();
       return;
     }
+    mAccChildCount = 0;  // Avoid reentry
     nsCOMPtr<nsIDOMElement> editorRoot;
     editor->GetRootElement(getter_AddRefs(editorRoot));
     nsCOMPtr<nsIDOMNode> editorRootDOMNode = do_QueryInterface(editorRoot);
     if (!editorRootDOMNode) {
       return;
     }
     nsAccessibleTreeWalker walker(mWeakShell, editorRootDOMNode, PR_TRUE);
     nsCOMPtr<nsPIAccessible> privatePrevAccessible;