diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 311205c8f5ea..46b7f395f1cc 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -1241,18 +1241,36 @@ nsContentUtils::GetParserService() return sParserService; } +static nsIAtom** sSandboxFlagAttrs[] = { + &nsGkAtoms::allowsameorigin, // SANDBOXED_ORIGIN + &nsGkAtoms::allowforms, // SANDBOXED_FORMS + &nsGkAtoms::allowscripts, // SANDBOXED_SCRIPTS | SANDBOXED_AUTOMATIC_FEATURES + &nsGkAtoms::allowtopnavigation, // SANDBOXED_TOPLEVEL_NAVIGATION + &nsGkAtoms::allowpointerlock, // SANDBOXED_POINTER_LOCK + &nsGkAtoms::allowpopups // SANDBOXED_AUXILIARY_NAVIGATION +}; + +static const uint32_t sSandboxFlagValues[] = { + SANDBOXED_ORIGIN, // allow-same-origin + SANDBOXED_FORMS, // allow-forms + SANDBOXED_SCRIPTS | SANDBOXED_AUTOMATIC_FEATURES, // allow-scripts + SANDBOXED_TOPLEVEL_NAVIGATION, // allow-top-navigation + SANDBOXED_POINTER_LOCK, // allow-pointer-lock + SANDBOXED_AUXILIARY_NAVIGATION // allow-popups +}; + /** * A helper function that parses a sandbox attribute (of an