Truly independent web browser
LibWeb: Remove unused navigation and history helpers
Shannon Booth33872cfbaec5
diff --git a/Libraries/LibWeb/HTML/History.cpp b/Libraries/LibWeb/HTML/History.cppindex 4878af1df3e..f5d2137c1b8 100644--- a/Libraries/LibWeb/HTML/History.cpp+++ b/Libraries/LibWeb/HTML/History.cpp@@ -76,11 +76,6 @@ WebIDL::ExceptionOr<JS::Value> History::state() constreturn m_state;}-bool History::associated_document_is_fully_active() const-{- return m_document->is_fully_active();-}-// https://html.spec.whatwg.org/multipage/nav-history-apis.html#delta-traverseWebIDL::ExceptionOr<void> History::delta_traverse(WebIDL::Long delta){diff --git a/Libraries/LibWeb/HTML/History.h b/Libraries/LibWeb/HTML/History.hindex cde9269cc6e..84c6bd445b8 100644--- a/Libraries/LibWeb/HTML/History.h+++ b/Libraries/LibWeb/HTML/History.h@@ -35,7 +35,6 @@ public:WebIDL::ExceptionOr<void> set_scroll_restoration(Bindings::ScrollRestoration);WebIDL::ExceptionOr<JS::Value> state() const;JS::Value const& state_value() const { return m_state; }- bool associated_document_is_fully_active() const;u64 m_index { 0 };u64 m_length { 0 };diff --git a/Libraries/LibWeb/HTML/LocalNavigable.cpp b/Libraries/LibWeb/HTML/LocalNavigable.cppindex 813427afb95..f7f424ed401 100644--- a/Libraries/LibWeb/HTML/LocalNavigable.cpp+++ b/Libraries/LibWeb/HTML/LocalNavigable.cpp@@ -4524,14 +4524,6 @@ void check_if_unloading_is_canceled(state->start(navigables_that_need_before_unload, move(target_entry));}-void check_if_unloading_is_canceled(Vector<GC::Root<LocalNavigable>> navigables_that_need_before_unload, GC::Ref<GC::Function<void(CheckIfUnloadingIsCanceledResult)>> callback)-{- check_if_unloading_is_canceled(move(navigables_that_need_before_unload), {}, {}, {}, UnloadPromptShown::No,- GC::create_function(GC::Heap::the(), [callback](CheckIfUnloadingIsCanceledResult result, UnloadPromptShown) {- callback->function()(result);- }));-}-// https://html.spec.whatwg.org/multipage/browsing-the-web.html#finalize-a-cross-document-navigation// NB: The UI process appends the steps finalizing the navigation, and runs them, once this process reports that// populating historyEntry's document is over.diff --git a/Libraries/LibWeb/HTML/LocalNavigable.h b/Libraries/LibWeb/HTML/LocalNavigable.hindex dcbb012c639..4b0da6c0722 100644--- a/Libraries/LibWeb/HTML/LocalNavigable.h+++ b/Libraries/LibWeb/HTML/LocalNavigable.h@@ -720,7 +720,6 @@ bool navigation_must_be_a_replace(URL::URL const& url, DOM::Document const& docuvoid finalize_a_cross_document_navigation(GC::Ref<LocalNavigable>, HistoryHandlingBehavior, UserNavigationInvolvement, NonnullRefPtr<SessionHistoryEntry>, GC::Ptr<DOM::Document> pending_document, Utf16String navigation_id);WEB_API void check_if_unloading_is_canceled(Vector<GC::Root<LocalNavigable>> navigables_that_need_before_unload, GC::Ptr<LocalTraversableNavigable> traversable, RefPtr<SessionHistoryEntry> target_entry, Optional<UserNavigationInvolvement> user_involvement_for_navigate_events, UnloadPromptShown, GC::Ref<GC::Function<void(CheckIfUnloadingIsCanceledResult, UnloadPromptShown)>> callback);-WEB_API void check_if_unloading_is_canceled(Vector<GC::Root<LocalNavigable>> navigables_that_need_before_unload, GC::Ref<GC::Function<void(CheckIfUnloadingIsCanceledResult)>> callback);void perform_url_and_history_update_steps(DOM::Document& document, URL::URL new_url, Optional<StorageSerializationRecord> = {}, HistoryHandlingBehavior history_handling = HistoryHandlingBehavior::Replace);}diff --git a/Libraries/LibWeb/HTML/Navigation.cpp b/Libraries/LibWeb/HTML/Navigation.cppindex f5594ce6cec..53690ef6ca2 100644--- a/Libraries/LibWeb/HTML/Navigation.cpp+++ b/Libraries/LibWeb/HTML/Navigation.cpp@@ -234,21 +234,6 @@ HistoryHandlingBehavior to_history_handling_behavior(NavigationHistoryBehavior bVERIFY_NOT_REACHED();}-// https://html.spec.whatwg.org/multipage/browsing-the-web.html#history-handling-behavior-NavigationHistoryBehavior to_navigation_history_behavior(HistoryHandlingBehavior b)-{- // A history handling behavior is a NavigationHistoryBehavior that is either "push" or "replace",- // i.e., that has been resolved away from any initial "auto" value.-- switch (b) {- case HistoryHandlingBehavior::Push:- return NavigationHistoryBehavior::Push;- case HistoryHandlingBehavior::Replace:- return NavigationHistoryBehavior::Replace;- }- VERIFY_NOT_REACHED();-}-// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-navigateWebIDL::ExceptionOr<NavigationResult> Navigation::navigate(Utf16String url, Bindings::NavigationNavigateOptions const& options){diff --git a/Libraries/LibWeb/HTML/Navigation.h b/Libraries/LibWeb/HTML/Navigation.hindex 1b4dc196e47..063883d4eed 100644--- a/Libraries/LibWeb/HTML/Navigation.h+++ b/Libraries/LibWeb/HTML/Navigation.h@@ -237,6 +237,5 @@ private:};HistoryHandlingBehavior to_history_handling_behavior(NavigationHistoryBehavior);-NavigationHistoryBehavior to_navigation_history_behavior(HistoryHandlingBehavior);}