We should take the document rectangle and draw it with the current viewport width and height. If I understand the spec correctly we should use the document rectangle coordinates, but that's not what chromium and firefox do, they take the screenshot of the visible area.
Created attachment 318346 [details]
Comment on attachment 318346 [details]
I don't think there are any Selenium tests that cover interesting screenshot corner cases.
(In reply to Brian Burg from comment #2)
> Comment on attachment 318346 [details]
> I don't think there are any Selenium tests that cover interesting screenshot
> corner cases.
Right, they just check the commands return any data. I did several manual tests comparing with firefox and chrome.
Committed r221246: <http://trac.webkit.org/changeset/221246>