Bug 1375513 Part 1 - Support non-chrome XBL bindings with stylesheets for stylo.
MozReview-Commit-ID: bclwwk6uzI
--- a/dom/xbl/nsXBLResourceLoader.cpp
+++ b/dom/xbl/nsXBLResourceLoader.cpp
@@ -263,16 +263,23 @@ nsXBLResourceLoader::NotifyBoundElements
nsStyleContext* sc =
shell->FrameManager()->GetUndisplayedContent(content);
if (!sc) {
sc = shell->FrameManager()->GetDisplayContentsStyleFor(content);
}
if (!sc) {
+ if (shell->StyleSet()->IsServo()) {
+ // Ensure the element has servo data so that
+ // nsChangeHint_ReconstructFrame posted by
+ // PostRecreateFramesFor() is recognized.
+ shell->StyleSet()->GetAsServo()->StyleNewlyBoundElement(
+ content->AsElement());
+ }
shell->PostRecreateFramesFor(content->AsElement());
}
}
}
// Flush again
// XXXbz why is this needed?
doc->FlushPendingNotifications(FlushType::ContentAndNotify);