Fix permissions of mozbrowser and BrowserElementPrivileged (fixes #11498)

This commit is contained in:
Anthony Ramine 2016-05-30 11:23:42 +02:00
parent b11648903b
commit 704646698f
3 changed files with 16 additions and 10 deletions

View file

@ -437,8 +437,12 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement {
// https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-mozbrowser
fn Mozbrowser(&self) -> bool {
let element = self.upcast::<Element>();
element.has_attribute(&atom!("mozbrowser"))
if window_from_node(self).is_mozbrowser() {
let element = self.upcast::<Element>();
element.has_attribute(&atom!("mozbrowser"))
} else {
false
}
}
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-mozbrowser