diff options
author | Andreas Kling <kling@serenityos.org> | 2022-10-05 19:33:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-06 09:51:04 +0200 |
commit | f87778211776727f824eed588c5c2f9d4285f62c (patch) | |
tree | ba71cfed1b590d8217cf4d32363e0b77ef39b00a /Userland/Services/WebContent | |
parent | e75645bbf8382ed10087541334b140458c74d0ff (diff) | |
download | serenity-f87778211776727f824eed588c5c2f9d4285f62c.zip |
WebContent: Use Web::Platform::Timer instead of Core::Timer
This will allow WebContent to operate without a Core::EventLoop.
Diffstat (limited to 'Userland/Services/WebContent')
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.h | 3 | ||||
-rw-r--r-- | Userland/Services/WebContent/PageHost.cpp | 3 | ||||
-rw-r--r-- | Userland/Services/WebContent/PageHost.h | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index 2f4107b62c..df2696abc9 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -40,7 +40,7 @@ ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSock : IPC::ConnectionFromClient<WebContentClientEndpoint, WebContentServerEndpoint>(*this, move(socket), 1) , m_page_host(PageHost::create(*this)) { - m_paint_flush_timer = Core::Timer::create_single_shot(0, [this] { flush_pending_paint_requests(); }); + m_paint_flush_timer = Web::Platform::Timer::create_single_shot(0, [this] { flush_pending_paint_requests(); }); } void ConnectionFromClient::die() diff --git a/Userland/Services/WebContent/ConnectionFromClient.h b/Userland/Services/WebContent/ConnectionFromClient.h index f70ec5d254..63e40feb6c 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.h +++ b/Userland/Services/WebContent/ConnectionFromClient.h @@ -14,6 +14,7 @@ #include <LibWeb/Cookie/ParsedCookie.h> #include <LibWeb/Forward.h> #include <LibWeb/Loader/FileRequest.h> +#include <LibWeb/Platform/Timer.h> #include <WebContent/Forward.h> #include <WebContent/WebContentClientEndpoint.h> #include <WebContent/WebContentConsoleClient.h> @@ -91,7 +92,7 @@ private: i32 bitmap_id { -1 }; }; Vector<PaintRequest> m_pending_paint_requests; - RefPtr<Core::Timer> m_paint_flush_timer; + RefPtr<Web::Platform::Timer> m_paint_flush_timer; HashMap<i32, NonnullRefPtr<Gfx::Bitmap>> m_backing_stores; diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index dc1ee8c04e..910fb4197e 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -13,6 +13,7 @@ #include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/Layout/InitialContainingBlock.h> #include <LibWeb/Painting/PaintableBox.h> +#include <LibWeb/Platform/Timer.h> #include <WebContent/WebContentClientEndpoint.h> namespace WebContent { @@ -22,7 +23,7 @@ PageHost::PageHost(ConnectionFromClient& client) , m_page(make<Web::Page>(*this)) { setup_palette(); - m_invalidation_coalescing_timer = Core::Timer::create_single_shot(0, [this] { + m_invalidation_coalescing_timer = Web::Platform::Timer::create_single_shot(0, [this] { m_client.async_did_invalidate_content_rect(m_invalidation_rect); m_invalidation_rect = {}; }); diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h index 6ce85c4b0b..83b2bb3864 100644 --- a/Userland/Services/WebContent/PageHost.h +++ b/Userland/Services/WebContent/PageHost.h @@ -81,7 +81,7 @@ private: bool m_should_show_line_box_borders { false }; bool m_has_focus { false }; - RefPtr<Core::Timer> m_invalidation_coalescing_timer; + RefPtr<Web::Platform::Timer> m_invalidation_coalescing_timer; Gfx::IntRect m_invalidation_rect; Web::CSS::PreferredColorScheme m_preferred_color_scheme { Web::CSS::PreferredColorScheme::Auto }; }; |