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

This commit is contained in:
Andrea Marchesini 2018-01-09 11:44:54 +01:00
parent 971faebb66
commit 8879a0007d

View File

@ -222,11 +222,9 @@ void nsMenuItemX::UncheckRadioSiblings(nsIContent* inCheckedContent)
return;
// loop over siblings
uint32_t count = parent->GetChildCount();
for (uint32_t i = 0; i < count; i++) {
nsIContent *sibling = parent->GetChildAt_Deprecated(i);
if (sibling &&
sibling != inCheckedContent &&
for (nsIContent* sibling = parent->GetFirstChild();
sibling; sibling = sibling->GetNextSibling()) {
if (sibling != inCheckedContent &&
sibling->IsElement()) { // skip this node
// if the current sibling is in the same group, clear it
if (sibling->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,