Bug 155841 - Web Automation: Add commands to compute layout of an element
Summary: Web Automation: Add commands to compute layout of an element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-24 10:10 PDT by Timothy Hatcher
Modified: 2016-03-28 09:42 PDT (History)
7 users (show)

See Also:


Attachments
Patch (16.39 KB, patch)
2016-03-24 10:16 PDT, Timothy Hatcher
bburg: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2016-03-24 10:10:42 PDT
We need a rect and to be able to scroll the element into view first.
Comment 1 Radar WebKit Bug Importer 2016-03-24 10:10:58 PDT
<rdar://problem/25340075>
Comment 2 Timothy Hatcher 2016-03-24 10:16:31 PDT
Created attachment 274840 [details]
Patch
Comment 3 BJ Burg 2016-03-25 17:03:56 PDT
Comment on attachment 274840 [details]
Patch

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

r=me

> Source/WebKit2/UIProcess/Automation/Automation.json:256
> +                { "name": "useViewportCoordinates", "optional": true, "type": "boolean", "description": "If the result coordinates should be represented as viewport coordinates or not. Defaults to false, which is means coordinates should be represented as page coordinates." }

Grammar: 'which is means'

For the JSON protocol, I would prefer that this be non-optional and take an enum { PageCoordinates, ViewCoordinates }. It doesn't matter as much for the WK2 message.

> Source/WebKit2/WebProcess/Automation/WebAutomationSessionProxy.cpp:415
> +        String frameNotFoundErrorType = Inspector::Protocol::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::FrameNotFound);

You can pull these error constants out to the top scope.
Comment 4 Timothy Hatcher 2016-03-28 09:42:14 PDT
https://trac.webkit.org/r198739