mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove unused ShadowRoot constructor argument
This commit is contained in:
parent
1621076af7
commit
5c39097edd
2 changed files with 4 additions and 12 deletions
|
@ -487,7 +487,7 @@ impl Element {
|
|||
}
|
||||
|
||||
// Steps 4, 5 and 6.
|
||||
let shadow_root = ShadowRoot::new(self, &*self.node.owner_doc(), is_ua_widget);
|
||||
let shadow_root = ShadowRoot::new(self, &*self.node.owner_doc());
|
||||
self.ensure_rare_data().shadow_root = Some(Dom::from_ref(&*shadow_root));
|
||||
shadow_root
|
||||
.upcast::<Node>()
|
||||
|
|
|
@ -50,11 +50,7 @@ pub struct ShadowRoot {
|
|||
|
||||
impl ShadowRoot {
|
||||
#[allow(unrooted_must_root)]
|
||||
fn new_inherited(
|
||||
host: &Element,
|
||||
document: &Document,
|
||||
is_widget: IsUserAgentWidget,
|
||||
) -> ShadowRoot {
|
||||
fn new_inherited(host: &Element, document: &Document) -> ShadowRoot {
|
||||
let document_fragment = DocumentFragment::new_inherited(document);
|
||||
let node = document_fragment.upcast::<Node>();
|
||||
node.set_flag(NodeFlags::IS_IN_SHADOW_TREE, true);
|
||||
|
@ -73,13 +69,9 @@ impl ShadowRoot {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
host: &Element,
|
||||
document: &Document,
|
||||
is_widget: IsUserAgentWidget,
|
||||
) -> DomRoot<ShadowRoot> {
|
||||
pub fn new(host: &Element, document: &Document) -> DomRoot<ShadowRoot> {
|
||||
reflect_dom_object(
|
||||
Box::new(ShadowRoot::new_inherited(host, document, is_widget)),
|
||||
Box::new(ShadowRoot::new_inherited(host, document)),
|
||||
document.window(),
|
||||
ShadowRootBinding::Wrap,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue