1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

LibWeb: Convert Navigable::navigate's csp_navigation_type to an enum

Some versions of clang will have an issue using a consteval function to
set the optional parameter's default value. For example, see:
https://stackoverflow.com/questions/68789984/immediate-function-as-default-function-argument-initializer-in-clang

This doesn't need to be a String anyways, so let's make it an enum.
This commit is contained in:
Timothy Flynn 2023-05-07 12:47:38 -04:00 committed by Andrew Kaster
parent f7c27556fa
commit 872e18f660
2 changed files with 9 additions and 4 deletions

View file

@ -692,7 +692,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate(
JS::GCPtr<Fetch::Infrastructure::Response> response,
bool exceptions_enabled,
HistoryHandlingBehavior history_handling,
String csp_navigation_type,
CSPNavigationType csp_navigation_type,
ReferrerPolicy::ReferrerPolicy referrer_policy)
{
// 1. Let sourceSnapshotParams be the result of snapshotting source snapshot params given sourceDocument.
@ -904,7 +904,7 @@ WebIDL::ExceptionOr<void> Navigable::navigate_to_a_fragment(AK::URL const&, Hist
TODO();
}
WebIDL::ExceptionOr<void> Navigable::navigate_to_a_javascript_url(AK::URL const&, HistoryHandlingBehavior, Origin const& initiator_origin, String csp_navigation_type)
WebIDL::ExceptionOr<void> Navigable::navigate_to_a_javascript_url(AK::URL const&, HistoryHandlingBehavior, Origin const& initiator_origin, CSPNavigationType csp_navigation_type)
{
(void)initiator_origin;
(void)csp_navigation_type;