RESOLVED FIXED 44736
Web Inspector: attribute nodes don't get rendered in the console
https://bugs.webkit.org/show_bug.cgi?id=44736
Summary Web Inspector: attribute nodes don't get rendered in the console
Ojan Vafai
Reported 2010-08-26 17:40:35 PDT
Created attachment 65652 [details] screenshot Type "document.createAttribute('id')" into the console. You get a blank line. You should get a node like any other node.
Attachments
screenshot (6.00 KB, image/png)
2010-08-26 17:40 PDT, Ojan Vafai
no flags
[PATCH] Print Out Attributes (11.53 KB, patch)
2010-08-26 21:05 PDT, Joseph Pecoraro
pfeldman: review+
[IMAGE] Results After Patch (80.65 KB, image/png)
2010-08-26 21:06 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2010-08-26 18:34:19 PDT
Thanks Ojan. Consider using the http://webkit.org/new-inspector-bug link, available on the Bugzilla "New Bug" page https://bugs.webkit.org/enter_bug.cgi
Joseph Pecoraro
Comment 2 2010-08-26 18:58:52 PDT
Looks like we don't support just printing an attribute in WebInspector.ElementsTreeElement.prototype._nodeTitleInfo. It should be added. case Node.ATTRIBUTE_NODE is missing from that long switch. http://trac.webkit.org/browser/trunk/WebCore/inspector/front-end/ElementsTreeOutline.js#L1253
Joseph Pecoraro
Comment 3 2010-08-26 21:05:44 PDT
Created attachment 65672 [details] [PATCH] Print Out Attributes Extends the console-format test to test for attributes. Image up soon.
Joseph Pecoraro
Comment 4 2010-08-26 21:06:07 PDT
Created attachment 65674 [details] [IMAGE] Results After Patch
Pavel Feldman
Comment 5 2010-08-27 00:29:33 PDT
Comment on attachment 65672 [details] [PATCH] Print Out Attributes Thanks for the test with this.
Ojan Vafai
Comment 6 2010-08-27 09:05:20 PDT
This is definitely an improvement, but it seems to me that we'd want to output an object in the same way we do with Elements so that you can inspect the attribute object. Is that possible?
Pavel Feldman
Comment 7 2010-08-27 09:10:44 PDT
(In reply to comment #6) > This is definitely an improvement, but it seems to me that we'd want to output an object in the same way we do with Elements so that you can inspect the attribute object. Is that possible? I am not sure I understand the request. Could you clarify?
Joseph Pecoraro
Comment 8 2010-08-27 09:41:30 PDT
(In reply to comment #6) > This is definitely an improvement, but it seems to me that we'd want to output > an object in the same way we do with Elements so that you can inspect the > attribute object. Is that possible? What more is there to inspect? The name / value are the important parts. Is there some more data we are missing? Also, if you do want to view everything use dir(). That will force a listing as an object tree, allowing you to see all properties / values / prototype chain.
Ojan Vafai
Comment 9 2010-08-27 13:51:49 PDT
Ugh. Nevermind me. I just wasn't thinking straight.
Joseph Pecoraro
Comment 10 2010-08-27 17:09:12 PDT
Committed r66282 M WebCore/ChangeLog M WebCore/inspector/front-end/ElementsTreeOutline.js M WebCore/inspector/front-end/DOMAgent.js M WebCore/inspector/InspectorDOMAgent.cpp M LayoutTests/inspector/console-format-expected.txt M LayoutTests/inspector/console-format.html M LayoutTests/ChangeLog r66282 = 67e7198a50637082bdc125592905a4afb8fdb9d1 (refs/remotes/trunk) http://trac.webkit.org/changeset/66282
Note You need to log in before you can comment on or make changes to this bug.