mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
24 lines
425 B
C++
24 lines
425 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/Page/Page.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
Screen::Screen(HTML::Window& window)
|
|
: m_window(JS::make_handle(window))
|
|
{
|
|
}
|
|
|
|
Gfx::IntRect Screen::screen_rect() const
|
|
{
|
|
return window().page()->screen_rect();
|
|
}
|
|
|
|
}
|