27. A first screenshot of our browser - WebKit porting to Mona OS

Finally I found a way to fetch a image buffer from WebKit. I was sure that Webkit was ready to draw, but it was really hard to find the point.
The code to draw is as following. The point is to pass GraphicsContext to FrameView::paint() function.

GraphicsContext context(cairo_create(surface));
frame_->view()->paint(&context, IntRect(0, 0, 400, 400));

// that's what I want!
unsigned char* p = cairo_image_surface_get_data(surface);

Of course the document to be shown should be loaded at this point. So we use FrameLoaderClient::dispatchDidFinishLoading event handler.
Here is a first screenshot of our browser. As you may know we haven't set up both Font and Image things. So we can display neither charcters nor images.

Do you see an empty window? No, it is an window whose background color is pink! The HTML source code is following.

<html><head><title>Hello</title></head><body bgcolor="#ffcccc"><h1>It works!</h1></body></html>

This is the first big step toward a modern browser on Mona.