Bug 86450 - showNodePath will be useful for debugging purpose.
Summary: showNodePath will be useful for debugging purpose.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-15 00:44 PDT by Shinya Kawanaka
Modified: 2012-05-17 02:02 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.33 KB, patch)
2012-05-15 04:17 PDT, Takashi Sakamoto
no flags Details | Formatted Diff | Diff
Patch (4.32 KB, patch)
2012-05-15 19:06 PDT, Takashi Sakamoto
no flags Details | Formatted Diff | Diff
Patch (4.48 KB, patch)
2012-05-15 23:28 PDT, Takashi Sakamoto
no flags Details | Formatted Diff | Diff
Patch for landing (4.46 KB, patch)
2012-05-17 00:20 PDT, Takashi Sakamoto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shinya Kawanaka 2012-05-15 00:44:46 PDT
showTree(node) is useful, but it often outputs too much.
For printf-style debugging, it would be useful to have much less information.
For example, showNodePath which outputs something like an XPath will be useful.
Comment 1 Shinya Kawanaka 2012-05-15 01:38:42 PDT
Maybe tasak@ will work for this.
Comment 2 Takashi Sakamoto 2012-05-15 04:17:51 PDT
Created attachment 141913 [details]
Patch
Comment 3 Shinya Kawanaka 2012-05-15 18:38:44 PDT
Comment on attachment 141913 [details]
Patch

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

> Source/WebCore/dom/Node.cpp:2242
> +            fprintf(stderr, "/#shadow-root");

Maybe you can continue here?

> Source/WebCore/dom/Node.cpp:2247
> +            CString idname;

Where is this used?
Comment 4 Takashi Sakamoto 2012-05-15 19:06:44 PDT
Created attachment 142127 [details]
Patch
Comment 5 Takashi Sakamoto 2012-05-15 19:08:08 PDT
(In reply to comment #3)
> (From update of attachment 141913 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=141913&action=review
> 
> > Source/WebCore/dom/Node.cpp:2242
> > +            fprintf(stderr, "/#shadow-root");
> 
> Maybe you can continue here?

Yes. Done.

> 
> > Source/WebCore/dom/Node.cpp:2247
> > +            CString idname;
> 
> Where is this used?

I removed.
Comment 6 Hajime Morrita 2012-05-15 21:47:40 PDT
Comment on attachment 142127 [details]
Patch

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

Please take care of of ShadowRoot, please...

> Source/WebCore/dom/Node.cpp:2234
> +    while (index) {

Let's loop with for() if there is no specific reason.
Comment 7 Takashi Sakamoto 2012-05-15 23:28:57 PDT
Created attachment 142163 [details]
Patch
Comment 8 Takashi Sakamoto 2012-05-17 00:20:27 PDT
Created attachment 142430 [details]
Patch for landing
Comment 9 WebKit Review Bot 2012-05-17 02:02:37 PDT
Comment on attachment 142430 [details]
Patch for landing

Clearing flags on attachment: 142430

Committed r117417: <http://trac.webkit.org/changeset/117417>
Comment 10 WebKit Review Bot 2012-05-17 02:02:41 PDT
All reviewed patches have been landed.  Closing bug.