Bug 282777 - Implement index() xpath function. Patch by aaronr@us.ibm.com, r=sicking, beaufour
git-svn-id: svn://10.0.0.236/trunk@169651 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "nsIXFormsModelElement.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIInstanceElementPrivate.h"
|
||||
#include "nsIXFormsRepeatElement.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsXFormsUtilityService, nsIXFormsUtilityService)
|
||||
|
||||
@@ -223,3 +224,15 @@ nsXFormsUtilityService::ValidateString(const nsAString & aValue,
|
||||
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsUtilityService::GetRepeatIndex(nsIDOMNode *aRepeat, PRUint32 *aIndex)
|
||||
{
|
||||
NS_ASSERTION(aIndex, "no return buffer for index, we'll crash soon");
|
||||
*aIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIXFormsRepeatElement> repeatEle = do_QueryInterface(aRepeat);
|
||||
NS_ENSURE_TRUE(repeatEle, NS_ERROR_NULL_POINTER);
|
||||
|
||||
return repeatEle->GetIndex(aIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user