mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 18:07:35 +00:00
LibWeb: Add navigable property in NavigationParams
This commit is contained in:
parent
0c919718ae
commit
38a2d5ead3
2 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
|
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
|
||||||
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h>
|
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h>
|
||||||
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
|
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
|
||||||
|
#include <LibWeb/HTML/Navigable.h>
|
||||||
#include <LibWeb/HTML/Origin.h>
|
#include <LibWeb/HTML/Origin.h>
|
||||||
#include <LibWeb/HTML/PolicyContainers.h>
|
#include <LibWeb/HTML/PolicyContainers.h>
|
||||||
#include <LibWeb/HTML/SandboxingFlagSet.h>
|
#include <LibWeb/HTML/SandboxingFlagSet.h>
|
||||||
|
@ -49,6 +50,9 @@ struct NavigationParams {
|
||||||
// the browsing context to be navigated (or discarded, if a browsing context group switch occurs)
|
// the browsing context to be navigated (or discarded, if a browsing context group switch occurs)
|
||||||
JS::Handle<HTML::BrowsingContext> browsing_context;
|
JS::Handle<HTML::BrowsingContext> browsing_context;
|
||||||
|
|
||||||
|
// the navigable to be navigated
|
||||||
|
JS::Handle<Navigable> navigable;
|
||||||
|
|
||||||
// a history handling behavior
|
// a history handling behavior
|
||||||
HistoryHandlingBehavior history_handling { HistoryHandlingBehavior::Default };
|
HistoryHandlingBehavior history_handling { HistoryHandlingBehavior::Default };
|
||||||
|
|
||||||
|
|
|
@ -338,6 +338,7 @@ void FrameLoader::load_html(StringView html, const AK::URL& url)
|
||||||
.coop_enforcement_result = HTML::CrossOriginOpenerPolicyEnforcementResult {},
|
.coop_enforcement_result = HTML::CrossOriginOpenerPolicyEnforcementResult {},
|
||||||
.reserved_environment = {},
|
.reserved_environment = {},
|
||||||
.browsing_context = browsing_context(),
|
.browsing_context = browsing_context(),
|
||||||
|
.navigable = nullptr,
|
||||||
};
|
};
|
||||||
auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
|
auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
|
||||||
browsing_context().set_active_document(document);
|
browsing_context().set_active_document(document);
|
||||||
|
@ -463,6 +464,7 @@ void FrameLoader::resource_did_load()
|
||||||
.coop_enforcement_result = HTML::CrossOriginOpenerPolicyEnforcementResult {},
|
.coop_enforcement_result = HTML::CrossOriginOpenerPolicyEnforcementResult {},
|
||||||
.reserved_environment = {},
|
.reserved_environment = {},
|
||||||
.browsing_context = browsing_context(),
|
.browsing_context = browsing_context(),
|
||||||
|
.navigable = nullptr,
|
||||||
};
|
};
|
||||||
auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
|
auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
|
||||||
document->set_url(url);
|
document->set_url(url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue