aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorGecko Backout <gecko-backout@mozilla.org>2017-10-19 21:26:51 +0000
committermoz-servo-sync <developer-services+moz-servo-sync@mozilla.org>2017-10-19 21:26:51 +0000
commit11c64178d86979e8d50f11cff66c2b0e8fe666c1 (patch)
tree083c71bdf8216ca56d38d509e5b2988eb18da5ca /components/script/dom/htmliframeelement.rs
parentfe16c1d5c3c9084da0ccb85af599d6ec0f8ab20b (diff)
downloadservo-11c64178d86979e8d50f11cff66c2b0e8fe666c1.tar.gz
servo-11c64178d86979e8d50f11cff66c2b0e8fe666c1.zip
Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs32
1 files changed, 16 insertions, 16 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 64bd9926ca3..697e32636b1 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)]
- 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;
+ 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
}
}
@@ -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 = SandboxAllowance::ALLOW_NOTHING;
+ let mut modes = ALLOW_NOTHING;
for token in value.as_tokens() {
modes |= match &*token.to_ascii_lowercase() {
- "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
+ "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
};
}
modes