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
This commit is contained in:
Gecko Backout 2017-10-19 21:26:51 +00:00 committed by moz-servo-sync
parent fe16c1d5c3
commit 11c64178d8
142 changed files with 1635 additions and 1685 deletions

View file

@ -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