return repeat->SetIndex(&pos, PR_FALSE);
PRUint32 tmp = mContextPosition; return repeat->SetIndex(&tmp, PR_FALSE);
nsXFormsContextContainer::HandleDefault(nsIDOMEvent *aEvent,                                        PRBool      *aHandled){  if (!aEvent || !mElement)    return NS_OK;  nsAutoString type;  aEvent->GetType(type);  if (!type.EqualsLiteral("focus"))    return nsXFormsControlStub::HandleDefault(aEvent, aHandled);  if (!nsXFormsUtils::EventHandlingAllowed(aEvent, mElement))    return NS_OK;  /*   * Either we, or an element we contain, has gotten focus, so we need to set   * the repeat index. This is done through the \<repeat\> the   * nsXFormsContextContainer belongs to.   *   * Start by finding the \<repeat\> (our grandparent):   * <pre>   * <repeat> <-- gParent   *   <div>   *     <contextcontainer\> <-- this   *   </div>   * </repeat>   * </pre>   */  nsCOMPtr<nsIDOMNode> parent;  mElement->GetParentNode(getter_AddRefs(parent));  NS_ASSERTION(parent, "how can we get focus without a parent?");    nsCOMPtr<nsIDOMNode> gParent;  parent->GetParentNode(getter_AddRefs(gParent));  nsCOMPtr<nsIXFormsRepeatElement> repeat = do_QueryInterface(gParent);  if (!repeat)    // Not a child to a \<repeat\>    return NS_OK;  // Find our context position  nsAutoString posString;  mElement->GetAttribute(NS_LITERAL_STRING("contextposition"), posString);  NS_ASSERTION(!posString.IsEmpty(), "@contextposition n/a or empty on repeat child?");  PRInt32 errCode;  PRUint32 pos = posString.ToInteger(&errCode);  NS_ASSERTION(!errCode, "@contextposition != integer on repeat child?");  // Tell \<repeat\> about the new index position  return repeat->SetIndex(&pos, PR_FALSE);}