Deny unsafe blocks in script.

As a first start, this allows them indiscriminately where used.
This commit is contained in:
Ms2ger 2015-01-08 17:33:34 +01:00
parent d9751c0fbb
commit edc1d89251
14 changed files with 27 additions and 0 deletions

View file

@ -304,6 +304,7 @@ pub trait HTMLInputElementHelpers {
fn get_indeterminate_state(self) -> bool;
}
#[allow(unsafe_blocks)]
fn broadcast_radio_checked(broadcaster: JSRef<HTMLInputElement>, group: Option<&str>) {
//TODO: if not in document, use root ancestor instead of document
let owner = broadcaster.form_owner().root();
@ -606,6 +607,7 @@ impl<'a> Activatable for JSRef<'a, HTMLInputElement> {
}
// https://html.spec.whatwg.org/multipage/interaction.html#run-pre-click-activation-steps
#[allow(unsafe_blocks)]
fn pre_click_activation(&self) {
let mut cache = self.activation_state.borrow_mut();
let ty = self.input_type.get();
@ -758,6 +760,7 @@ impl<'a> Activatable for JSRef<'a, HTMLInputElement> {
}
// https://html.spec.whatwg.org/multipage/forms.html#implicit-submission
#[allow(unsafe_blocks)]
fn implicit_submission(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool) {
let doc = document_from_node(*self).root();
let node: JSRef<Node> = NodeCast::from_ref(doc.r());