Bug 1422931 - Part 2: Make webcomponents preference per-doc. r=smaug
This is to fix the case where preference is restore to false when a testcas ends, but nsDocument::DeleteShell is called afterwards. So, we make the preference per-doc and once it is enabled for a document, it stays enabled.
This commit is contained in:
@@ -16,7 +16,7 @@ NS_NewHTMLSlotElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
||||
mozilla::dom::FromParser aFromParser)
|
||||
{
|
||||
RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo);
|
||||
if (nsContentUtils::IsWebComponentsEnabled()) {
|
||||
if (nsDocument::IsWebComponentsEnabled(nodeInfo->GetDocument())) {
|
||||
already_AddRefed<mozilla::dom::NodeInfo> nodeInfoArg(nodeInfo.forget());
|
||||
return new mozilla::dom::HTMLSlotElement(nodeInfoArg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user