Bug 1529900 - Columnpicker restore column order doesn't work anymore, r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D22094

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Victor Porof 2019-03-05 16:35:01 +00:00
parent d9bacb3214
commit 9783bee1be

View File

@ -55,6 +55,13 @@ nsIContent* nsTreeUtils::GetImmediateChild(nsIContent* aContainer,
if (child->IsXULElement(aTag)) {
return child;
}
// <slot> is in the flattened tree, but <tree> code is used to work with
// <xbl:children> which is not, so recurse in <slot> here.
if (child->IsHTMLElement(nsGkAtoms::slot)) {
if (nsIContent* c = GetImmediateChild(child, aTag)) {
return c;
}
}
}
return nullptr;