mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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.
|
// 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));
|
self.ensure_rare_data().shadow_root = Some(Dom::from_ref(&*shadow_root));
|
||||||
shadow_root
|
shadow_root
|
||||||
.upcast::<Node>()
|
.upcast::<Node>()
|
||||||
|
|
|
@ -50,11 +50,7 @@ pub struct ShadowRoot {
|
||||||
|
|
||||||
impl ShadowRoot {
|
impl ShadowRoot {
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
fn new_inherited(
|
fn new_inherited(host: &Element, document: &Document) -> ShadowRoot {
|
||||||
host: &Element,
|
|
||||||
document: &Document,
|
|
||||||
is_widget: IsUserAgentWidget,
|
|
||||||
) -> ShadowRoot {
|
|
||||||
let document_fragment = DocumentFragment::new_inherited(document);
|
let document_fragment = DocumentFragment::new_inherited(document);
|
||||||
let node = document_fragment.upcast::<Node>();
|
let node = document_fragment.upcast::<Node>();
|
||||||
node.set_flag(NodeFlags::IS_IN_SHADOW_TREE, true);
|
node.set_flag(NodeFlags::IS_IN_SHADOW_TREE, true);
|
||||||
|
@ -73,13 +69,9 @@ impl ShadowRoot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(
|
pub fn new(host: &Element, document: &Document) -> DomRoot<ShadowRoot> {
|
||||||
host: &Element,
|
|
||||||
document: &Document,
|
|
||||||
is_widget: IsUserAgentWidget,
|
|
||||||
) -> DomRoot<ShadowRoot> {
|
|
||||||
reflect_dom_object(
|
reflect_dom_object(
|
||||||
Box::new(ShadowRoot::new_inherited(host, document, is_widget)),
|
Box::new(ShadowRoot::new_inherited(host, document)),
|
||||||
document.window(),
|
document.window(),
|
||||||
ShadowRootBinding::Wrap,
|
ShadowRootBinding::Wrap,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue