From a7cb558783d01560149e0d7194e5c6c680f4db19 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 5 Jul 2022 23:09:26 +0200 Subject: [PATCH] Ladybird: Fix broken favicon conversion from Gfx::Bitmap to QPixmap --- Ladybird/WebView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Ladybird/WebView.cpp b/Ladybird/WebView.cpp index 073c4f6707c..4e5a64f4407 100644 --- a/Ladybird/WebView.cpp +++ b/Ladybird/WebView.cpp @@ -207,8 +207,7 @@ public: virtual void page_did_change_favicon(Gfx::Bitmap const& bitmap) override { - ByteBuffer bytebuffer = bitmap.serialize_to_byte_buffer(); - QPixmap icon = QPixmap::fromImage(QImage(bytebuffer.bytes().data(), bitmap.width(), bitmap.height(), QImage::Format_ARGB32)); + QPixmap icon = QPixmap::fromImage(QImage(bitmap.scanline_u8(0), bitmap.width(), bitmap.height(), bitmap.pitch(), QImage::Format_ARGB32)); emit m_view.favicon_changed(QIcon(icon)); }