diff options
author | Bastien Orivel <eijebong@bananium.fr> | 2017-10-09 17:03:40 +0200 |
---|---|---|
committer | Bastien Orivel <eijebong@bananium.fr> | 2017-10-19 15:01:17 +0200 |
commit | e8e2d0a4b24475b018dbc7e59ea46fdceaf20815 (patch) | |
tree | bd56b4a2fc203150ee5c3b5e163937fb3b4e1989 /components/script/dom/htmliframeelement.rs | |
parent | 4cf2ce66fc4f970a47ab1fb4b9aa1a55282640f7 (diff) | |
download | servo-e8e2d0a4b24475b018dbc7e59ea46fdceaf20815.tar.gz servo-e8e2d0a4b24475b018dbc7e59ea46fdceaf20815.zip |
Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags
versions.
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 697e32636b1..64bd9926ca3 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -57,14 +57,14 @@ use task_source::TaskSource; bitflags! { #[derive(JSTraceable, MallocSizeOf)] - flags SandboxAllowance: u8 { - const ALLOW_NOTHING = 0x00, - const ALLOW_SAME_ORIGIN = 0x01, - const ALLOW_TOP_NAVIGATION = 0x02, - const ALLOW_FORMS = 0x04, - const ALLOW_SCRIPTS = 0x08, - const ALLOW_POINTER_LOCK = 0x10, - const ALLOW_POPUPS = 0x20 + struct SandboxAllowance: u8 { + const ALLOW_NOTHING = 0x00; + const ALLOW_SAME_ORIGIN = 0x01; + const ALLOW_TOP_NAVIGATION = 0x02; + const ALLOW_FORMS = 0x04; + const ALLOW_SCRIPTS = 0x08; + const ALLOW_POINTER_LOCK = 0x10; + const ALLOW_POPUPS = 0x20; } } @@ -726,16 +726,16 @@ impl VirtualMethods for HTMLIFrameElement { match attr.local_name() { &local_name!("sandbox") => { self.sandbox_allowance.set(mutation.new_value(attr).map(|value| { - let mut modes = ALLOW_NOTHING; + let mut modes = SandboxAllowance::ALLOW_NOTHING; for token in value.as_tokens() { modes |= match &*token.to_ascii_lowercase() { - "allow-same-origin" => ALLOW_SAME_ORIGIN, - "allow-forms" => ALLOW_FORMS, - "allow-pointer-lock" => ALLOW_POINTER_LOCK, - "allow-popups" => ALLOW_POPUPS, - "allow-scripts" => ALLOW_SCRIPTS, - "allow-top-navigation" => ALLOW_TOP_NAVIGATION, - _ => ALLOW_NOTHING + "allow-same-origin" => SandboxAllowance::ALLOW_SAME_ORIGIN, + "allow-forms" => SandboxAllowance::ALLOW_FORMS, + "allow-pointer-lock" => SandboxAllowance::ALLOW_POINTER_LOCK, + "allow-popups" => SandboxAllowance::ALLOW_POPUPS, + "allow-scripts" => SandboxAllowance::ALLOW_SCRIPTS, + "allow-top-navigation" => SandboxAllowance::ALLOW_TOP_NAVIGATION, + _ => SandboxAllowance::ALLOW_NOTHING }; } modes |