mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibWeb: Give NonFetchSchemeNavigationParams a constructor
This commit is contained in:
parent
0d905b1846
commit
de79eb4410
Notes:
github-actions[bot]
2025-06-17 18:55:34 +00:00
Author: https://github.com/shannonbooth
Commit: de79eb4410
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5094
Reviewed-by: https://github.com/gmta ✅
2 changed files with 35 additions and 18 deletions
|
@ -1111,15 +1111,14 @@ static WebIDL::ExceptionOr<Navigable::NavigationParamsVariant> create_navigation
|
||||||
// - initiator origin: responseOrigin
|
// - initiator origin: responseOrigin
|
||||||
// FIXME: - navigation timing type: navTimingType
|
// FIXME: - navigation timing type: navTimingType
|
||||||
// - user involvement: userInvolvement
|
// - user involvement: userInvolvement
|
||||||
auto navigation_params = vm.heap().allocate<NonFetchSchemeNavigationParams>();
|
return vm.heap().allocate<NonFetchSchemeNavigationParams>(
|
||||||
navigation_params->id = navigation_id;
|
navigation_id,
|
||||||
navigation_params->navigable = navigable;
|
navigable,
|
||||||
navigation_params->url = location_url.release_value().value();
|
location_url.release_value().value(),
|
||||||
navigation_params->target_snapshot_sandboxing_flags = target_snapshot_params.sandboxing_flags;
|
target_snapshot_params.sandboxing_flags,
|
||||||
navigation_params->source_snapshot_has_transient_activation = source_snapshot_params.has_transient_activation;
|
source_snapshot_params.has_transient_activation,
|
||||||
navigation_params->initiator_origin = move(*response_origin);
|
move(*response_origin),
|
||||||
navigation_params->user_involvement = user_involvement;
|
user_involvement);
|
||||||
return navigation_params;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 21. If any of the following are true:
|
// 21. If any of the following are true:
|
||||||
|
@ -1234,15 +1233,14 @@ WebIDL::ExceptionOr<void> Navigable::populate_session_history_entry_document(
|
||||||
// - initiator origin: entry's document state's initiator origin
|
// - initiator origin: entry's document state's initiator origin
|
||||||
// FIXME: - navigation timing type: navTimingType
|
// FIXME: - navigation timing type: navTimingType
|
||||||
// - user involvement: userInvolvement
|
// - user involvement: userInvolvement
|
||||||
auto non_fetching_scheme_navigation_params = vm().heap().allocate<NonFetchSchemeNavigationParams>();
|
navigation_params = vm().heap().allocate<NonFetchSchemeNavigationParams>(
|
||||||
non_fetching_scheme_navigation_params->id = navigation_id;
|
navigation_id,
|
||||||
non_fetching_scheme_navigation_params->navigable = this;
|
this,
|
||||||
non_fetching_scheme_navigation_params->url = entry->url();
|
entry->url(),
|
||||||
non_fetching_scheme_navigation_params->target_snapshot_sandboxing_flags = target_snapshot_params.sandboxing_flags;
|
target_snapshot_params.sandboxing_flags,
|
||||||
non_fetching_scheme_navigation_params->source_snapshot_has_transient_activation = source_snapshot_params.has_transient_activation;
|
source_snapshot_params.has_transient_activation,
|
||||||
non_fetching_scheme_navigation_params->initiator_origin = *entry->document_state()->initiator_origin();
|
*entry->document_state()->initiator_origin(),
|
||||||
non_fetching_scheme_navigation_params->user_involvement = user_involvement;
|
user_involvement);
|
||||||
navigation_params = non_fetching_scheme_navigation_params;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,25 @@ struct NonFetchSchemeNavigationParams : JS::Cell {
|
||||||
// a user navigation involvement used when obtaining a browsing context for the new Document (if one is created)
|
// a user navigation involvement used when obtaining a browsing context for the new Document (if one is created)
|
||||||
UserNavigationInvolvement user_involvement;
|
UserNavigationInvolvement user_involvement;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
NonFetchSchemeNavigationParams(
|
||||||
|
Optional<String> id,
|
||||||
|
GC::Ptr<Navigable> navigable,
|
||||||
|
URL::URL url,
|
||||||
|
SandboxingFlagSet target_snapshot_sandboxing_flags,
|
||||||
|
bool source_snapshot_has_transient_activation,
|
||||||
|
URL::Origin initiator_origin,
|
||||||
|
UserNavigationInvolvement user_involvement)
|
||||||
|
: id(move(id))
|
||||||
|
, navigable(navigable)
|
||||||
|
, url(move(url))
|
||||||
|
, target_snapshot_sandboxing_flags(target_snapshot_sandboxing_flags)
|
||||||
|
, source_snapshot_has_transient_activation(source_snapshot_has_transient_activation)
|
||||||
|
, initiator_origin(move(initiator_origin))
|
||||||
|
, user_involvement(user_involvement)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void visit_edges(Visitor& visitor) override;
|
void visit_edges(Visitor& visitor) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue