mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Issue #2135 - Bug 1414692: Adopt shadow roots when adopting a shadow host across documents
This commit is contained in:
parent
7924a2f60d
commit
b72ddcf657
1 changed files with 11 additions and 0 deletions
|
|
@ -650,6 +650,17 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: update this if we choose to land bug 1393806.
|
||||||
|
if (aDeep && !aClone && aNode->IsElement()) {
|
||||||
|
if (ShadowRoot* shadowRoot = aNode->AsElement()->GetShadowRoot()) {
|
||||||
|
nsCOMPtr<nsINode> child;
|
||||||
|
rv = CloneAndAdopt(shadowRoot, aClone, aDeep, nodeInfoManager,
|
||||||
|
aReparentScope, aNodesWithProperties, clone,
|
||||||
|
getter_AddRefs(child));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Cloning template element.
|
// Cloning template element.
|
||||||
if (aDeep && aClone && IsTemplateElement(aNode)) {
|
if (aDeep && aClone && IsTemplateElement(aNode)) {
|
||||||
DocumentFragment* origContent =
|
DocumentFragment* origContent =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue