diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-05-24 00:56:48 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-05-27 00:55:05 +0200 |
commit | 694deabcd56120ea81b4c88e3b806c3c230b83f9 (patch) | |
tree | f94d77296bae378bae5c475615b25e24f6b54023 /components/script/dom/htmliframeelement.rs | |
parent | 34dfc28e989a8583aa925cc252f635693bb8bfbb (diff) | |
download | servo-694deabcd56120ea81b4c88e3b806c3c230b83f9.tar.gz servo-694deabcd56120ea81b4c88e3b806c3c230b83f9.zip |
Use [Func] on HTMLIFrameElement.mozbrowser
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index a2d6d4bac5a..d9d6f624f16 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -433,29 +433,16 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement { // Experimental mozbrowser implementation is based on the webidl // present in the gecko source tree, and the documentation here: // https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API - - // TODO(gw): Use experimental codegen when it is available to avoid - // exposing these APIs. See https://github.com/servo/servo/issues/5264. - // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-mozbrowser fn Mozbrowser(&self) -> bool { - // We don't want to allow mozbrowser iframes within iframes - let is_root_pipeline = window_from_node(self).parent_info().is_none(); - if mozbrowser_enabled() && is_root_pipeline { - let element = self.upcast::<Element>(); - element.has_attribute(&atom!("mozbrowser")) - } else { - false - } + let element = self.upcast::<Element>(); + element.has_attribute(&atom!("mozbrowser")) } // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-mozbrowser - fn SetMozbrowser(&self, value: bool) -> ErrorResult { - if mozbrowser_enabled() { - let element = self.upcast::<Element>(); - element.set_bool_attribute(&atom!("mozbrowser"), value); - } - Ok(()) + fn SetMozbrowser(&self, value: bool) { + let element = self.upcast::<Element>(); + element.set_bool_attribute(&atom!("mozbrowser"), value); } // https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/goBack |