Bug 175665

Summary: Automation: takeScreenshot should use the visible content rect not the document rect
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch bburg: review+

Carlos Garcia Campos
Reported 2017-08-17 02:54:41 PDT
https://w3c.github.io/webdriver/webdriver-spec.html#dfn-draw-a-bounding-box-from-the-framebuffer 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.
Attachments
Patch (1.86 KB, patch)
2017-08-17 02:59 PDT, Carlos Garcia Campos
bburg: review+
Carlos Garcia Campos
Comment 1 2017-08-17 02:59:26 PDT
Blaze Burg
Comment 2 2017-08-18 12:13:48 PDT
Comment on attachment 318346 [details] Patch r=me I don't think there are any Selenium tests that cover interesting screenshot corner cases.
Carlos Garcia Campos
Comment 3 2017-08-19 00:54:51 PDT
(In reply to Brian Burg from comment #2) > Comment on attachment 318346 [details] > Patch > > r=me > > 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.
Carlos Garcia Campos
Comment 4 2017-08-28 05:32:48 PDT
Radar WebKit Bug Importer
Comment 5 2017-08-28 05:34:07 PDT
Note You need to log in before you can comment on or make changes to this bug.