Bug 174615

Summary: WebDriver: implement screen capture commands
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, buildbot, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 166679    
Attachments:
Description Flags
Patch
bburg: review+
Patch for landing
none
Patch for landing none

Description Carlos Garcia Campos 2017-07-18 00:31:04 PDT
https://www.w3.org/TR/webdriver/#screen-capture
Comment 1 Carlos Garcia Campos 2017-08-17 06:02:40 PDT
Created attachment 318355 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-08-17 06:05:42 PDT
hmm, it doesn't apply because it depends on patch attached to bug #175665. Maybe I can merge both patches/bugs since I ended up rewriting the takeScreenshot method.
Comment 3 BJ Burg 2017-08-18 12:19:42 PDT
Comment on attachment 318355 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318355&action=review

r=me

Please re-run through EWS.

> Source/WebKit/ChangeLog:16
> +        checkjed and passed to the web process.

Nit: checked

> Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:691
>      RefPtr<WebImage> image = page->scaledSnapshotWithOptions(snapshotRect, 1, SnapshotOptionsShareable);

We received a bug the other day that the scale factor should be inherited from the device. Right now, retina screenshots are at @1x and look blurry. But that's a separate bug.
Comment 4 Carlos Garcia Campos 2017-08-28 05:09:29 PDT
Created attachment 319175 [details]
Patch for landing
Comment 5 Carlos Garcia Campos 2017-08-28 05:33:18 PDT
Created attachment 319176 [details]
Patch for landing
Comment 6 Build Bot 2017-08-28 05:36:13 PDT
Attachment 319176 [details] did not pass style-queue:


ERROR: Source/WebDriver/Session.h:116:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.cpp:1514:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.cpp:1531:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.h:112:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/WebDriverService.h:113:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebDriver/Session.cpp:2000:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 6 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Carlos Garcia Campos 2017-08-28 06:55:24 PDT
Committed r221255: <http://trac.webkit.org/changeset/221255>
Comment 8 Radar WebKit Bug Importer 2017-08-28 06:56:01 PDT
<rdar://problem/34109485>