mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Media UI basic functionality
This commit is contained in:
parent
1c02fc94a8
commit
a664449681
10 changed files with 420 additions and 35 deletions
|
@ -52,7 +52,11 @@ 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,
|
||||
is_widget: IsUserAgentWidget,
|
||||
) -> ShadowRoot {
|
||||
let document_fragment = DocumentFragment::new_inherited(document);
|
||||
let node = document_fragment.upcast::<Node>();
|
||||
node.set_flag(NodeFlags::IS_IN_SHADOW_TREE, true);
|
||||
|
@ -72,7 +76,11 @@ impl ShadowRoot {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(host: &Element, document: &Document, is_widget: IsUserAgentWidget) -> DomRoot<ShadowRoot> {
|
||||
pub fn new(
|
||||
host: &Element,
|
||||
document: &Document,
|
||||
is_widget: IsUserAgentWidget,
|
||||
) -> DomRoot<ShadowRoot> {
|
||||
reflect_dom_object(
|
||||
Box::new(ShadowRoot::new_inherited(host, document, is_widget)),
|
||||
document.window(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue