Serenity Operating System
at master 40 lines 1.2 kB view raw
1/* 2 * Copyright (c) 2022, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#pragma once 8 9#include <AK/Types.h> 10 11namespace Web::HTML { 12 13// https://html.spec.whatwg.org/multipage/origin.html#sandboxing-flag-set 14struct SandboxingFlagSet { 15 enum Flag { 16 SandboxedNavigation = 1u << 0u, 17 SandboxedAuxiliaryNavigation = 1u << 1u, 18 SandboxedTopLevelNavigationWithoutUserActivation = 1u << 2u, 19 SandboxedTopLevelNavigationWithUserActivation = 1u << 3u, 20 SandboxedPlugins = 1u << 4u, 21 SandboxedOrigin = 1u << 5u, 22 SandboxedForms = 1u << 6u, 23 SandboxedPointerLock = 1u << 7u, 24 SandboxedScripts = 1u << 8u, 25 SandboxedAutomaticFeatures = 1u << 9u, 26 SandboxedDocumentDomain = 1u << 10u, 27 SandboxPropagatesToAuxiliaryBrowsingContexts = 1u << 11u, 28 SandboxedModals = 1u << 12u, 29 SandboxedOrientationLock = 1u << 13u, 30 SandboxedPresentation = 1u << 14u, 31 SandboxedDownloads = 1u << 15u, 32 SandboxedCustomProtocols = 1u << 16u, 33 }; 34 35 bool is_empty() const { return flags == 0; } 36 37 u32 flags { 0 }; 38}; 39 40}