mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 23:12:21 +00:00
Bug 1425440 - Get rid of GetChildAt_Deprecated in nsXULTooltipListener, r=catalinb
This commit is contained in:
parent
6cd6b02755
commit
64f62042f8
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user