Skip to content

Truly independent web browser

LibWeb+LibWebView+WebContent: Restore child history with a history job

Shannon Booth2c5c05aec981
diff --git a/Libraries/LibWeb/HTML/HistoryExecutor.cpp b/Libraries/LibWeb/HTML/HistoryExecutor.cpp
index 57599fe0ddb..7f9c34377f9 100644
--- a/Libraries/LibWeb/HTML/HistoryExecutor.cpp
+++ b/Libraries/LibWeb/HTML/HistoryExecutor.cpp
@@ -342,13 +342,17 @@ bool HistoryExecutor::run_changing_navigable_history_step_job_impl(ChangingNavig
// navigable was created or destroyed — which no other engine does. So we skip such applying-the-target-
// entry-would-cross-documents navigables here.
// https://github.com/whatwg/html/issues/12724
+ // A navigable still awaiting the update for its creation has only its initial about:blank, and populates
+ // the entry its nested history kept.
if (!job.navigation_type.has_value()) {
bool would_cross_documents = claimed_target_entry->document_state()->document_id() != navigable->active_document_id()
|| claimed_target_entry->document_state()->reload_pending();
- if (would_cross_documents) {
+ if (would_cross_documents && navigable->has_session_history_entry_and_ready_for_navigation()) {
on_complete->function()({ ChangingNavigableHistoryStepJobDisposition::Skipped, nullptr });
return false;
}
+ if (would_cross_documents)
+ navigable->drop_container_navigation_for_restored_entry();
}
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#fire-a-traverse-navigate-event
@@ -888,6 +892,11 @@ void HistoryExecutor::run_ui_changing_navigable_history_job(CrossProcessId opera
on_complete->function()(ChangingNavigableHistoryStepJobDisposition::Skipped, UnloadDisplayedDocument::No);
return;
}
+ // A navigable created by a repopulated document targets the entry its nested history kept, not its initial one.
+ if (local_target_entry && !navigation_type.has_value() && !navigable->has_session_history_entry_and_ready_for_navigation()
+ && local_target_entry->document_state() && local_target_entry->document_state()->cross_process_id() != target_entry.document_state.id) {
+ local_target_entry = nullptr;
+ }
if (local_target_entry) {
auto document_state = local_target_entry->document_state();
if (!document_state
diff --git a/Libraries/LibWeb/HTML/LocalNavigable.cpp b/Libraries/LibWeb/HTML/LocalNavigable.cpp
index 6d87fb0cd75..0559c959ca7 100644
--- a/Libraries/LibWeb/HTML/LocalNavigable.cpp
+++ b/Libraries/LibWeb/HTML/LocalNavigable.cpp
@@ -901,24 +901,6 @@ void LocalNavigable::set_current_session_history_entry(RefPtr<SessionHistoryEntr
m_current_session_history_entry = move(entry);
}
-void LocalNavigable::route_child_created_during_history_reconstruction(Web::ReconstructedChildNavigation navigation)
-{
- prepare_to_populate_reconstructed_history_entry(navigation.target_entry.navigation_api_key);
-
- auto source_snapshot_params = snapshot_source_snapshot_params(nullptr);
- auto request = NavigationPopulationRequest {
- .navigable_id = id(),
- .history_entry = create_pending_session_history_entry_descriptor(move(navigation.target_entry)),
- .source_snapshot_params = create_navigation_source_snapshot(source_snapshot_params),
- .target_snapshot_params = snapshot_target_snapshot_params(*this),
- .csp_navigation_type = ContentSecurityPolicy::Directives::Directive::NavigationType::Other,
- .history_handling = Bindings::NavigationHistoryBehavior::Replace,
- .user_involvement = UserNavigationInvolvement::BrowserUI,
- .navigation_id = move(navigation.navigation_id),
- };
- request_population_for_reconstructed_history_entry(move(request));
-}
-
// AD-HOC: The UI process ran steps 1-4 of attempting to populate the history entry's document. Continue at the
// algorithm's queued-global-task boundary instead of restarting the algorithm in this process.
void LocalNavigable::continue_navigation_at_population(NavigationPopulationRequest request, NavigationPopulationResult result)
@@ -1760,19 +1742,14 @@ void LocalNavigable::process_pending_navigations()
}
}
-void LocalNavigable::prepare_to_populate_reconstructed_history_entry(Utf16String navigation_api_key)
+// The entry a child navigable's nested history kept is restored in place of the navigation its container started.
+void LocalNavigable::drop_container_navigation_for_restored_entry()
{
auto index = m_pending_navigations.find_first_index_if([](auto const& pending) {
return !pending.population_navigation_id.has_value();
});
if (index.has_value())
m_pending_navigations.remove(*index);
-
- auto initial_entry = active_session_history_entry();
- VERIFY(initial_entry);
- initial_entry->set_navigation_api_key(move(navigation_api_key));
-
- set_delaying_load_events(true);
}
// https://html.spec.whatwg.org/multipage/document-sequences.html#the-rules-for-choosing-a-navigable
@@ -3986,23 +3963,6 @@ bool LocalNavigable::resume_navigation_params_creation(Utf16String const& naviga
return true;
}
-void LocalNavigable::request_population_for_reconstructed_history_entry(NavigationPopulationRequest request)
-{
- set_ongoing_navigation(request.navigation_id);
- auto source_snapshot_params = snapshot_source_snapshot_params(nullptr);
- auto navigation_id = request.navigation_id;
- auto continue_steps = GC::create_function(heap(), [this, source_snapshot_params](Optional<PreparedNavigation> pending_navigation, Optional<NavigationPopulationRequest> population_request) mutable {
- VERIFY(!pending_navigation.has_value());
- VERIFY(population_request.has_value());
- auto request = population_request.release_value();
- auto navigation_timing_type = request.history_entry.document_state.reload_pending ? Bindings::NavigationTimingType::Reload : Bindings::NavigationTimingType::BackForward;
- create_navigation_params_for_navigation(move(request), source_snapshot_params, NullOrError {}, navigation_timing_type);
- });
-
- park_navigation_for_population(navigation_id, {}, continue_steps);
- page().client().request_navigation_population(*this, NavigationTarget::IFrame, move(request));
-}
-
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate-fragid
void LocalNavigable::navigate_to_a_fragment(URL::URL const& url, HistoryHandlingBehavior history_handling, UserNavigationInvolvement user_involvement, GC::Ptr<DOM::Element> source_element, Optional<StorageSerializationRecord> navigation_api_state, Utf16String navigation_id, GC::Ptr<NavigationAPIMethodTracker> api_method_tracker)
{
diff --git a/Libraries/LibWeb/HTML/LocalNavigable.h b/Libraries/LibWeb/HTML/LocalNavigable.h
index 3ec4bf59473..91cd7672fdd 100644
--- a/Libraries/LibWeb/HTML/LocalNavigable.h
+++ b/Libraries/LibWeb/HTML/LocalNavigable.h
@@ -199,8 +199,6 @@ public:
void navigate_to_a_fragment(URL::URL const&, HistoryHandlingBehavior, UserNavigationInvolvement, GC::Ptr<DOM::Element> source_element, Optional<StorageSerializationRecord> navigation_api_state, Utf16String navigation_id, GC::Ptr<NavigationAPIMethodTracker> api_method_tracker);
void deliver_posted_message_from_another_process(PostedMessageDescriptor);
void run_navigation_unload_check(Utf16String const& navigation_id, UnloadPromptShown, GC::Ref<GC::Function<void(bool)>> completion_steps);
- void request_population_for_reconstructed_history_entry(NavigationPopulationRequest);
- void route_child_created_during_history_reconstruction(Web::ReconstructedChildNavigation);
void continue_navigation_at_population(NavigationPopulationRequest, NavigationPopulationResult);
void populate_session_history_entry_document(
@@ -303,7 +301,7 @@ public:
bool has_pending_navigations() const { return !m_pending_navigations.is_empty(); }
bool has_navigation_parked_for_population(Utf16String const& navigation_id) const;
void clear_pending_navigations();
- void prepare_to_populate_reconstructed_history_entry(Utf16String navigation_api_key);
+ void drop_container_navigation_for_restored_entry();
// Commits the frame that brings the compositor context up to date to the render owner, which presents it beside the
// event loop: a new display list, or what changed for the one it has. Answers whether it committed one.
diff --git a/Libraries/LibWeb/Page/Page.cpp b/Libraries/LibWeb/Page/Page.cpp
index c89c3f7cf8e..4d7aa46ea79 100644
--- a/Libraries/LibWeb/Page/Page.cpp
+++ b/Libraries/LibWeb/Page/Page.cpp
@@ -2143,11 +2143,6 @@ void PageClient::request_navigation_start(HTML::LocalNavigable&, NavigationTarge
VERIFY_NOT_REACHED();
}
-void PageClient::request_navigation_population(HTML::LocalNavigable&, NavigationTarget, HTML::NavigationPopulationRequest)
-{
- VERIFY_NOT_REACHED();
-}
-
void PageClient::navigation_params_creation_finished(HTML::LocalNavigable&, HTML::NavigationPopulationRequest, HTML::NavigationPopulationResult)
{
VERIFY_NOT_REACHED();
diff --git a/Libraries/LibWeb/Page/Page.h b/Libraries/LibWeb/Page/Page.h
index b8b7028a8e7..d5ba943e05e 100644
--- a/Libraries/LibWeb/Page/Page.h
+++ b/Libraries/LibWeb/Page/Page.h
@@ -597,7 +597,6 @@ public:
virtual void set_has_focus([[maybe_unused]] bool has_focus) { }
virtual bool has_active_devtools_client() const { return false; }
virtual void request_navigation_start(HTML::LocalNavigable&, NavigationTarget, URL::URL const& url, Utf16String navigation_id, Optional<HTML::NavigationStartRequest>);
- virtual void request_navigation_population(HTML::LocalNavigable&, NavigationTarget, HTML::NavigationPopulationRequest);
virtual void request_navigation_of_navigable(HTML::Navigable&, HTML::PreparedNavigationDescriptor) { VERIFY_NOT_REACHED(); }
virtual void request_post_message_to_remote_navigable(HTML::RemoteNavigable&, HTML::PostedMessageDescriptor) { VERIFY_NOT_REACHED(); }
virtual void request_close_of_remote_traversable(HTML::RemoteNavigable&, HTML::LocalNavigable const&) { VERIFY_NOT_REACHED(); }
diff --git a/Libraries/LibWebCommon/HTML/HistoryOperation.cpp b/Libraries/LibWebCommon/HTML/HistoryOperation.cpp
index 7a2b4b8fe19..6f8ad6b9c4e 100644
--- a/Libraries/LibWebCommon/HTML/HistoryOperation.cpp
+++ b/Libraries/LibWebCommon/HTML/HistoryOperation.cpp
@@ -35,23 +35,6 @@ ErrorOr<Web::FinalizeCrossDocumentNavigationHistoryOperationParameters> IPC::dec
};
}
-template<>
-ErrorOr<void> IPC::encode(Encoder& encoder, Web::ReconstructedChildNavigation const& navigation)
-{
- TRY(encoder.encode(navigation.target_entry));
- TRY(encoder.encode(navigation.navigation_id));
- return {};
-}
-
-template<>
-ErrorOr<Web::ReconstructedChildNavigation> IPC::decode(Decoder& decoder)
-{
- return Web::ReconstructedChildNavigation {
- .target_entry = TRY(decoder.decode<Web::HTML::SessionHistoryEntryDescriptor>()),
- .navigation_id = TRY(decoder.decode<Utf16String>()),
- };
-}
-
template<>
ErrorOr<void> IPC::encode(Encoder& encoder, Web::ReloadHistoryOperationParameters const& parameters)
{
diff --git a/Libraries/LibWebCommon/HTML/HistoryOperation.h b/Libraries/LibWebCommon/HTML/HistoryOperation.h
index 7a1c52bc61e..fac2ae22623 100644
--- a/Libraries/LibWebCommon/HTML/HistoryOperation.h
+++ b/Libraries/LibWebCommon/HTML/HistoryOperation.h
@@ -32,11 +32,6 @@ struct FinalizeCrossDocumentNavigationHistoryOperationParameters {
Optional<HTML::CrossProcessId> document_id;
};
-struct ReconstructedChildNavigation {
- HTML::SessionHistoryEntryDescriptor target_entry;
- Utf16String navigation_id;
-};
-
using HistoryOperationReadyResult = Variant<Empty, HTML::HistoryStepResult>;
struct ReloadHistoryOperationParameters {
@@ -122,11 +117,6 @@ WEBCOMMON_API ErrorOr<void> encode(Encoder&, Web::FinalizeCrossDocumentNavigatio
template<>
WEBCOMMON_API ErrorOr<Web::FinalizeCrossDocumentNavigationHistoryOperationParameters> decode(Decoder&);
-template<>
-WEBCOMMON_API ErrorOr<void> encode(Encoder&, Web::ReconstructedChildNavigation const&);
-template<>
-WEBCOMMON_API ErrorOr<Web::ReconstructedChildNavigation> decode(Decoder&);
-
template<>
WEBCOMMON_API ErrorOr<void> encode(Encoder&, Web::ReloadHistoryOperationParameters const&);
template<>
diff --git a/Libraries/LibWebView/ApplyHistoryStep.cpp b/Libraries/LibWebView/ApplyHistoryStep.cpp
index 8ef280f0b50..481919e40db 100644
--- a/Libraries/LibWebView/ApplyHistoryStep.cpp
+++ b/Libraries/LibWebView/ApplyHistoryStep.cpp
@@ -130,17 +130,6 @@ void ApplyHistoryStep::get_changing_and_nonchanging_navigables()
// or reload given traversable and targetStep.
m_changing_navigables = m_session_history.get_all_navigables_whose_current_session_history_entry_will_change_or_reload(m_traversable_navigable, m_target_step);
- // AD-HOC: A navigation reconstructing a child navigable's history populates the entry it reconstructs, and
- // activates its document once it is finalized. A step targeting that entry before then leaves the
- // navigable to the navigation.
- m_changing_navigables.remove_all_matching([&](auto navigable_id) {
- auto const* navigable = find_navigable(navigable_id);
- if (!navigable || !navigable->ongoing_navigation().has_value())
- return false;
- auto const& reconstructed_entry = navigable->ongoing_navigation()->reconstructed_entry;
- return reconstructed_entry && reconstructed_entry == m_session_history.get_the_target_history_entry(*navigable, m_target_step);
- });
-
// 7. Let nonchangingNavigablesThatStillNeedUpdates be the result of getting all navigables that only need
// history object length/index update given traversable and targetStep.
m_nonchanging_navigables_that_still_need_updates = m_session_history.get_all_navigables_that_only_need_history_object_length_index_update(m_traversable_navigable, m_target_step);
diff --git a/Libraries/LibWebView/CanonicalNavigation.h b/Libraries/LibWebView/CanonicalNavigation.h
index cabef54b4f4..c1cd425c364 100644
--- a/Libraries/LibWebView/CanonicalNavigation.h
+++ b/Libraries/LibWebView/CanonicalNavigation.h
@@ -52,9 +52,6 @@ public:
OwnPtr<NavigationLoader> loader {};
RefPtr<WebContentPage> population_worker {};
RefPtr<WebContentPage> host {};
- // AD-HOC: The session history entry whose document a navigation reconstructing a child navigable's history
- // populates.
- RefPtr<CanonicalSessionHistoryEntry> reconstructed_entry {};
Optional<PopulatedDocument> populated_document {};
};
diff --git a/Libraries/LibWebView/CanonicalTraversable.cpp b/Libraries/LibWebView/CanonicalTraversable.cpp
index 49e8540a398..2689ca05fba 100644
--- a/Libraries/LibWebView/CanonicalTraversable.cpp
+++ b/Libraries/LibWebView/CanonicalTraversable.cpp
@@ -6,7 +6,6 @@
#include <AK/NeverDestroyed.h>
#include <AK/NumericLimits.h>
-#include <AK/Random.h>
#include <AK/StringBuilder.h>
#include <LibCore/EventLoop.h>
#include <LibWebCommon/WebView/SiteIsolation.h>
@@ -1562,7 +1561,11 @@ void CanonicalTraversable::dispatch_changing_navigable_history_step_continuation
} else {
// 11. Otherwise:
// 1. Assert: navigationType is not null.
- VERIFY(pending_job.value()->job.navigation_type.has_value());
+ // AD-HOC: Except for a navigable created by a document repopulated for its entry, which displays its initial
+ // about:blank until an update for a navigable's creation or destruction restores the entry its nested
+ // history kept. See https://github.com/whatwg/html/issues/12724.
+ auto navigable = find(navigable_id);
+ VERIFY(pending_job.value()->job.navigation_type.has_value() || (navigable.has_value() && navigable->active_document().is_initial_about_blank()));
// 2. Deactivate displayedDocument, given userInvolvement, targetEntry, navigationType, and
// afterPotentialUnloads.
@@ -2459,27 +2462,10 @@ void CanonicalTraversable::run_direct_history_operation(HistoryOperation& operat
return;
}
- // A navigable created by a document repopulated for its entry navigates to the entry its nested history
- // kept, rather than starting from about:blank.
- if (auto* target_entry = m_session_history.get_the_target_history_entry(*child_navigable, *current_step)) {
- auto uuid = generate_random_uuid();
- auto navigation_id = Utf16String::from_ascii_without_validation(uuid.bytes());
- auto ongoing_navigation = CanonicalNavigation {
- .url = target_entry->url,
- .navigation_id = navigation_id,
- .sequence_number = next_sequence_number(),
- .has_started = true,
- .phase = CanonicalNavigation::Phase::Populating,
- .reconstructed_entry = target_entry,
- };
- child_navigable->set_ongoing_navigation(move(ongoing_navigation));
- child_navigable->set_navigation_host(*operation.initiating_page);
- auto reconstructed_child_navigation = Web::ReconstructedChildNavigation {
- .target_entry = target_entry->descriptor(),
- .navigation_id = move(navigation_id),
- };
- operation.initiating_page->async_reconstruct_child_navigable_history(parameters.navigable_id, move(reconstructed_child_navigation));
- finish_history_operation(operation.operation_id, Web::HTML::HistoryStepResult::Applied, {});
+ // A navigable created by a document repopulated for its entry already has the nested history that entry
+ // kept. Updating for its creation populates the entry the history holds for it at the current step.
+ if (m_session_history.get_the_target_history_entry(*child_navigable, *current_step)) {
+ update_for_navigable_creation_or_destruction(operation);
return;
}
@@ -2680,13 +2666,8 @@ void CanonicalTraversable::finalize_a_cross_document_navigation(HistoryOperation
// 5. Let entryToReplace be navigable's active session history entry if historyHandling is "replace", otherwise null.
RefPtr<CanonicalSessionHistoryEntry> entry_to_replace;
- if (parameters.history_handling == Web::HTML::HistoryHandlingBehavior::Replace) {
+ if (parameters.history_handling == Web::HTML::HistoryHandlingBehavior::Replace)
entry_to_replace = navigable->active_session_history_entry();
-
- // AD-HOC: A navigation reconstructing the navigable's history replaces the entry whose document it populates.
- if (auto const& ongoing_navigation = navigable->ongoing_navigation(); ongoing_navigation.has_value() && ongoing_navigation->reconstructed_entry && ongoing_navigation->navigation_id == parameters.navigation_id)
- entry_to_replace = ongoing_navigation->reconstructed_entry;
- }
if (parameters.history_handling == Web::HTML::HistoryHandlingBehavior::Replace && !entry_to_replace) {
finish_history_operation(operation.operation_id, Web::HTML::HistoryStepResult::NoMatchingEntry, {});
return;
diff --git a/Libraries/LibWebView/WebContentPage.cpp b/Libraries/LibWebView/WebContentPage.cpp
index b0515e34e2a..37bc9d5904d 100644
--- a/Libraries/LibWebView/WebContentPage.cpp
+++ b/Libraries/LibWebView/WebContentPage.cpp
@@ -311,13 +311,9 @@ bool WebContentPage::continue_navigation_population_in_selected_process(Web::HTM
auto const& request = navigable->ongoing_navigation()->loader->request();
auto document = navigable->create_and_initialize_a_document(*response_document);
navigable->ongoing_navigation()->loader->set_document(*document, *navigable);
- // NB: A navigation reconstructing a child navigable's history populates the entry it reconstructs.
- auto const& reconstructed_entry = navigable->ongoing_navigation()->reconstructed_entry;
- auto document_state = reconstructed_entry ? reconstructed_entry->document_state : CanonicalDocumentState::create(request.history_entry.document_state.id);
- if (!reconstructed_entry) {
- document_state->initiator_origin = request.history_entry.document_state.initiator_origin;
- document_state->origin = request.history_entry.document_state.origin;
- }
+ auto document_state = CanonicalDocumentState::create(request.history_entry.document_state.id);
+ document_state->initiator_origin = request.history_entry.document_state.initiator_origin;
+ document_state->origin = request.history_entry.document_state.origin;
navigable->populate_document_for_ongoing_navigation(move(document_state), *document, navigable->ongoing_navigation()->loader->result().inline_content_origin);
// A document created for inline content stands in for the resource the process that fetched it could not
@@ -2016,85 +2012,6 @@ void WebContentPage::did_complete_navigation_unload_check(Web::HTML::CrossProces
}
}
-void WebContentPage::did_request_navigation_population(Web::HTML::CrossProcessId navigable_id, Web::NavigationTarget target, Web::HTML::NavigationPopulationRequest request)
-{
- auto const& target_url = request.history_entry.url;
-
- CanonicalNavigable* target_navigable = &traversable();
- Optional<CanonicalNavigable&> child_frame;
- if (target == Web::NavigationTarget::IFrame) {
- child_frame = traversable().top_level_traversable().find(navigable_id);
- target_navigable = child_frame.has_value() ? &*child_frame : nullptr;
- }
-
- // AD-HOC: A population request can race with the UI traversal queue in the same way as a navigation-start
- // request, so validate the canonical ongoing-navigation value before admitting it.
- auto navigation_is_blocked_by_history_traversal = target_navigable
- && target_navigable->ongoing_navigation_is_traversal();
- if (!target_navigable
- || target_navigable->id() != navigable_id
- || request.navigable_id != navigable_id
- || navigation_is_blocked_by_history_traversal) {
- async_cancel_navigation_params_creation(navigable_id, request.navigation_id);
- return;
- }
-
- if (auto const& ongoing_navigation = target_navigable->ongoing_navigation(); ongoing_navigation.has_value()
- && ongoing_navigation->navigation_id == request.navigation_id
- && ongoing_navigation->loader) {
- async_cancel_navigation_params_creation(navigable_id, request.navigation_id);
- return;
- }
-
- // A reconstructed child navigation was admitted in the populating phase without a request of its own;
- // only the process hosting the child's document may deliver its population request.
- auto continues_reconstructed_child_navigation = target_navigable->ongoing_navigation().has_value()
- && target_navigable->ongoing_navigation()->navigation_id == request.navigation_id
- && target_navigable->ongoing_navigation()->phase == CanonicalNavigation::Phase::Populating
- && !target_navigable->ongoing_navigation()->loader
- && target_navigable->navigation_host_matches(*this);
-
- // A population request names the URL to populate, so it reaches local file content only from local file content, or
- // to continue a navigation to that file: URL the UI process admitted.
- if (target_url.scheme() == "file"sv && !may_navigate_to_a_local_file(client(), request.source_snapshot_params)) {
- auto continues_admitted_file_navigation = continues_reconstructed_child_navigation
- && target_navigable->ongoing_navigation()->url == target_url;
- if (!continues_admitted_file_navigation) {
- async_cancel_navigation_params_creation(navigable_id, request.navigation_id);
- return;
- }
- }
-
- if (continues_reconstructed_child_navigation) {
- auto& ongoing_navigation = *target_navigable->ongoing_navigation();
- ongoing_navigation.url = target_url;
- ongoing_navigation.phase = CanonicalNavigation::Phase::Populating;
- ongoing_navigation.loader = NavigationLoader::create(client().is_private(), move(request));
- } else {
- target_navigable->set_ongoing_navigation(CanonicalNavigation {
- .url = target_url,
- .navigation_id = request.navigation_id,
- .sequence_number = target_navigable->top_level_traversable().next_sequence_number(),
- .phase = CanonicalNavigation::Phase::Populating,
- .loader = NavigationLoader::create(client().is_private(), move(request)),
- });
- }
-
- // The UI process owns the in-parallel population work. Dispatch the document-dependent
- // steps through step 4 to the process with the live source document. The response URL then
- // determines which process receives the task queued by step 5.
- if (!target_navigable->ongoing_navigation()->population_worker)
- target_navigable->set_navigation_population_worker(*this);
- async_create_navigation_params(target_navigable->ongoing_navigation()->loader->request());
-
- // Requesting navigation params starts the fetch, so a view's top-level population begins its recorded
- // load here.
- if (target_navigable->is_top_level_traversable()) {
- if (displays_tab())
- begin_top_level_load(target_navigable->ongoing_navigation()->navigation_id, target_navigable->ongoing_navigation()->loader->request().history_entry.url);
- }
-}
-
void WebContentPage::did_finish_navigation_params_creation(Web::HTML::CrossProcessId navigable_id, Utf16String navigation_id, Optional<Web::HTML::NavigationPopulationResult> result)
{
auto navigable = population_worker_navigable(navigable_id);
diff --git a/Libraries/LibWebView/WebContentPage.h b/Libraries/LibWebView/WebContentPage.h
index 488584e91ef..dd1d0d7f341 100644
--- a/Libraries/LibWebView/WebContentPage.h
+++ b/Libraries/LibWebView/WebContentPage.h
@@ -294,7 +294,6 @@ private:
virtual void did_request_set_system_visibility_state(Web::HTML::VisibilityState visibility_state) override;
virtual void did_request_navigation_start(Web::HTML::CrossProcessId navigable_id, Web::NavigationTarget target, URL::URL url, Utf16String navigation_id, Optional<Web::HTML::NavigationStartRequest> start_request) override;
virtual void did_complete_navigation_unload_check(Web::HTML::CrossProcessId navigable_id, Utf16String navigation_id) override;
- virtual void did_request_navigation_population(Web::HTML::CrossProcessId navigable_id, Web::NavigationTarget target, Web::HTML::NavigationPopulationRequest request) override;
virtual void did_finish_navigation_params_creation(Web::HTML::CrossProcessId navigable_id, Utf16String navigation_id, Optional<Web::HTML::NavigationPopulationResult> result) override;
virtual void did_finish_history_navigation_params_creation(Web::HTML::CrossProcessId operation_id, Web::HTML::HistoryNavigationPopulation population) override;
virtual void did_fail_navigation_population(Web::HTML::CrossProcessId navigable_id, Utf16String navigation_id) override;
diff --git a/Services/WebContent/ConnectionFromClient.cpp b/Services/WebContent/ConnectionFromClient.cpp
index b57d24ce753..a3d807ac30b 100644
--- a/Services/WebContent/ConnectionFromClient.cpp
+++ b/Services/WebContent/ConnectionFromClient.cpp
@@ -555,15 +555,6 @@ void ConnectionFromClient::history_operation_started(Web::PageId page_id, Web::H
}));
}
-void ConnectionFromClient::reconstruct_child_navigable_history(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::ReconstructedChildNavigation navigation)
-{
- auto page = this->page(page_id);
- auto* navigable = page.has_value() ? as_if<Web::HTML::LocalNavigable>(page->page().navigable_with_id(navigable_id).ptr()) : nullptr;
- if (!navigable || navigable->has_been_destroyed())
- return;
- navigable->route_child_created_during_history_reconstruction(move(navigation));
-}
-
void ConnectionFromClient::run_beforeunload_check(Web::PageId page_id, Web::HTML::CrossProcessId check_id, Vector<Web::HTML::CrossProcessId> navigable_ids, Optional<Web::HTML::SessionHistoryEntryDescriptor> target_entry, Optional<Web::HTML::UserNavigationInvolvement> user_involvement_for_navigate_event, Web::HTML::UnloadPromptShown unload_prompt_shown)
{
auto page = this->page(page_id);
diff --git a/Services/WebContent/ConnectionFromClient.h b/Services/WebContent/ConnectionFromClient.h
index 13f335b974c..c02500da2fa 100644
--- a/Services/WebContent/ConnectionFromClient.h
+++ b/Services/WebContent/ConnectionFromClient.h
@@ -141,7 +141,6 @@ private:
virtual void stop_hosting_navigable(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::ReplicatedNavigableState) override;
virtual void set_hosted_root_viewport(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::DevicePixelSize, Web::DevicePixelRect viewport_intersection, double device_pixel_ratio) override;
virtual void history_operation_started(Web::PageId page_id, Web::HTML::CrossProcessId operation_id) override;
- virtual void reconstruct_child_navigable_history(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::ReconstructedChildNavigation navigation) override;
virtual void run_beforeunload_check(Web::PageId page_id, Web::HTML::CrossProcessId check_id, Vector<Web::HTML::CrossProcessId> navigable_ids, Optional<Web::HTML::SessionHistoryEntryDescriptor> target_entry, Optional<Web::HTML::UserNavigationInvolvement> user_involvement_for_navigate_event, Web::HTML::UnloadPromptShown unload_prompt_shown) override;
virtual void discard_embedded_page(Web::PageId page_id) override;
virtual void queue_navigation_api_state_clear_task(Web::PageId page_id, Web::HTML::CrossProcessId operation_id, Web::HTML::CrossProcessId navigable_id) override;
diff --git a/Services/WebContent/PageClient.cpp b/Services/WebContent/PageClient.cpp
index 03eccbeb3bf..ea664f01646 100644
--- a/Services/WebContent/PageClient.cpp
+++ b/Services/WebContent/PageClient.cpp
@@ -250,11 +250,6 @@ void PageClient::request_navigation_start(Web::HTML::LocalNavigable& navigable,
client().async_did_request_navigation_start(m_id, navigable.id(), target, url, move(navigation_id), move(start_request));
}
-void PageClient::request_navigation_population(Web::HTML::LocalNavigable& navigable, Web::NavigationTarget target, Web::HTML::NavigationPopulationRequest request)
-{
- client().async_did_request_navigation_population(m_id, navigable.id(), target, move(request));
-}
-
void PageClient::request_navigation_of_navigable(Web::HTML::Navigable& navigable, Web::HTML::PreparedNavigationDescriptor navigation)
{
client().async_did_request_navigation_of_navigable(m_id, navigable.id(), move(navigation));
diff --git a/Services/WebContent/PageClient.h b/Services/WebContent/PageClient.h
index 8e03f360669..2f1998ea505 100644
--- a/Services/WebContent/PageClient.h
+++ b/Services/WebContent/PageClient.h
@@ -187,7 +187,6 @@ private:
// ^PageClient
virtual bool is_connection_open() const override;
virtual void request_navigation_start(Web::HTML::LocalNavigable&, Web::NavigationTarget, URL::URL const& url, Utf16String navigation_id, Optional<Web::HTML::NavigationStartRequest>) override;
- virtual void request_navigation_population(Web::HTML::LocalNavigable&, Web::NavigationTarget, Web::HTML::NavigationPopulationRequest) override;
virtual void request_navigation_of_navigable(Web::HTML::Navigable&, Web::HTML::PreparedNavigationDescriptor) override;
virtual void request_post_message_to_remote_navigable(Web::HTML::RemoteNavigable&, Web::HTML::PostedMessageDescriptor) override;
virtual void request_close_of_remote_traversable(Web::HTML::RemoteNavigable&, Web::HTML::LocalNavigable const& source) override;
diff --git a/Services/WebContent/WebContentClient.ipc b/Services/WebContent/WebContentClient.ipc
index 89169057cd9..4bc15297ba2 100644
--- a/Services/WebContent/WebContentClient.ipc
+++ b/Services/WebContent/WebContentClient.ipc
@@ -85,7 +85,6 @@ endpoint WebContentClient routed by Web::PageId page_id
did_request_navigation_start(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::NavigationTarget target, URL::URL url, Utf16String navigation_id, Optional<Web::HTML::NavigationStartRequest> start_request) =|
did_complete_navigation_unload_check(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Utf16String navigation_id) =|
- did_request_navigation_population(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::NavigationTarget target, Web::HTML::NavigationPopulationRequest request) =|
did_request_navigation_of_navigable(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::PreparedNavigationDescriptor navigation) =|
did_post_message_to_navigable(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::PostedMessageDescriptor message) =|
did_request_close_of_traversable(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::CrossProcessId source_navigable_id) =|
diff --git a/Services/WebContent/WebContentServer.ipc b/Services/WebContent/WebContentServer.ipc
index 5aeec61d99a..ffa8452d38c 100644
--- a/Services/WebContent/WebContentServer.ipc
+++ b/Services/WebContent/WebContentServer.ipc
@@ -114,7 +114,6 @@ endpoint WebContentServer routed by Web::PageId page_id
stop_hosting_navigable(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::HTML::ReplicatedNavigableState replicated_state) =|
set_hosted_root_viewport(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::DevicePixelSize size, Web::DevicePixelRect viewport_intersection, double device_pixel_ratio) =|
history_operation_started(Web::PageId page_id, Web::HTML::CrossProcessId operation_id) =|
- reconstruct_child_navigable_history(Web::PageId page_id, Web::HTML::CrossProcessId navigable_id, Web::ReconstructedChildNavigation navigation) =|
run_beforeunload_check(Web::PageId page_id, Web::HTML::CrossProcessId check_id, Vector<Web::HTML::CrossProcessId> navigable_ids, Optional<Web::HTML::SessionHistoryEntryDescriptor> target_entry, Optional<Web::HTML::UserNavigationInvolvement> user_involvement_for_navigate_event, Web::HTML::UnloadPromptShown unload_prompt_shown) =|
discard_embedded_page(Web::PageId page_id) =|
queue_navigation_api_state_clear_task(Web::PageId page_id, Web::HTML::CrossProcessId operation_id, Web::HTML::CrossProcessId navigable_id) =|