Bug 155349 - Web Automation: add commands to move and resize a browsing context's window
Summary: Web Automation: add commands to move and resize a browsing context's window
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on: 155323
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 22:52 PST by BJ Burg
Modified: 2016-03-28 15:35 PDT (History)
7 users (show)

See Also:


Attachments
Proposed Fix (9.29 KB, patch)
2016-03-12 00:43 PST, BJ Burg
timothy: review+
bburg: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.