diff options
Diffstat (limited to 'Demos/WebView')
-rw-r--r-- | Demos/WebView/WebContentClient.cpp | 10 | ||||
-rw-r--r-- | Demos/WebView/WebContentView.cpp | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Demos/WebView/WebContentClient.cpp b/Demos/WebView/WebContentClient.cpp index 0906edcaa1..03a6d3497f 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 0ac909865c..46a5b18e16 100644 --- a/Demos/WebView/WebContentView.cpp +++ b/Demos/WebView/WebContentView.cpp @@ -84,9 +84,11 @@ void WebContentView::notify_server_did_paint(Badge<WebContentClient>, i32 shbuf_ update(); } -void WebContentView::notify_server_did_invalidate_content_rect(Badge<WebContentClient>, const Gfx::IntRect& content_rect) +void WebContentView::notify_server_did_invalidate_content_rect(Badge<WebContentClient>, [[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(); } |