diff --git a/Libraries/LibWeb/WebDriver/Screenshot.cpp b/Libraries/LibWeb/WebDriver/Screenshot.cpp index 9c68bda7c53..76645121888 100644 --- a/Libraries/LibWeb/WebDriver/Screenshot.cpp +++ b/Libraries/LibWeb/WebDriver/Screenshot.cpp @@ -53,9 +53,9 @@ ErrorOr, WebDriver::Error> draw_boundi Gfx::IntRect paint_rect { rect.x(), rect.y(), paint_width, paint_height }; auto bitmap = MUST(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, canvas.surface()->size())); - canvas.surface()->read_into_bitmap(*bitmap); auto backing_store = Web::Painting::BitmapBackingStore(bitmap); browsing_context.page().client().paint(paint_rect.to_type(), backing_store); + canvas.surface()->write_from_bitmap(*bitmap); // 7. Return success with canvas. return canvas;