Only allow UA widgets as children of media elements

Do not allow pseudo-elements for replaced elements
This commit is contained in:
Fernando Jiménez Moreno 2019-05-13 17:29:23 +02:00
parent 618f528344
commit e344203c11
6 changed files with 16 additions and 11 deletions

View file

@ -46,8 +46,6 @@ pub struct ShadowRoot {
author_styles: DomRefCell<AuthorStyles<StyleSheetInDocument>>,
stylesheet_list: MutNullableDom<StyleSheetList>,
window: Dom<Window>,
/// Whether this ShadowRoot hosts a User Agent widget.
is_widget: IsUserAgentWidget,
}
impl ShadowRoot {
@ -72,7 +70,6 @@ impl ShadowRoot {
author_styles: DomRefCell::new(AuthorStyles::new()),
stylesheet_list: MutNullableDom::new(None),
window: Dom::from_ref(document.window()),
is_widget,
}
}
@ -170,10 +167,6 @@ impl ShadowRoot {
root,
);
}
pub fn is_user_agent_widget(&self) -> bool {
self.is_widget == IsUserAgentWidget::Yes
}
}
impl ShadowRootMethods for ShadowRoot {