diff options
author | Andreas Kling <kling@serenityos.org> | 2023-01-01 17:41:08 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-25 12:54:01 +0200 |
commit | aef36ce828ea1a1a6b12c5d93b071c38f008ec61 (patch) | |
tree | 86dd0d9902ce60e9565ce5d147cd79ec7f7c1100 /Userland/Libraries/LibWeb/ReferrerPolicy | |
parent | 4d8edf65b592a87df86e53dd8c4ed22cd9b08546 (diff) | |
download | serenity-aef36ce828ea1a1a6b12c5d93b071c38f008ec61.zip |
LibWeb: Add ReferrerPolicy::EmptyString
One of the valid enum values for "referrer policy" is the empty string.
Since we're using an enum for this, just add it as an enum value.
Diffstat (limited to 'Userland/Libraries/LibWeb/ReferrerPolicy')
-rw-r--r-- | Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.cpp b/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.cpp index 51309409c5..c87dc0b929 100644 --- a/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.cpp +++ b/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.cpp @@ -11,6 +11,8 @@ namespace Web::ReferrerPolicy { StringView to_string(ReferrerPolicy referrer_policy) { switch (referrer_policy) { + case ReferrerPolicy::EmptyString: + return ""sv; case ReferrerPolicy::NoReferrer: return "no-referrer"sv; case ReferrerPolicy::NoReferrerWhenDowngrade: diff --git a/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.h b/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.h index 6679272e3d..577463aca5 100644 --- a/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.h +++ b/Userland/Libraries/LibWeb/ReferrerPolicy/ReferrerPolicy.h @@ -13,6 +13,7 @@ namespace Web::ReferrerPolicy { // https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy enum class ReferrerPolicy { + EmptyString, NoReferrer, NoReferrerWhenDowngrade, SameOrigin, |