1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

LibWeb: Implement the Screen interface

https://drafts.csswg.org/cssom-view/#the-screen-interface
This commit is contained in:
Linus Groh 2021-04-04 00:14:39 +02:00 committed by Andreas Kling
parent e8739ddab7
commit 340e1f4b28
10 changed files with 138 additions and 0 deletions

View file

@ -32,6 +32,7 @@
#include <AK/RefPtr.h>
#include <LibWeb/Bindings/WindowObject.h>
#include <LibWeb/Bindings/Wrappable.h>
#include <LibWeb/CSS/Screen.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/EventTarget.h>
@ -83,6 +84,8 @@ public:
HighResolutionTime::Performance& performance() { return *m_performance; }
CSS::Screen& screen() { return *m_screen; }
const Event* current_event() const { return m_current_event; }
void set_current_event(Event* event) { m_current_event = event; }
@ -96,6 +99,7 @@ private:
HashMap<int, NonnullRefPtr<Timer>> m_timers;
NonnullOwnPtr<HighResolutionTime::Performance> m_performance;
NonnullRefPtr<CSS::Screen> m_screen;
RefPtr<Event> m_current_event;
};