LibWeb: Consistently use the EmptyString state of ReferrerPolicy

We previously used an empty optional to denote that a ReferrerPolicy is
in the default empty string state. However, later additions added an
explicit EmptyString state. This patch moves all users to the explicit
state, and stops using `Optional<ReferrerPolicy>` everywhere except for
when an option not being passed from JavaScript has meaning.
This commit is contained in:
Andrew Kaster 2024-03-05 09:35:25 -07:00 committed by Andreas Kling
parent 637f2f2ed6
commit c79bac70f4
Notes: sideshowbarker 2024-07-17 09:47:09 +09:00
12 changed files with 23 additions and 24 deletions

View file

@ -42,7 +42,7 @@ struct ScriptFetchOptions {
Fetch::Infrastructure::Request::CredentialsMode credentials_mode { Fetch::Infrastructure::Request::CredentialsMode::SameOrigin };
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-script-fetch-options-referrer-policy
Optional<ReferrerPolicy::ReferrerPolicy> referrer_policy;
ReferrerPolicy::ReferrerPolicy referrer_policy { ReferrerPolicy::ReferrerPolicy::EmptyString };
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-script-fetch-options-render-blocking
bool render_blocking { false };