XP part of accessibility landing

-r vidur, rods -sr hyatt


git-svn-id: svn://10.0.0.236/trunk@90971 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
evaughan%netscape.com
2001-04-01 01:01:33 +00:00
parent 4323130426
commit 94e72ae454
26 changed files with 598 additions and 55 deletions

View File

@@ -46,6 +46,11 @@
#include "nsCOMPtr.h"
#include "nsIHTMLTableCellElement.h"
#include "nsIDOMHTMLTableCellElement.h"
#include "nsIMutableAccessible.h"
#include "nsIAccessibilityService.h"
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
//TABLECELL SELECTION
#include "nsIFrameSelection.h"
@@ -417,6 +422,7 @@ PRBool nsTableCellFrame::ParentDisablesSelection() const //override default beha
// Align the cell's child frame within the cell
void nsTableCellFrame::VerticallyAlignChild(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nscoord aMaxAscent)
@@ -1038,9 +1044,24 @@ nsresult nsTableCellFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(NS_GET_IID(nsITableCellLayout))) {
*aInstancePtr = (void*) (nsITableCellLayout *)this;
return NS_OK;
} else if (aIID.Equals(NS_GET_IID(nsIAccessible))) {
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv);
if (accService) {
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(mContent);
nsIMutableAccessible* acc = nsnull;
accService->CreateMutableAccessible(node,&acc);
nsAutoString name;
acc->SetName(NS_LITERAL_STRING("Cell").get());
acc->SetRole(NS_LITERAL_STRING("cell").get());
*aInstancePtr = acc;
return NS_OK;
}
return NS_ERROR_FAILURE;
} else {
return nsHTMLContainerFrame::QueryInterface(aIID, aInstancePtr);
}
@@ -1127,7 +1148,6 @@ NS_NewTableCellFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
/* ----- methods from CellLayoutData ----- */
void
nsTableCellFrame::GetCellBorder(nsMargin& aBorder,
nsTableFrame* aTableFrame)