mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Issue #2135 - Bug 1453789: Remove Element.createShadowRoot
This commit is contained in:
parent
010db07bf3
commit
45c179d01b
19 changed files with 25 additions and 521 deletions
|
|
@ -1126,18 +1126,6 @@ Element::AttachShadow(const ShadowRootInit& aInit, ErrorResult& aError)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return AttachShadowInternal(aInit.mMode == ShadowRootMode::Closed, aError);
|
||||
}
|
||||
|
||||
already_AddRefed<ShadowRoot>
|
||||
Element::CreateShadowRoot(ErrorResult& aError)
|
||||
{
|
||||
return AttachShadowInternal(false, aError);
|
||||
}
|
||||
|
||||
already_AddRefed<ShadowRoot>
|
||||
Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
|
||||
{
|
||||
/**
|
||||
* 3. If context object is a shadow host, then throw
|
||||
* an "InvalidStateError" DOMException.
|
||||
|
|
@ -1183,8 +1171,9 @@ Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
|
|||
* context object???s node document, host is context object,
|
||||
* and mode is init???s mode.
|
||||
*/
|
||||
bool isClosed = (aInit.mMode == ShadowRootMode::Closed);
|
||||
RefPtr<ShadowRoot> shadowRoot =
|
||||
new ShadowRoot(this, aClosed, nodeInfo.forget(), protoBinding);
|
||||
new ShadowRoot(this, isClosed, nodeInfo.forget(), protoBinding);
|
||||
|
||||
shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue