blob: c239aeb16eeb1b49edec33f5b26e81e16c53db98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h>
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
#include <LibWeb/HTML/Navigable.h>
#include <LibWeb/HTML/Origin.h>
#include <LibWeb/HTML/PolicyContainers.h>
#include <LibWeb/HTML/SandboxingFlagSet.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigation-params
struct NavigationParams {
// null or a navigation ID
Optional<String> id;
// null or a request that started the navigation
JS::GCPtr<Fetch::Infrastructure::Request> request;
// a response that ultimately was navigated to (potentially a network error)
JS::NonnullGCPtr<Fetch::Infrastructure::Response> response;
// an origin to use for the new Document
Origin origin;
// a policy container to use for the new Document
PolicyContainer policy_container;
// a sandboxing flag set to impose on the new Document
SandboxingFlagSet final_sandboxing_flag_set;
// a cross-origin opener policy to use for the new Document
CrossOriginOpenerPolicy cross_origin_opener_policy;
// a cross-origin opener policy enforcement result, used for reporting and potentially for causing a browsing context group switch
CrossOriginOpenerPolicyEnforcementResult coop_enforcement_result;
// null or an environment reserved for the new Document
Optional<Environment> reserved_environment;
// the browsing context to be navigated (or discarded, if a browsing context group switch occurs)
JS::Handle<HTML::BrowsingContext> browsing_context;
// the navigable to be navigated
JS::Handle<Navigable> navigable;
// a history handling behavior
HistoryHandlingBehavior history_handling { HistoryHandlingBehavior::Default };
// a boolean
bool has_cross_origin_redirects { false };
// FIXME: an algorithm expecting a response
void* process_response_end_of_body { nullptr };
// null or a fetch controller
JS::GCPtr<Fetch::Infrastructure::FetchController> fetch_controller { nullptr };
// FIXME: null or an algorithm accepting a Document, once it has been created
void* commit_early_hints { nullptr };
};
}
|