Bug 86108 - Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
Summary: Web Inspector: [Extensions API] add audit formatters for remote objects and D...
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:
 
Reported: 2012-05-10 10:28 PDT by Andrey Kosyakov
Modified: 2012-05-11 01:38 PDT (History)
11 users (show)

See Also:


Attachments
Patch (10.50 KB, patch)
2012-05-10 23:46 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 2012-05-10 10:28:41 PDT
This adds two new audit formatters that take an expression to evaluate in the context of the inspected page and format the result either as an object or a DOM element tree.
Comment 1 Andrey Kosyakov 2012-05-10 23:46:11 PDT
Created attachment 141334 [details]
Patch
Comment 2 Pavel Feldman 2012-05-11 00:43:03 PDT
Comment on attachment 141334 [details]
Patch

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

> Source/WebCore/inspector/front-end/AuditFormatters.js:101
> +    object: function(expression, title)

You should start annotating your code.

> Source/WebCore/inspector/front-end/AuditFormatters.js:115
> +    node: function(expression)

ditto

> Source/WebCore/inspector/front-end/AuditFormatters.js:118
> +        function onNodeAvailable(nodeId)

Annotate please

> Source/WebCore/inspector/front-end/AuditFormatters.js:122
> +            if (!treeOutline.children[0].hasChildren)

I don't think we need it, if we do, this code should be in the elements tree outline.

> Source/WebCore/inspector/front-end/AuditFormatters.js:126
> +        function onEvaluate(remoteObject)

Annotate please

> Source/WebCore/inspector/front-end/AuditFormatters.js:136
> +    evaluate: function(expression, callback)

Annotate please

> Source/WebCore/inspector/front-end/AuditFormatters.js:138
> +        function onEvaluate(error, result, wasThrown)

Annotate please

> LayoutTests/inspector/extensions/extensions-audits-expected.txt:36
> +             =รข"

Consider filtering out zero-with whitespaces from the output.

> LayoutTests/inspector/extensions/extensions-audits-tests.js:23
> +            InspectorTest.runAfterPendingDispatches(function() {

See the way it is implemented in elements-tests.js
Comment 3 Andrey Kosyakov 2012-05-11 01:38:15 PDT
Committed r116739: <http://trac.webkit.org/changeset/116739>