Bug 1418456: Remove the last call to StyleNewlyBoundElement. r=heycam

If the element has no data, it's pointless to reconstruct frames on it, or post
a reconstruct. There's no need to particularly force to have data in this case.

MozReview-Commit-ID: Lo24XQfLN0j
This commit is contained in:
Emilio Cobos Álvarez 2017-11-17 21:12:49 +01:00
parent 3d003a48ea
commit eb59f99b5c

View File

@ -267,18 +267,6 @@ nsXBLResourceLoader::NotifyBoundElements()
}
if (!sc) {
if (ServoStyleSet* servoSet = shell->StyleSet()->GetAsServo()) {
// Ensure the element has servo data so that
// nsChangeHint_ReconstructFrame posted by
// PostRecreateFramesFor() is recognized.
//
// Also check MayTraverseFrom to handle programatic XBL consumers.
// See bug 1370793.
Element* element = content->AsElement();
if (servoSet->MayTraverseFrom(element)) {
servoSet->StyleNewlyBoundElement(element);
}
}
shell->PostRecreateFramesFor(content->AsElement());
}
}