Bug 112911 - Web Inspector: generalize InspectorDOMAgent::highlightRect() to highlightQuad()
Summary: Web Inspector: generalize InspectorDOMAgent::highlightRect() to highlightQuad()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks: 112919
  Show dependency treegraph
 
Reported: 2013-03-21 06:58 PDT by Andrey Kosyakov
Modified: 2013-03-29 02:25 PDT (History)
12 users (show)

See Also:


Attachments
Patch (14.44 KB, patch)
2013-03-21 07:05 PDT, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2013-03-21 06:58:51 PDT
We need to highlight paint in transformed layers, so paint rectangles would become quads. This generalizes existing highlight for rectangles to handle quads.
Comment 1 Andrey Kosyakov 2013-03-21 07:05:14 PDT
Created attachment 194255 [details]
Patch
Comment 2 Timothy Hatcher 2013-03-21 08:16:17 PDT
Comment on attachment 194255 [details]
Patch

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

> Source/WebCore/inspector/Inspector.json:1779
> +                "id": "Quad",
> +                "type": "array",
> +                "items": { "type": "number" },
> +                "minItems": 8,
> +                "maxItems": 8,
> +                "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise."

An 4 item array of point objects with x and y properties would be more clear.
Comment 3 Pavel Feldman 2013-03-28 05:33:54 PDT
Comment on attachment 194255 [details]
Patch

As per Timothy's comment.
Comment 4 Andrey Kosyakov 2013-03-28 05:51:08 PDT
Comment on attachment 194255 [details]
Patch

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

>> Source/WebCore/inspector/Inspector.json:1779
>> +                "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise."
> 
> An 4 item array of point objects with x and y properties would be more clear.

This is used in entries that are quite frequent (and will perhaps be used even more), so we're trying to save a few bytes on both protocol message and timeline log sizes, as well as use representation that would hopefully be marginally cheaper for VM. On the other hand, there will be almost no access to Quad member in the front-end code, except for length/width calculation, so most of the time it will be treated as opaque object passed to highlightQuad.
Comment 5 Andrey Kosyakov 2013-03-28 05:51:50 PDT
(In reply to comment #3)
> (From update of attachment 194255 [details])
> As per Timothy's comment.

As discussed offline, this is motivated mostly by performance concerns.
Comment 6 Andrey Kosyakov 2013-03-29 02:25:09 PDT
Committed r147202: <http://trac.webkit.org/changeset/147202>