mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Backed out changeset 822a570ebc0a (bug 1892882) for causing wpt failures in idlharness.window.html?exclude=Node CLOSED TREE
This commit is contained in:
parent
ed693381d7
commit
fb2ccec709
@ -418,8 +418,6 @@ nsresult nsHtml5Parser::Parse(const nsAString& aSourceBuffer, void* aKey,
|
||||
executor->GetStage(), true);
|
||||
mDocWriteSpeculativeTreeBuilder->setScriptingEnabled(
|
||||
mTreeBuilder->isScriptingEnabled());
|
||||
mDocWriteSpeculativeTreeBuilder->setAllowDeclarativeShadowRoots(
|
||||
mTreeBuilder->isAllowDeclarativeShadowRoots());
|
||||
mDocWriteSpeculativeTokenizer = mozilla::MakeUnique<nsHtml5Tokenizer>(
|
||||
mDocWriteSpeculativeTreeBuilder.get(), false);
|
||||
mDocWriteSpeculativeTokenizer->setInterner(&mAtomTable);
|
||||
@ -650,8 +648,6 @@ nsresult nsHtml5Parser::StartExecutor() {
|
||||
RefPtr<nsHtml5TreeOpExecutor> executor(mExecutor);
|
||||
executor->SetParser(this);
|
||||
mTreeBuilder->setScriptingEnabled(executor->IsScriptEnabled());
|
||||
mTreeBuilder->setAllowDeclarativeShadowRoots(
|
||||
executor->GetDocument()->AllowsDeclarativeShadowRoots());
|
||||
|
||||
mTreeBuilder->setIsSrcdocDocument(false);
|
||||
|
||||
@ -668,8 +664,6 @@ nsresult nsHtml5Parser::StartExecutor() {
|
||||
nsresult nsHtml5Parser::Initialize(mozilla::dom::Document* aDoc, nsIURI* aURI,
|
||||
nsISupports* aContainer,
|
||||
nsIChannel* aChannel) {
|
||||
mTreeBuilder->setAllowDeclarativeShadowRoots(
|
||||
aDoc->AllowsDeclarativeShadowRoots());
|
||||
return mExecutor->Init(aDoc, aURI, aContainer, aChannel);
|
||||
}
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>`document.write` on inner iframe handles declarative shadow DOM</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
promise_test(async () => {
|
||||
await new Promise(res => window.addEventListener("load", res));
|
||||
let elem = document.querySelector("iframe");
|
||||
elem.contentDocument.write(`
|
||||
<div>
|
||||
<template shadowrootmode="open"><slot></slot></template>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
`);
|
||||
let container = elem.contentDocument.querySelector("div");
|
||||
assert_true(!!container, "write should occur");
|
||||
assert_true(!!container.shadowRoot, "write should create shadowroot");
|
||||
assert_equals(container.innerText, "Test", "div should still contain text");
|
||||
}, "`document.write` on inner iframe handles declarative shadow DOM");
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user