while (mState.domNode && NS_SUCCEEDED(GetNextSibling()) && mState.domNode == aChild) {
while (mState.domNode && NS_SUCCEEDED(GetNextSibling()) && mState.domNode != aChild) {
NS_IMETHODIMP nsAccessibleTreeWalker::GetChildBefore(nsIDOMNode* aParent, nsIDOMNode* aChild){  mState.domNode = aParent;  if (!mState.domNode || NS_FAILED(GetFirstChild()) || mState.domNode == aChild)     return NS_ERROR_FAILURE;   // if the first child is us, then we fail, because there is no child before the first  nsCOMPtr<nsIDOMNode> prevDOMNode(mState.domNode);  nsCOMPtr<nsIAccessible> prevAccessible(mState.accessible);  while (mState.domNode && NS_SUCCEEDED(GetNextSibling()) && mState.domNode == aChild) {    prevDOMNode = mState.domNode;    prevAccessible = mState.accessible;  }  mState.accessible = prevAccessible;  mState.domNode = prevDOMNode;  return NS_OK;}