| 
									
										
										
										
											2020-01-18 09:38:21 +01:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2022-08-01 16:34:56 +02:00
										 |  |  |  * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org> | 
					
						
							| 
									
										
										
										
											2020-01-18 09:38:21 +01:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2021-04-22 01:24:48 -07:00
										 |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							| 
									
										
										
										
											2020-01-18 09:38:21 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-09 21:25:29 +02:00
										 |  |  | #include <AK/Function.h>
 | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | #include <AK/Noncopyable.h>
 | 
					
						
							|  |  |  | #include <AK/RefPtr.h>
 | 
					
						
							| 
									
										
										
										
											2019-11-25 21:19:03 +01:00
										 |  |  | #include <AK/WeakPtr.h>
 | 
					
						
							| 
									
										
										
										
											2020-06-06 13:02:44 +02:00
										 |  |  | #include <LibGfx/Bitmap.h>
 | 
					
						
							| 
									
										
										
										
											2020-02-06 12:04:00 +01:00
										 |  |  | #include <LibGfx/Rect.h>
 | 
					
						
							|  |  |  | #include <LibGfx/Size.h>
 | 
					
						
							| 
									
										
										
										
											2022-10-30 01:52:07 +00:00
										 |  |  | #include <LibJS/Forward.h>
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  | #include <LibJS/Heap/Cell.h>
 | 
					
						
							| 
									
										
										
										
											2020-08-02 11:52:35 +02:00
										 |  |  | #include <LibWeb/DOM/Position.h>
 | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  | #include <LibWeb/HTML/AbstractBrowsingContext.h>
 | 
					
						
							| 
									
										
										
										
											2023-03-20 18:39:20 -04:00
										 |  |  | #include <LibWeb/HTML/ActivateTab.h>
 | 
					
						
							| 
									
										
										
										
											2022-09-19 17:46:34 +02:00
										 |  |  | #include <LibWeb/HTML/HistoryHandlingBehavior.h>
 | 
					
						
							| 
									
										
										
										
											2022-12-12 12:20:02 +01:00
										 |  |  | #include <LibWeb/HTML/NavigableContainer.h>
 | 
					
						
							| 
									
										
										
										
											2022-08-05 10:55:47 +02:00
										 |  |  | #include <LibWeb/HTML/Origin.h>
 | 
					
						
							| 
									
										
										
										
											2023-08-28 17:41:09 +02:00
										 |  |  | #include <LibWeb/HTML/SandboxingFlagSet.h>
 | 
					
						
							| 
									
										
										
										
											2022-08-01 16:34:56 +02:00
										 |  |  | #include <LibWeb/HTML/SessionHistoryEntry.h>
 | 
					
						
							| 
									
										
										
										
											2023-03-21 06:52:29 -04:00
										 |  |  | #include <LibWeb/HTML/TokenizedFeatures.h>
 | 
					
						
							| 
									
										
										
										
											2022-09-19 20:50:33 +02:00
										 |  |  | #include <LibWeb/HTML/VisibilityState.h>
 | 
					
						
							| 
									
										
										
										
											2020-07-28 19:27:41 +02:00
										 |  |  | #include <LibWeb/Page/EventHandler.h>
 | 
					
						
							| 
									
										
										
										
											2022-09-07 20:30:31 +02:00
										 |  |  | #include <LibWeb/Platform/Timer.h>
 | 
					
						
							| 
									
										
										
										
											2020-03-07 10:32:51 +01:00
										 |  |  | #include <LibWeb/TreeNode.h>
 | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-18 15:01:28 +01:00
										 |  |  | namespace Web::HTML { | 
					
						
							| 
									
										
										
										
											2020-03-07 10:27:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  | class BrowsingContext final | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  |     : public AbstractBrowsingContext | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  |     , public Weakable<BrowsingContext> { | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  |     JS_CELL(BrowsingContext, AbstractBrowsingContext); | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2023-04-23 19:31:46 +03:00
										 |  |  |     struct BrowsingContextAndDocument { | 
					
						
							|  |  |  |         JS::NonnullGCPtr<BrowsingContext> browsing_context; | 
					
						
							|  |  |  |         JS::NonnullGCPtr<DOM::Document> document; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     static WebIDL::ExceptionOr<BrowsingContextAndDocument> create_a_new_browsing_context_and_document(Page& page, JS::GCPtr<DOM::Document> creator, JS::GCPtr<DOM::Element> embedder, JS::NonnullGCPtr<BrowsingContextGroup> group); | 
					
						
							|  |  |  |     static WebIDL::ExceptionOr<BrowsingContextAndDocument> create_a_new_auxiliary_browsing_context_and_document(Page& page, JS::NonnullGCPtr<HTML::BrowsingContext> opener); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  |     virtual ~BrowsingContext() override; | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-17 13:35:20 +01:00
										 |  |  |     JS::NonnullGCPtr<HTML::TraversableNavigable> top_level_traversable() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  |     JS::GCPtr<BrowsingContext> parent() const { return m_parent; } | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> first_child() const; | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> next_sibling() const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     bool is_ancestor_of(BrowsingContext const&) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     template<typename Callback> | 
					
						
							|  |  |  |     IterationDecision for_each_in_inclusive_subtree(Callback callback) const | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         if (callback(*this) == IterationDecision::Break) | 
					
						
							|  |  |  |             return IterationDecision::Break; | 
					
						
							|  |  |  |         for (auto child = first_child(); child; child = child->next_sibling()) { | 
					
						
							|  |  |  |             if (child->for_each_in_inclusive_subtree(callback) == IterationDecision::Break) | 
					
						
							|  |  |  |                 return IterationDecision::Break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         return IterationDecision::Continue; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     template<typename Callback> | 
					
						
							|  |  |  |     IterationDecision for_each_in_inclusive_subtree(Callback callback) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         if (callback(*this) == IterationDecision::Break) | 
					
						
							|  |  |  |             return IterationDecision::Break; | 
					
						
							|  |  |  |         for (auto child = first_child(); child; child = child->next_sibling()) { | 
					
						
							|  |  |  |             if (child->for_each_in_inclusive_subtree(callback) == IterationDecision::Break) | 
					
						
							|  |  |  |                 return IterationDecision::Break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         return IterationDecision::Continue; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     template<typename Callback> | 
					
						
							|  |  |  |     IterationDecision for_each_in_subtree(Callback callback) const | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         for (auto child = first_child(); child; child = child->next_sibling()) { | 
					
						
							|  |  |  |             if (child->for_each_in_inclusive_subtree(callback) == IterationDecision::Break) | 
					
						
							|  |  |  |                 return IterationDecision::Break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         return IterationDecision::Continue; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     template<typename Callback> | 
					
						
							|  |  |  |     IterationDecision for_each_in_subtree(Callback callback) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         for (auto child = first_child(); child; child = child->next_sibling()) { | 
					
						
							|  |  |  |             if (child->for_each_in_inclusive_subtree(callback) == IterationDecision::Break) | 
					
						
							|  |  |  |                 return IterationDecision::Break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         return IterationDecision::Continue; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-01 21:17:53 +00:00
										 |  |  |     bool is_top_level() const; | 
					
						
							| 
									
										
										
										
											2021-05-30 12:36:53 +02:00
										 |  |  |     bool is_focused_context() const; | 
					
						
							| 
									
										
										
										
											2020-06-06 16:33:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-28 13:42:07 +02:00
										 |  |  |     DOM::Document const* active_document() const; | 
					
						
							|  |  |  |     DOM::Document* active_document(); | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  |     virtual HTML::WindowProxy* window_proxy() override; | 
					
						
							|  |  |  |     virtual HTML::WindowProxy const* window_proxy() const override; | 
					
						
							| 
									
										
										
										
											2022-11-15 01:58:26 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-23 19:31:46 +03:00
										 |  |  |     void set_window_proxy(JS::GCPtr<WindowProxy>); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-19 17:46:34 +02:00
										 |  |  |     HTML::Window* active_window(); | 
					
						
							|  |  |  |     HTML::Window const* active_window() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-12 18:23:05 +01:00
										 |  |  |     Page* page() { return m_page; } | 
					
						
							| 
									
										
										
										
											2021-09-08 10:43:20 +02:00
										 |  |  |     Page const* page() const { return m_page; } | 
					
						
							| 
									
										
										
										
											2019-11-25 21:19:03 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-18 15:01:28 +01:00
										 |  |  |     Web::EventHandler& event_handler() { return m_event_handler; } | 
					
						
							|  |  |  |     Web::EventHandler const& event_handler() const { return m_event_handler; } | 
					
						
							| 
									
										
										
										
											2020-06-07 14:40:38 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-03 12:49:54 +00:00
										 |  |  |     void scroll_to(CSSPixelPoint); | 
					
						
							| 
									
										
										
										
											2020-06-06 13:02:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-04 15:33:08 +02:00
										 |  |  |     JS::GCPtr<BrowsingContext> top_level_browsing_context() const; | 
					
						
							| 
									
										
										
										
											2020-06-06 15:08:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-15 02:00:27 +02:00
										 |  |  |     enum class WindowType { | 
					
						
							|  |  |  |         ExistingOrNone, | 
					
						
							|  |  |  |         NewAndUnrestricted, | 
					
						
							|  |  |  |         NewWithNoOpener, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     struct ChosenBrowsingContext { | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  |         JS::GCPtr<AbstractBrowsingContext> browsing_context; | 
					
						
							| 
									
										
										
										
											2022-11-15 02:00:27 +02:00
										 |  |  |         WindowType window_type; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-21 06:52:29 -04:00
										 |  |  |     ChosenBrowsingContext choose_a_browsing_context(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab = ActivateTab::Yes); | 
					
						
							| 
									
										
										
										
											2022-03-15 14:37:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 12:20:02 +01:00
										 |  |  |     HTML::NavigableContainer* container() { return m_container; } | 
					
						
							|  |  |  |     HTML::NavigableContainer const* container() const { return m_container; } | 
					
						
							| 
									
										
										
										
											2020-06-06 15:08:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-02 17:35:53 +00:00
										 |  |  |     CSSPixelPoint to_top_level_position(CSSPixelPoint); | 
					
						
							|  |  |  |     CSSPixelRect to_top_level_rect(CSSPixelRect const&); | 
					
						
							| 
									
										
										
										
											2020-06-08 20:31:49 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-26 19:34:21 +02:00
										 |  |  |     JS::GCPtr<DOM::Position> cursor_position() const { return m_cursor_position; } | 
					
						
							|  |  |  |     void set_cursor_position(JS::NonnullGCPtr<DOM::Position>); | 
					
						
							| 
									
										
										
										
											2021-05-18 22:01:12 +02:00
										 |  |  |     bool increment_cursor_position_offset(); | 
					
						
							|  |  |  |     bool decrement_cursor_position_offset(); | 
					
						
							| 
									
										
										
										
											2020-08-02 11:52:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     bool cursor_blink_state() const { return m_cursor_blink_state; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 18:02:33 +00:00
										 |  |  |     DeprecatedString selected_text() const; | 
					
						
							| 
									
										
										
										
											2021-07-14 08:38:10 -04:00
										 |  |  |     void select_all(); | 
					
						
							| 
									
										
										
										
											2020-08-06 19:21:59 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-04 20:48:27 +01:00
										 |  |  |     void did_edit(Badge<EditEventHandler>); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-28 13:42:07 +02:00
										 |  |  |     JS::GCPtr<DOM::Node> currently_focused_area(); | 
					
						
							| 
									
										
										
										
											2022-02-06 18:45:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 10:58:30 +01:00
										 |  |  |     Vector<JS::NonnullGCPtr<SessionHistoryEntry>>& session_history() { return m_session_history; } | 
					
						
							|  |  |  |     Vector<JS::NonnullGCPtr<SessionHistoryEntry>> const& session_history() const { return m_session_history; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-13 22:43:04 +08:00
										 |  |  |     size_t session_history_index() const { return *m_session_history_index; } | 
					
						
							| 
									
										
										
										
											2022-08-01 16:34:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-01 16:42:11 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/dom.html#still-on-its-initial-about:blank-document
 | 
					
						
							|  |  |  |     bool still_on_its_initial_about_blank_document() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-19 12:28:46 +02:00
										 |  |  |     BrowsingContextGroup* group(); | 
					
						
							|  |  |  |     void set_group(BrowsingContextGroup*); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#bcg-remove
 | 
					
						
							|  |  |  |     void remove(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-19 17:46:34 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/origin.html#one-permitted-sandboxed-navigator
 | 
					
						
							|  |  |  |     BrowsingContext const* the_one_permitted_sandboxed_navigator() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-08 12:56:40 -05:00
										 |  |  |     bool has_been_discarded() const { return m_has_been_discarded; } | 
					
						
							| 
									
										
										
										
											2022-09-20 21:44:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-21 17:08:01 +00:00
										 |  |  |     Optional<AK::URL> const& creator_url() const { return m_creator_url; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-14 12:40:03 +03:00
										 |  |  |     virtual String const& window_handle() const override { return m_window_handle; } | 
					
						
							|  |  |  |     virtual void set_window_handle(String handle) override { m_window_handle = move(handle); } | 
					
						
							| 
									
										
										
										
											2023-03-13 16:49:07 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2022-12-12 12:20:02 +01:00
										 |  |  |     explicit BrowsingContext(Page&, HTML::NavigableContainer*); | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  |     virtual void visit_edges(Cell::Visitor&) override; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-09 21:23:50 +01:00
										 |  |  |     void reset_cursor_blink_cycle(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-12 18:23:05 +01:00
										 |  |  |     WeakPtr<Page> m_page; | 
					
						
							| 
									
										
										
										
											2021-09-08 11:17:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-18 15:01:28 +01:00
										 |  |  |     Web::EventHandler m_event_handler; | 
					
						
							| 
									
										
										
										
											2020-06-06 13:02:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-19 17:46:34 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/history.html#current-entry
 | 
					
						
							|  |  |  |     SessionHistoryEntry& current_entry() { return m_session_history[*m_session_history_index]; } | 
					
						
							|  |  |  |     SessionHistoryEntry const& current_entry() const { return m_session_history[*m_session_history_index]; } | 
					
						
							|  |  |  |     Optional<size_t> m_session_history_index { 0 }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-01 16:34:56 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/history.html#session-history
 | 
					
						
							| 
									
										
										
										
											2022-12-12 10:58:30 +01:00
										 |  |  |     Vector<JS::NonnullGCPtr<SessionHistoryEntry>> m_session_history; | 
					
						
							| 
									
										
										
										
											2022-08-01 16:34:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-05 10:55:47 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#creator-url
 | 
					
						
							|  |  |  |     Optional<AK::URL> m_creator_url; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#creator-base-url
 | 
					
						
							|  |  |  |     Optional<AK::URL> m_creator_base_url; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#creator-origin
 | 
					
						
							|  |  |  |     Optional<HTML::Origin> m_creator_origin; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-12 12:20:02 +01:00
										 |  |  |     JS::GCPtr<HTML::NavigableContainer> m_container; | 
					
						
							| 
									
										
										
										
											2020-08-02 11:52:35 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-13 16:49:07 +03:00
										 |  |  |     // https://w3c.github.io/webdriver/#dfn-window-handles
 | 
					
						
							|  |  |  |     String m_window_handle; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-15 23:10:56 +02:00
										 |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  |     JS::GCPtr<HTML::WindowProxy> m_window_proxy; | 
					
						
							| 
									
										
										
										
											2022-10-15 23:10:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-26 19:34:21 +02:00
										 |  |  |     JS::GCPtr<DOM::Position> m_cursor_position; | 
					
						
							| 
									
										
										
										
											2023-08-19 16:19:52 +02:00
										 |  |  |     RefPtr<Core::Timer> m_cursor_blink_timer; | 
					
						
							| 
									
										
										
										
											2020-08-02 11:52:35 +02:00
										 |  |  |     bool m_cursor_blink_state { false }; | 
					
						
							| 
									
										
										
										
											2021-01-30 12:25:33 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 18:02:33 +00:00
										 |  |  |     DeprecatedString m_name; | 
					
						
							| 
									
										
										
										
											2022-09-19 12:28:46 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // https://html.spec.whatwg.org/multipage/browsers.html#tlbc-group
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  |     JS::GCPtr<BrowsingContextGroup> m_group; | 
					
						
							| 
									
										
										
										
											2022-09-19 20:50:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-17 11:06:50 +02:00
										 |  |  |     JS::GCPtr<BrowsingContext> m_parent; | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> m_first_child; | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> m_last_child; | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> m_next_sibling; | 
					
						
							|  |  |  |     JS::GCPtr<BrowsingContext> m_previous_sibling; | 
					
						
							| 
									
										
										
										
											2022-11-08 12:56:40 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     bool m_has_been_discarded { false }; | 
					
						
							| 
									
										
										
										
											2019-10-04 15:50:04 +02:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2020-03-07 10:27:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-17 17:11:34 +02:00
										 |  |  | HTML::Origin determine_the_origin(AK::URL const& url, SandboxingFlagSet sandbox_flags, Optional<HTML::Origin> source_origin); | 
					
						
							| 
									
										
										
										
											2022-12-12 17:36:20 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-28 17:44:50 +02:00
										 |  |  | SandboxingFlagSet determine_the_creation_sandboxing_flags(BrowsingContext const&, JS::GCPtr<DOM::Element> embedder); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-28 17:41:09 +02:00
										 |  |  | // FIXME: Find a better home for this
 | 
					
						
							|  |  |  | bool url_matches_about_blank(AK::URL const& url); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-07 10:27:02 +01:00
										 |  |  | } |