mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	This helps us to get from a Window to the containing Page, without clients having to go through Document.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			438 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			438 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#include <LibGfx/Rect.h>
 | 
						|
#include <LibWeb/CSS/Screen.h>
 | 
						|
#include <LibWeb/DOM/Document.h>
 | 
						|
#include <LibWeb/DOM/Window.h>
 | 
						|
#include <LibWeb/Page/Page.h>
 | 
						|
 | 
						|
namespace Web::CSS {
 | 
						|
 | 
						|
Screen::Screen(DOM::Window& window)
 | 
						|
    : m_window(window)
 | 
						|
{
 | 
						|
}
 | 
						|
 | 
						|
Gfx::IntRect Screen::screen_rect() const
 | 
						|
{
 | 
						|
    return m_window.page()->screen_rect();
 | 
						|
}
 | 
						|
 | 
						|
}
 |