1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibWeb: Implement snapshotting source snapshot params per the spec

This commit is contained in:
Andrew Kaster 2023-08-25 20:34:50 -06:00 committed by Andreas Kling
parent 798a1b2751
commit 03eae09619
4 changed files with 32 additions and 17 deletions

View file

@ -330,15 +330,9 @@ void TraversableNavigable::apply_the_history_step(int step, Optional<SourceSnaps
// 3. Let potentiallyTargetSpecificSourceSnapshotParams be sourceSnapshotParams.
Optional<SourceSnapshotParams> potentially_target_specific_source_snapshot_params = source_snapshot_params;
// FIXME: 4. If potentiallyTargetSpecificSourceSnapshotParams is null, then set it to the result of snapshotting source snapshot params given navigable's active document.
// 4. If potentiallyTargetSpecificSourceSnapshotParams is null, then set it to the result of snapshotting source snapshot params given navigable's active document.
if (!potentially_target_specific_source_snapshot_params.has_value()) {
potentially_target_specific_source_snapshot_params = SourceSnapshotParams {
.has_transient_activation = false,
.sandboxing_flags = navigable->active_document()->active_sandboxing_flag_set(),
.allows_downloading = true,
.fetch_client = navigable->active_document()->relevant_settings_object(),
.source_policy_container = navigable->active_document()->policy_container()
};
potentially_target_specific_source_snapshot_params = navigable->active_document()->snapshot_source_snapshot_params();
}
// 5. Set targetEntry's document state's reload pending to false.