Bug 226155 DRefTool analysis for accessible files

r=roc sr=roc
This commit is contained in:
timeless%mozdev.org 2003-12-21 04:04:41 +00:00
Родитель b5e84198f7
Коммит d54323b0bb
3 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -505,6 +505,9 @@ nsresult nsAccessibleHyperText::GetBounds(nsIWeakReference *aWeakShell, PRInt32
for (index = 0; index < count; index++) {
nsHTMLTextAccessible *accText = new nsHTMLTextAccessible(
(nsIDOMNode *)mTextChildren->ElementAt(index), aWeakShell);
if (!accText)
return NS_ERROR_OUT_OF_MEMORY;
nsRect frameRect;
accText->GetBounds(&frameRect.x, &frameRect.y, &frameRect.width, &frameRect.height);
unionRectTwips.UnionRect(unionRectTwips, frameRect);

Просмотреть файл

@ -314,6 +314,8 @@ nsAccessibilityService::CreateRootAccessible(nsIPresShell *aShell,
else {
*aRootAcc = new nsRootAccessibleWrap(rootNode, weakShell);
}
if (!*aRootAcc)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(*aRootAcc));
privateAccessNode->Init();

Просмотреть файл

@ -406,6 +406,9 @@ ISimpleDOMNode* nsAccessNodeWrap::MakeAccessNode(nsIDOMNode *node)
}
else {
newNode = new nsAccessNodeWrap(node, mWeakShell);
if (!newNode)
return NULL;
newNode->Init();
iNode = NS_STATIC_CAST(ISimpleDOMNode*, newNode);
iNode->AddRef();