| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2021-04-22 01:24:48 -07:00
										 |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibWeb/HTML/HTMLElement.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::HTML { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-31 13:59:28 +01:00
										 |  |  | class BrowsingContextContainer : public HTMLElement { | 
					
						
							| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2021-05-31 13:59:28 +01:00
										 |  |  |     BrowsingContextContainer(DOM::Document&, QualifiedName); | 
					
						
							|  |  |  |     virtual ~BrowsingContextContainer() override; | 
					
						
							| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-30 12:36:53 +02:00
										 |  |  |     BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; } | 
					
						
							|  |  |  |     const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; } | 
					
						
							| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     const DOM::Document* content_document() const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-06 17:58:20 +01:00
										 |  |  |     virtual void inserted() override; | 
					
						
							| 
									
										
										
										
											2021-04-03 16:45:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  | protected: | 
					
						
							| 
									
										
										
										
											2021-05-30 12:36:53 +02:00
										 |  |  |     RefPtr<BrowsingContext> m_nested_browsing_context; | 
					
						
							| 
									
										
										
										
											2021-11-24 19:15:04 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     virtual bool is_browsing_context_container() const override { return true; } | 
					
						
							| 
									
										
										
										
											2021-04-03 11:43:08 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2021-11-24 19:15:04 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace Web::DOM { | 
					
						
							|  |  |  | template<> | 
					
						
							|  |  |  | inline bool Node::fast_is<HTML::BrowsingContextContainer>() const { return is_browsing_context_container(); } | 
					
						
							|  |  |  | } |