| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2022, Andreas Kling <kling@serenityos.org> | 
					
						
							| 
									
										
										
										
											2023-01-01 17:46:00 +01:00
										 |  |  |  * Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 16:00:42 +02:00
										 |  |  | #include <AK/HashTable.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-24 16:18:40 -06:00
										 |  |  | #include <AK/String.h>
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | #include <LibJS/Heap/Cell.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  | #include <LibWeb/Bindings/NavigationPrototype.h>
 | 
					
						
							| 
									
										
										
										
											2023-09-14 01:22:00 +02:00
										 |  |  | #include <LibWeb/DOM/DocumentLoadEventDelayer.h>
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | #include <LibWeb/Forward.h>
 | 
					
						
							| 
									
										
										
										
											2023-04-11 10:20:11 +03:00
										 |  |  | #include <LibWeb/HTML/ActivateTab.h>
 | 
					
						
							| 
									
										
										
										
											2023-01-01 17:46:00 +01:00
										 |  |  | #include <LibWeb/HTML/HistoryHandlingBehavior.h>
 | 
					
						
							| 
									
										
										
										
											2023-09-21 13:47:19 -06:00
										 |  |  | #include <LibWeb/HTML/NavigationParams.h>
 | 
					
						
							| 
									
										
										
										
											2023-01-01 17:46:00 +01:00
										 |  |  | #include <LibWeb/HTML/POSTResource.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  | #include <LibWeb/HTML/SandboxingFlagSet.h>
 | 
					
						
							| 
									
										
										
										
											2023-04-06 18:10:12 +03:00
										 |  |  | #include <LibWeb/HTML/SourceSnapshotParams.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  | #include <LibWeb/HTML/StructuredSerialize.h>
 | 
					
						
							| 
									
										
										
										
											2023-04-11 10:20:11 +03:00
										 |  |  | #include <LibWeb/HTML/TokenizedFeatures.h>
 | 
					
						
							| 
									
										
										
										
											2024-04-26 16:59:04 +02:00
										 |  |  | #include <LibWeb/Page/EventHandler.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-22 16:00:42 +02:00
										 |  |  | #include <LibWeb/PixelUnits.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  | #include <LibWeb/XHR/FormDataEntry.h>
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace Web::HTML { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-07 12:47:38 -04:00
										 |  |  | enum class CSPNavigationType { | 
					
						
							|  |  |  |     Other, | 
					
						
							|  |  |  |     FormSubmission, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  | // https://html.spec.whatwg.org/multipage/browsing-the-web.html#user-navigation-involvement
 | 
					
						
							| 
									
										
										
										
											2023-09-20 22:21:20 -06:00
										 |  |  | enum class UserNavigationInvolvement { | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  |     BrowserUI, | 
					
						
							|  |  |  |     Activation, | 
					
						
							|  |  |  |     None, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // https://html.spec.whatwg.org/multipage/browsing-the-web.html#target-snapshot-params
 | 
					
						
							|  |  |  | struct TargetSnapshotParams { | 
					
						
							|  |  |  |     SandboxingFlagSet sandboxing_flags {}; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | // https://html.spec.whatwg.org/multipage/document-sequences.html#navigable
 | 
					
						
							| 
									
										
										
										
											2024-05-02 10:24:23 +02:00
										 |  |  | class Navigable : public JS::Cell { | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  |     JS_CELL(Navigable, JS::Cell); | 
					
						
							| 
									
										
										
										
											2023-11-19 19:47:52 +01:00
										 |  |  |     JS_DECLARE_ALLOCATOR(Navigable); | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     virtual ~Navigable() override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-25 20:46:32 +03:00
										 |  |  |     ErrorOr<void> initialize_navigable(JS::NonnullGCPtr<DocumentState> document_state, JS::GCPtr<Navigable> parent); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-06 23:16:38 +03:00
										 |  |  |     Vector<JS::Handle<Navigable>> child_navigables() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-27 17:06:39 +02:00
										 |  |  |     bool is_traversable() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-07 22:48:11 -04:00
										 |  |  |     String const& id() const { return m_id; } | 
					
						
							|  |  |  |     JS::GCPtr<Navigable> parent() const { return m_parent; } | 
					
						
							| 
									
										
										
										
											2024-04-19 15:38:17 +02:00
										 |  |  |     bool is_ancestor_of(JS::NonnullGCPtr<Navigable>) const; | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-07 22:48:11 -04:00
										 |  |  |     bool is_closing() const { return m_closing; } | 
					
						
							|  |  |  |     void set_closing(bool value) { m_closing = value; } | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-14 01:22:00 +02:00
										 |  |  |     void set_delaying_load_events(bool value); | 
					
						
							| 
									
										
										
										
											2023-11-24 15:18:57 +00:00
										 |  |  |     bool is_delaying_load_events() const { return m_delaying_the_load_event.has_value(); } | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-07 22:48:11 -04:00
										 |  |  |     JS::GCPtr<SessionHistoryEntry> active_session_history_entry() const { return m_active_session_history_entry; } | 
					
						
							| 
									
										
										
										
											2023-08-20 14:42:55 +02:00
										 |  |  |     void set_active_session_history_entry(JS::GCPtr<SessionHistoryEntry> entry) { m_active_session_history_entry = entry; } | 
					
						
							| 
									
										
										
										
											2023-07-07 22:48:11 -04:00
										 |  |  |     JS::GCPtr<SessionHistoryEntry> current_session_history_entry() const { return m_current_session_history_entry; } | 
					
						
							|  |  |  |     void set_current_session_history_entry(JS::GCPtr<SessionHistoryEntry> entry) { m_current_session_history_entry = entry; } | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-06 18:08:44 +03:00
										 |  |  |     Vector<JS::NonnullGCPtr<SessionHistoryEntry>>& get_session_history_entries() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-06 23:33:21 +03:00
										 |  |  |     void activate_history_entry(JS::GCPtr<SessionHistoryEntry>); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  |     JS::GCPtr<DOM::Document> active_document(); | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> active_browsing_context(); | 
					
						
							|  |  |  |     JS::GCPtr<WindowProxy> active_window_proxy(); | 
					
						
							|  |  |  |     JS::GCPtr<Window> active_window(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-06 23:30:02 +03:00
										 |  |  |     JS::GCPtr<SessionHistoryEntry> get_the_target_history_entry(int target_step) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  |     String target_name() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     JS::GCPtr<NavigableContainer> container() const; | 
					
						
							| 
									
										
										
										
											2022-12-16 12:05:19 +01:00
										 |  |  |     JS::GCPtr<DOM::Document> container_document() const; | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-06 12:06:45 +03:00
										 |  |  |     JS::GCPtr<TraversableNavigable> traversable_navigable() const; | 
					
						
							| 
									
										
										
										
											2022-12-12 12:17:46 +01:00
										 |  |  |     JS::GCPtr<TraversableNavigable> top_level_traversable(); | 
					
						
							| 
									
										
										
										
											2022-12-12 12:07:41 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-28 18:00:52 +02:00
										 |  |  |     virtual bool is_top_level_traversable() const { return false; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 16:59:04 +02:00
										 |  |  |     [[nodiscard]] bool is_focused() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-11 10:20:11 +03:00
										 |  |  |     enum class WindowType { | 
					
						
							|  |  |  |         ExistingOrNone, | 
					
						
							|  |  |  |         NewAndUnrestricted, | 
					
						
							|  |  |  |         NewWithNoOpener, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     struct ChosenNavigable { | 
					
						
							|  |  |  |         JS::GCPtr<Navigable> navigable; | 
					
						
							|  |  |  |         WindowType window_type; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-28 09:12:18 -06:00
										 |  |  |     ChosenNavigable choose_a_navigable(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab = ActivateTab::Yes, Optional<TokenizedFeature::Map const&> window_features = {}); | 
					
						
							| 
									
										
										
										
											2023-04-11 10:20:11 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-01 17:43:05 +01:00
										 |  |  |     static JS::GCPtr<Navigable> navigable_with_active_document(JS::NonnullGCPtr<DOM::Document>); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-24 21:37:35 +03:00
										 |  |  |     enum class Traversal { | 
					
						
							|  |  |  |         Tag | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Variant<Empty, Traversal, String> ongoing_navigation() const { return m_ongoing_navigation; } | 
					
						
							| 
									
										
										
										
											2023-08-22 15:22:50 +02:00
										 |  |  |     void set_ongoing_navigation(Variant<Empty, Traversal, String> ongoing_navigation); | 
					
						
							| 
									
										
										
										
											2023-04-24 21:37:35 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-21 13:47:19 -06:00
										 |  |  |     WebIDL::ExceptionOr<void> populate_session_history_entry_document( | 
					
						
							|  |  |  |         JS::GCPtr<SessionHistoryEntry> entry, | 
					
						
							|  |  |  |         SourceSnapshotParams const& source_snapshot_params, | 
					
						
							|  |  |  |         TargetSnapshotParams const& target_snapshot_params, | 
					
						
							|  |  |  |         Optional<String> navigation_id = {}, | 
					
						
							| 
									
										
										
										
											2024-04-21 19:57:33 +00:00
										 |  |  |         Variant<Empty, JS::NonnullGCPtr<NavigationParams>, JS::NonnullGCPtr<NonFetchSchemeNavigationParams>> navigation_params = Empty {}, | 
					
						
							| 
									
										
										
										
											2023-09-21 13:47:19 -06:00
										 |  |  |         CSPNavigationType csp_navigation_type = CSPNavigationType::Other, | 
					
						
							|  |  |  |         bool allow_POST = false, | 
					
						
							| 
									
										
										
										
											2024-04-24 00:56:51 +02:00
										 |  |  |         JS::SafeFunction<void()> completion_steps = [] {}); | 
					
						
							| 
									
										
										
										
											2023-04-06 18:10:12 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 16:05:38 +02:00
										 |  |  |     struct NavigateParams { | 
					
						
							| 
									
										
										
										
											2024-03-18 16:22:27 +13:00
										 |  |  |         URL::URL const& url; | 
					
						
							| 
									
										
										
										
											2023-10-10 16:05:38 +02:00
										 |  |  |         JS::NonnullGCPtr<DOM::Document> source_document; | 
					
						
							|  |  |  |         Variant<Empty, String, POSTResource> document_resource = Empty {}; | 
					
						
							|  |  |  |         JS::GCPtr<Fetch::Infrastructure::Response> response = nullptr; | 
					
						
							|  |  |  |         bool exceptions_enabled = false; | 
					
						
							|  |  |  |         Bindings::NavigationHistoryBehavior history_handling = Bindings::NavigationHistoryBehavior::Auto; | 
					
						
							|  |  |  |         Optional<SerializationRecord> navigation_api_state = {}; | 
					
						
							|  |  |  |         Optional<Vector<XHR::FormDataEntry>&> form_data_entry_list = {}; | 
					
						
							|  |  |  |         ReferrerPolicy::ReferrerPolicy referrer_policy = ReferrerPolicy::ReferrerPolicy::EmptyString; | 
					
						
							|  |  |  |         UserNavigationInvolvement user_involvement = UserNavigationInvolvement::None; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     WebIDL::ExceptionOr<void> navigate(NavigateParams); | 
					
						
							| 
									
										
										
										
											2023-01-01 17:46:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-18 16:22:27 +13:00
										 |  |  |     WebIDL::ExceptionOr<void> navigate_to_a_fragment(URL::URL const&, HistoryHandlingBehavior, UserNavigationInvolvement, Optional<SerializationRecord> navigation_api_state, String navigation_id); | 
					
						
							| 
									
										
										
										
											2023-01-01 17:46:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-18 16:22:27 +13:00
										 |  |  |     WebIDL::ExceptionOr<JS::GCPtr<DOM::Document>> evaluate_javascript_url(URL::URL const&, Origin const& new_document_origin, String navigation_id); | 
					
						
							|  |  |  |     WebIDL::ExceptionOr<void> navigate_to_a_javascript_url(URL::URL const&, HistoryHandlingBehavior, Origin const& initiator_origin, CSPNavigationType csp_navigation_type, String navigation_id); | 
					
						
							| 
									
										
										
										
											2023-01-01 17:46:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-27 22:59:57 -06:00
										 |  |  |     bool allowed_by_sandboxing_to_navigate(Navigable const& target, SourceSnapshotParams const&); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-07 00:08:39 +03:00
										 |  |  |     void reload(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-05 23:36:20 +02:00
										 |  |  |     // https://github.com/whatwg/html/issues/9690
 | 
					
						
							|  |  |  |     [[nodiscard]] bool has_been_destroyed() const { return m_has_been_destroyed; } | 
					
						
							|  |  |  |     void set_has_been_destroyed() { m_has_been_destroyed = true; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 16:00:42 +02:00
										 |  |  |     CSSPixelPoint to_top_level_position(CSSPixelPoint); | 
					
						
							|  |  |  |     CSSPixelRect to_top_level_rect(CSSPixelRect const&); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     CSSPixelSize size() const { return m_size; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     CSSPixelPoint viewport_scroll_offset() const { return m_viewport_scroll_offset; } | 
					
						
							|  |  |  |     CSSPixelRect viewport_rect() const { return { m_viewport_scroll_offset, m_size }; } | 
					
						
							| 
									
										
										
										
											2024-06-03 17:53:55 +03:00
										 |  |  |     void set_viewport_size(CSSPixelSize); | 
					
						
							| 
									
										
										
										
											2024-02-03 10:43:01 +01:00
										 |  |  |     void perform_scroll_of_viewport(CSSPixelPoint position); | 
					
						
							| 
									
										
										
										
											2023-08-22 16:00:42 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     void set_needs_display(); | 
					
						
							|  |  |  |     void set_needs_display(CSSPixelRect const&); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-24 23:54:36 +02:00
										 |  |  |     void set_is_popup(TokenizedFeature::Popup is_popup) { m_is_popup = is_popup; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-20 08:09:59 +02:00
										 |  |  |     // https://html.spec.whatwg.org/#rendering-opportunity
 | 
					
						
							|  |  |  |     [[nodiscard]] bool has_a_rendering_opportunity() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-21 13:47:19 -06:00
										 |  |  |     [[nodiscard]] TargetSnapshotParams snapshot_target_snapshot_params(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-23 22:10:35 +01:00
										 |  |  |     [[nodiscard]] bool needs_repaint() const { return m_needs_repaint; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-15 11:28:21 +01:00
										 |  |  |     struct PaintConfig { | 
					
						
							|  |  |  |         bool paint_overlay { false }; | 
					
						
							|  |  |  |         bool should_show_line_box_borders { false }; | 
					
						
							|  |  |  |         bool has_focus { false }; | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2024-06-23 18:40:10 +02:00
										 |  |  |     void record_display_list(Painting::DisplayListRecorder& display_list_recorder, PaintConfig); | 
					
						
							| 
									
										
										
										
											2024-01-15 11:28:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 14:55:54 +02:00
										 |  |  |     Page& page() { return m_page; } | 
					
						
							|  |  |  |     Page const& page() const { return m_page; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 16:59:04 +02:00
										 |  |  |     String selected_text() const; | 
					
						
							|  |  |  |     void select_all(); | 
					
						
							|  |  |  |     void paste(String const&); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     Web::EventHandler& event_handler() { return m_event_handler; } | 
					
						
							|  |  |  |     Web::EventHandler const& event_handler() const { return m_event_handler; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void did_edit(Badge<EditEventHandler>); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     JS::GCPtr<DOM::Position> cursor_position() const { return m_cursor_position; } | 
					
						
							|  |  |  |     void set_cursor_position(JS::NonnullGCPtr<DOM::Position>); | 
					
						
							|  |  |  |     bool increment_cursor_position_offset(); | 
					
						
							|  |  |  |     bool decrement_cursor_position_offset(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool cursor_blink_state() const { return m_cursor_blink_state; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | protected: | 
					
						
							| 
									
										
										
										
											2024-04-26 14:55:54 +02:00
										 |  |  |     explicit Navigable(JS::NonnullGCPtr<Page>); | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     virtual void visit_edges(Cell::Visitor&) override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-24 21:37:35 +03:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/browsing-the-web.html#ongoing-navigation
 | 
					
						
							|  |  |  |     Variant<Empty, Traversal, String> m_ongoing_navigation; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-24 23:54:36 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#is-popup
 | 
					
						
							|  |  |  |     TokenizedFeature::Popup m_is_popup { TokenizedFeature::Popup::No }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2024-04-26 16:59:04 +02:00
										 |  |  |     void reset_cursor_blink_cycle(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 16:00:42 +02:00
										 |  |  |     void scroll_offset_did_change(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-20 23:21:16 -06:00
										 |  |  |     void inform_the_navigation_api_about_aborting_navigation(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/document-sequences.html#nav-id
 | 
					
						
							|  |  |  |     String m_id; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/document-sequences.html#nav-parent
 | 
					
						
							|  |  |  |     JS::GCPtr<Navigable> m_parent; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/document-sequences.html#nav-current-history-entry
 | 
					
						
							|  |  |  |     JS::GCPtr<SessionHistoryEntry> m_current_session_history_entry; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/document-sequences.html#nav-active-history-entry
 | 
					
						
							|  |  |  |     JS::GCPtr<SessionHistoryEntry> m_active_session_history_entry; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/document-sequences.html#is-closing
 | 
					
						
							|  |  |  |     bool m_closing { false }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/document-sequences.html#delaying-load-events-mode
 | 
					
						
							| 
									
										
										
										
											2023-09-14 01:22:00 +02:00
										 |  |  |     Optional<DOM::DocumentLoadEventDelayer> m_delaying_the_load_event; | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Implied link between navigable and its container.
 | 
					
						
							|  |  |  |     JS::GCPtr<NavigableContainer> m_container; | 
					
						
							| 
									
										
										
										
											2023-09-05 23:36:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 14:55:54 +02:00
										 |  |  |     JS::NonnullGCPtr<Page> m_page; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-05 23:36:20 +02:00
										 |  |  |     bool m_has_been_destroyed { false }; | 
					
						
							| 
									
										
										
										
											2023-08-22 16:00:42 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     CSSPixelSize m_size; | 
					
						
							|  |  |  |     CSSPixelPoint m_viewport_scroll_offset; | 
					
						
							| 
									
										
										
										
											2024-02-23 22:10:35 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     bool m_needs_repaint { false }; | 
					
						
							| 
									
										
										
										
											2024-04-26 16:59:04 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Web::EventHandler m_event_handler; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     JS::GCPtr<DOM::Position> m_cursor_position; | 
					
						
							|  |  |  |     RefPtr<Core::Timer> m_cursor_blink_timer; | 
					
						
							|  |  |  |     bool m_cursor_blink_state { false }; | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-05 23:36:20 +02:00
										 |  |  | HashTable<Navigable*>& all_navigables(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-18 16:22:27 +13:00
										 |  |  | bool navigation_must_be_a_replace(URL::URL const& url, DOM::Document const& document); | 
					
						
							| 
									
										
										
										
											2023-08-28 18:06:10 +02:00
										 |  |  | void finalize_a_cross_document_navigation(JS::NonnullGCPtr<Navigable>, HistoryHandlingBehavior, JS::NonnullGCPtr<SessionHistoryEntry>); | 
					
						
							| 
									
										
										
										
											2024-03-28 12:58:43 +01:00
										 |  |  | void perform_url_and_history_update_steps(DOM::Document& document, URL::URL new_url, Optional<SerializationRecord> = {}, HistoryHandlingBehavior history_handling = HistoryHandlingBehavior::Replace); | 
					
						
							| 
									
										
										
										
											2024-01-18 12:52:13 -07:00
										 |  |  | UserNavigationInvolvement user_navigation_involvement(DOM::Event const&); | 
					
						
							| 
									
										
										
										
											2023-08-24 16:18:40 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 11:46:54 +01:00
										 |  |  | } |