Bug 1425440 - Get rid of GetChildAt_Deprecated in nsXULTooltipListener, r=catalinb

This commit is contained in:
Andrea Marchesini 2018-01-03 16:29:13 +01:00
parent 6cd6b02755
commit 64f62042f8

View File

@ -555,13 +555,10 @@ static void
GetImmediateChild(nsIContent* aContent, nsAtom *aTag, nsIContent** aResult)
{
*aResult = nullptr;
uint32_t childCount = aContent->GetChildCount();
for (uint32_t i = 0; i < childCount; i++) {
nsIContent *child = aContent->GetChildAt_Deprecated(i);
if (child->IsXULElement(aTag)) {
*aResult = child;
NS_ADDREF(*aResult);
for (nsCOMPtr<nsIContent> childContent = aContent->GetFirstChild();
childContent; childContent = childContent->GetNextSibling()) {
if (childContent->IsXULElement(aTag)) {
childContent.forget(aResult);
return;
}
}