Issue #2135 - Bug 1066965: Make contentEditable and spellchecking to work in Shadow DOM

This commit is contained in:
FranklinDM 2023-03-03 23:42:46 +08:00 committed by roytam1
commit 010db07bf3
10 changed files with 60 additions and 30 deletions

View file

@ -273,6 +273,18 @@ nsINode* nsINode::GetRootNode(const GetRootNodeOptions& aOptions)
return SubtreeRoot();
}
// TODO: was marked as constant.
nsINode*
nsINode::GetParentOrHostNode()
{
if (mParent) {
return mParent;
}
ShadowRoot* shadowRoot = ShadowRoot::FromNode(this);
return shadowRoot ? shadowRoot->GetHost() : nullptr;
}
nsINode*
nsINode::SubtreeRoot() const
{