Summary: | Web Inspector: getAttributes should work on a single node, not array. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pavel Feldman <pfeldman> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Pavel Feldman <pfeldman> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Pavel Feldman
2011-08-19 03:15:54 PDT
Created attachment 104483 [details]
Patch
Attachment 104483 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/inspector/InspectorDOMAgent.cpp:1083: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorDOMAgent.h:131: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5]
Total errors found: 2 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 104483 [details] Patch One comment, otherwise looks good. View in context: https://bugs.webkit.org/attachment.cgi?id=104483&action=review > Source/WebCore/inspector/Inspector.json:1064 > + { "name": "nodeId", "type": "integer", "description": "Ids of the nodes to retrieve attibutes for." } Ids of the nodes -> Id of the node Comment on attachment 104483 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104483&action=review >> Source/WebCore/inspector/InspectorDOMAgent.cpp:1083 >> +void InspectorDOMAgent::getAttributes(ErrorString* errorString, int nodeId, RefPtr<InspectorArray>* result) > > The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] We should file a bug about check-webkit-style not understanding RefPtr out-parameters. > Source/WebCore/inspector/front-end/DOMAgent.js:463 > - var nodeIds = []; > for (var nodeId in this._attributeLoadNodeIds) > - nodeIds.push(Number(nodeId)); > - DOMAgent.getAttributes(nodeIds, this._wrapClientCallback(callback.bind(this))); > + DOMAgent.getAttributes(parseInt(nodeId), this._wrapClientCallback(callback.bind(this, nodeId))); Presumably this is worse from an efficiency standpoint. Hopefully it won't matter in practice. Committed r93398: <http://trac.webkit.org/changeset/93398> |