mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 173350. nsIDOMTreeWalker crashes with XUL documents -- this implements some of the unimplemented methods in nsXULDocument. r=jst, sr=bzbarsky
This commit is contained in:
parent
a452fae1d0
commit
c07ae571e9
@ -1281,22 +1281,26 @@ nsXULDocument::SetRootContent(nsIContent* aRoot)
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::ChildAt(PRInt32 aIndex, nsIContent*& aResult) const
|
||||
{
|
||||
NS_NOTREACHED("nsXULDocument::ChildAt");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (aIndex != 0 || !mRootContent) {
|
||||
aResult = nsnull;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ADDREF(aResult = mRootContent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::IndexOf(nsIContent* aPossibleChild, PRInt32& aIndex) const
|
||||
{
|
||||
NS_NOTREACHED("nsXULDocument::IndexOf");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
aIndex = (aPossibleChild == mRootContent && mRootContent)? 0 : -1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULDocument::GetChildCount(PRInt32& aCount)
|
||||
{
|
||||
NS_NOTREACHED("nsXULDocument::GetChildCount");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
aCount = (mRootContent != nsnull);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user