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.
This commit is contained in:
Andreas Kling 2023-01-01 17:41:08 +01:00
parent 4d8edf65b5
commit aef36ce828
Notes: sideshowbarker 2024-07-16 21:01:20 +09:00
2 changed files with 3 additions and 0 deletions

View File

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

View File

@ -13,6 +13,7 @@ namespace Web::ReferrerPolicy {
// https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy
enum class ReferrerPolicy {
EmptyString,
NoReferrer,
NoReferrerWhenDowngrade,
SameOrigin,