mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	LibWeb/HTML: Hook up WindowOrWorkerGlobalScopeMixin to Window
This prepares us to use the shared implementations from this class.
This commit is contained in:
		
							parent
							
								
									b2409517bd
								
							
						
					
					
						commit
						376fb9ae40
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		|  | @ -1847,7 +1847,7 @@ JS_DEFINE_NATIVE_FUNCTION(Window::is_secure_context_getter) | ||||||
| { | { | ||||||
|     auto* impl = TRY(impl_from(vm)); |     auto* impl = TRY(impl_from(vm)); | ||||||
|     // The isSecureContext getter steps are to return true if this's relevant settings object is a secure context, or false otherwise.
 |     // The isSecureContext getter steps are to return true if this's relevant settings object is a secure context, or false otherwise.
 | ||||||
|     return JS::Value(is_secure_context(impl->associated_document().relevant_settings_object())); |     return JS::Value(HTML::is_secure_context(impl->associated_document().relevant_settings_object())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| JS_DEFINE_NATIVE_FUNCTION(Window::local_storage_getter) | JS_DEFINE_NATIVE_FUNCTION(Window::local_storage_getter) | ||||||
|  |  | ||||||
|  | @ -24,6 +24,7 @@ | ||||||
| #include <LibWeb/HTML/Plugin.h> | #include <LibWeb/HTML/Plugin.h> | ||||||
| #include <LibWeb/HTML/Scripting/ImportMap.h> | #include <LibWeb/HTML/Scripting/ImportMap.h> | ||||||
| #include <LibWeb/HTML/WindowEventHandlers.h> | #include <LibWeb/HTML/WindowEventHandlers.h> | ||||||
|  | #include <LibWeb/HTML/WindowOrWorkerGlobalScope.h> | ||||||
| 
 | 
 | ||||||
| namespace Web::HTML { | namespace Web::HTML { | ||||||
| 
 | 
 | ||||||
|  | @ -36,6 +37,7 @@ class Window final | ||||||
|     : public DOM::EventTarget |     : public DOM::EventTarget | ||||||
|     , public HTML::GlobalEventHandlers |     , public HTML::GlobalEventHandlers | ||||||
|     , public HTML::WindowEventHandlers |     , public HTML::WindowEventHandlers | ||||||
|  |     , public WindowOrWorkerGlobalScopeMixin | ||||||
|     , public Bindings::WindowGlobalMixin { |     , public Bindings::WindowGlobalMixin { | ||||||
|     WEB_PLATFORM_OBJECT(Window, DOM::EventTarget); |     WEB_PLATFORM_OBJECT(Window, DOM::EventTarget); | ||||||
| 
 | 
 | ||||||
|  | @ -44,8 +46,13 @@ public: | ||||||
| 
 | 
 | ||||||
|     ~Window(); |     ~Window(); | ||||||
| 
 | 
 | ||||||
|  |     // ^DOM::EventTarget
 | ||||||
|     virtual bool dispatch_event(DOM::Event&) override; |     virtual bool dispatch_event(DOM::Event&) override; | ||||||
| 
 | 
 | ||||||
|  |     // ^WindowOrWorkerGlobalScopeMixin
 | ||||||
|  |     virtual Bindings::PlatformObject& this_impl() override { return *this; } | ||||||
|  |     virtual Bindings::PlatformObject const& this_impl() const override { return *this; } | ||||||
|  | 
 | ||||||
|     Page* page(); |     Page* page(); | ||||||
|     Page const* page() const; |     Page const* page() const; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh