-r jeff@tcbnetworks.com -sr waterson

Fix for bug #80505

-r aaronl, jgaunt -sr brendan


git-svn-id: svn://10.0.0.236/trunk@95337 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
evaughan%netscape.com
2001-05-17 23:52:32 +00:00
parent 45744cd59b
commit a4d0ce6ac8
65 changed files with 734 additions and 424 deletions

View File

@@ -462,6 +462,18 @@ nsGfxButtonControlFrame::CreateFrameFor(nsIPresContext* aPresContext,
return rv;
}
NS_IMETHODIMP nsGfxButtonControlFrame::GetAccessible(nsIAccessible** aAccessible)
{
nsCOMPtr<nsIAccessibilityService> accService = do_GetService("@mozilla.org/accessibilityService;1");
if (accService) {
nsIAccessible* acc = nsnull;
return accService->CreateHTMLButtonAccessible(NS_STATIC_CAST(nsIFrame*, this), aAccessible);
}
return NS_ERROR_FAILURE;
}
// Frames are not refcounted, no need to AddRef
NS_IMETHODIMP
nsGfxButtonControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
@@ -472,18 +484,7 @@ nsGfxButtonControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
*aInstancePtr = NS_STATIC_CAST(nsIAnonymousContentCreator*, this);
} else if (aIID.Equals(NS_GET_IID(nsIStatefulFrame))) {
*aInstancePtr = NS_STATIC_CAST(nsIStatefulFrame*, this);
} else if (aIID.Equals(NS_GET_IID(nsIAccessible))) {
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv);
if (accService) {
nsIAccessible* acc = nsnull;
accService->CreateHTMLButtonAccessible(NS_STATIC_CAST(nsIFrame*, this), &acc);
*aInstancePtr = acc;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
}
else {
return nsHTMLButtonControlFrame::QueryInterface(aIID, aInstancePtr);
}