bug 347038. Remove unused and unneeded GetSelectedLinkIndex. r=evan.yan

git-svn-id: svn://10.0.0.236/trunk@206464 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
aaronleventhal%moonset.net 2006-08-03 03:59:32 +00:00
parent 87f1f1a4c0
commit cd886a84c5
2 changed files with 1 additions and 38 deletions

View File

@ -42,7 +42,7 @@
#include "nsISupports.idl"
#include "nsIAccessibleHyperLink.idl"
[scriptable, uuid(8f18d922-1dd2-11b2-82ea-829b78a44413)]
[scriptable, uuid(dec56474-2887-4d44-9826-1594cfe4a2f4)]
interface nsIAccessibleHyperText : nsISupports
{
readonly attribute long links;
@ -54,6 +54,4 @@ interface nsIAccessibleHyperText : nsISupports
* Return value of -1 indicates no link at that index.
*/
long getLinkIndex (in long charIndex);
long getSelectedLinkIndex ();
};

View File

@ -878,41 +878,6 @@ NS_IMETHODIMP nsHyperTextAccessible::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *a
return NS_OK;
}
NS_IMETHODIMP nsHyperTextAccessible::GetSelectedLinkIndex(PRInt32 *aSelectedLinkIndex)
{
*aSelectedLinkIndex = 0;
if (!mDOMNode && !nsAccessNode::gLastFocusedNode) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIAccessible> focusedAccessible;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
if (NS_FAILED(accService->GetAccessibleInWeakShell(nsAccessNode::gLastFocusedNode, mWeakShell,
getter_AddRefs(focusedAccessible)))) {
return NS_ERROR_FAILURE;
}
// Make sure focused accessible is a child of ours before doing a lot of work
nsCOMPtr<nsIAccessible> focusedParent;
focusedAccessible->GetParent(getter_AddRefs(focusedParent));
if (focusedParent != this) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIAccessible> accessible;
while (NextChild(accessible)) {
if (accessible == focusedAccessible) {
return NS_OK;
}
if (!IsEmbeddedObject(accessible)) {
++ *aSelectedLinkIndex;
}
}
NS_NOTREACHED("Should not reach here, focus of parent was this accessible");
return NS_ERROR_FAILURE;
}
/**
* nsIAccessibleEditableText impl.
*/