Bug 155349

Summary: Web Automation: add commands to move and resize a browsing context's window
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 155323    
Bug Blocks:    
Attachments:
Description Flags
Proposed Fix timothy: review+, bburg: commit-queue-

Description BJ Burg 2016-03-10 22:52:22 PST
.
Comment 1 Radar WebKit Bug Importer 2016-03-10 22:52:47 PST
<rdar://problem/25104911>
Comment 2 BJ Burg 2016-03-12 00:43:37 PST
Created attachment 273822 [details]
Proposed Fix
Comment 3 Timothy Hatcher 2016-03-12 09:37:06 PST
Comment on attachment 273822 [details]
Proposed Fix

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

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:231
> +    if (!sizeObject.getDouble(WTF::ASCIILiteral("width"), width))

Why is there no specific protocol object for these?

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:268
> +    if (!positionObject.getDouble(WTF::ASCIILiteral("x"), x))

Ditto.
Comment 4 BJ Burg 2016-03-13 15:09:55 PDT
Comment on attachment 273822 [details]
Proposed Fix

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

>> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:231
>> +    if (!sizeObject.getDouble(WTF::ASCIILiteral("width"), width))
> 
> Why is there no specific protocol object for these?

There is, but the C++ protocol bindings do not perform checks / type casts for incoming messages like the ObjC bindings do. We rely on each command to do the verification (though in debug builds we go most of the way and assert if required keys are missing). There is a bug open somewhere about fixing this. It's likely to find some wrong and/or missing checks.
Comment 5 BJ Burg 2016-03-28 15:35:54 PDT
Committed https://trac.webkit.org/r198760.