Backed out changeset cffde1d0ebb4 (bug 1364361)

This commit is contained in:
Sebastian Hengst
2017-06-16 09:27:14 +02:00
parent 7e38af1b57
commit 2e914658c8

View File

@@ -370,18 +370,7 @@ AllChildrenIterator::Seek(nsIContent* aChildToFind)
void
AllChildrenIterator::AppendNativeAnonymousChildren()
{
if (nsIFrame* primaryFrame = mOriginalContent->GetPrimaryFrame()) {
// NAC created by the element's primary frame.
AppendNativeAnonymousChildrenFromFrame(primaryFrame);
// NAC created by any other non-primary frames for the element.
AutoTArray<nsIFrame::OwnedAnonBox,8> ownedAnonBoxes;
primaryFrame->AppendOwnedAnonBoxes(ownedAnonBoxes);
for (nsIFrame::OwnedAnonBox& box : ownedAnonBoxes) {
MOZ_ASSERT(box.mAnonBoxFrame->GetContent() == mOriginalContent);
AppendNativeAnonymousChildrenFromFrame(box.mAnonBoxFrame);
}
}
AppendNativeAnonymousChildrenFromFrame(mOriginalContent->GetPrimaryFrame());
// The root scroll frame is not the primary frame of the root element.
// Detect and handle this case.