diff --git a/Demos/WebView/WebContentClient.cpp b/Demos/WebView/WebContentClient.cpp index 0906edcaa16..03a6d3497f3 100644 --- a/Demos/WebView/WebContentClient.cpp +++ b/Demos/WebView/WebContentClient.cpp @@ -44,18 +44,24 @@ void WebContentClient::handshake() void WebContentClient::handle(const Messages::WebContentClient::DidPaint& message) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentClient::DidPaint! content_rect=" << message.content_rect() << ", shbuf_id=" << message.shbuf_id(); +#endif m_view.notify_server_did_paint({}, message.shbuf_id()); } -void WebContentClient::handle(const Messages::WebContentClient::DidFinishLoad& message) +void WebContentClient::handle([[maybe_unused]] const Messages::WebContentClient::DidFinishLoad& message) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentClient::DidFinishLoad! url=" << message.url(); +#endif } void WebContentClient::handle(const Messages::WebContentClient::DidInvalidateContentRect& message) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentClient::DidInvalidateContentRect! content_rect=" << message.content_rect(); +#endif // FIXME: Figure out a way to coalesce these messages to reduce unnecessary painting m_view.notify_server_did_invalidate_content_rect({}, message.content_rect()); @@ -63,6 +69,8 @@ void WebContentClient::handle(const Messages::WebContentClient::DidInvalidateCon void WebContentClient::handle(const Messages::WebContentClient::DidChangeSelection&) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentClient::DidChangeSelection!"; +#endif m_view.notify_server_did_change_selection({}); } diff --git a/Demos/WebView/WebContentView.cpp b/Demos/WebView/WebContentView.cpp index 0ac909865c0..46a5b18e164 100644 --- a/Demos/WebView/WebContentView.cpp +++ b/Demos/WebView/WebContentView.cpp @@ -84,9 +84,11 @@ void WebContentView::notify_server_did_paint(Badge, i32 shbuf_ update(); } -void WebContentView::notify_server_did_invalidate_content_rect(Badge, const Gfx::IntRect& content_rect) +void WebContentView::notify_server_did_invalidate_content_rect(Badge, [[maybe_unused]] const Gfx::IntRect& content_rect) { +#ifdef DEBUG_SPAM dbg() << "server did invalidate content_rect: " << content_rect << ", current shbuf_id=" << m_bitmap->shbuf_id(); +#endif request_repaint(); } diff --git a/Services/WebContent/ClientConnection.cpp b/Services/WebContent/ClientConnection.cpp index 70c6bccd6f8..00bf8d7e318 100644 --- a/Services/WebContent/ClientConnection.cpp +++ b/Services/WebContent/ClientConnection.cpp @@ -82,19 +82,25 @@ void ClientConnection::handle(const Messages::WebContentServer::UpdateSystemThem void ClientConnection::handle(const Messages::WebContentServer::LoadURL& message) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentServer::LoadURL: url=" << message.url(); +#endif page().load(message.url()); } void ClientConnection::handle(const Messages::WebContentServer::SetViewportRect& message) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentServer::SetViewportRect: rect=" << message.rect(); +#endif m_page_host->set_viewport_rect(message.rect()); } void ClientConnection::handle(const Messages::WebContentServer::Paint& message) { +#ifdef DEBUG_SPAM dbg() << "handle: WebContentServer::Paint: content_rect=" << message.content_rect() << ", shbuf_id=" << message.shbuf_id(); +#endif auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.shbuf_id()); if (!shared_buffer) {