I'm looking for the same opportunity as you! The closest I found is the DumpRenderTree tool that comes with the source of the Webkit engine.
DumpRenderTree
I haven't used it yet since I was unable to compile webkit. But I saw examples of its output:
Content-Type: text/plain
layer at (0,0) size 808x820
RenderView at (0,0) size 800x600
layer at (0,0) size 800x820
RenderBlock {HTML} at (0,0) size 800x820
RenderBody {BODY} at (8,8) size 784x804
RenderHTMLCanvas {CANVAS} at (0,0) size 800x800 [bgcolor=#808080]
RenderText {#text} at (0,0) size 0x0
, ,
, .