Skip to content

Commit 38a2d5e

Browse files
kalenikaliaksandrawesomekling
authored andcommitted
LibWeb: Add navigable property in NavigationParams
1 parent 0c91971 commit 38a2d5e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Userland/Libraries/LibWeb/HTML/NavigationParams.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
1212
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h>
1313
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
14+
#include <LibWeb/HTML/Navigable.h>
1415
#include <LibWeb/HTML/Origin.h>
1516
#include <LibWeb/HTML/PolicyContainers.h>
1617
#include <LibWeb/HTML/SandboxingFlagSet.h>
@@ -49,6 +50,9 @@ struct NavigationParams {
4950
// the browsing context to be navigated (or discarded, if a browsing context group switch occurs)
5051
JS::Handle<HTML::BrowsingContext> browsing_context;
5152

53+
// the navigable to be navigated
54+
JS::Handle<Navigable> navigable;
55+
5256
// a history handling behavior
5357
HistoryHandlingBehavior history_handling { HistoryHandlingBehavior::Default };
5458

Userland/Libraries/LibWeb/Loader/FrameLoader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ void FrameLoader::load_html(StringView html, const AK::URL& url)
338338
.coop_enforcement_result = HTML::CrossOriginOpenerPolicyEnforcementResult {},
339339
.reserved_environment = {},
340340
.browsing_context = browsing_context(),
341+
.navigable = nullptr,
341342
};
342343
auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
343344
browsing_context().set_active_document(document);
@@ -463,6 +464,7 @@ void FrameLoader::resource_did_load()
463464
.coop_enforcement_result = HTML::CrossOriginOpenerPolicyEnforcementResult {},
464465
.reserved_environment = {},
465466
.browsing_context = browsing_context(),
467+
.navigable = nullptr,
466468
};
467469
auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
468470
document->set_url(url);

0 commit comments

Comments
 (0)