Bug 110110 - Add (#ifndef NDEBUG protected) level() method to Node and RenderObject
Summary: Add (#ifndef NDEBUG protected) level() method to Node and RenderObject
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Morten Stenshorne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-18 06:13 PST by Morten Stenshorne
Modified: 2013-02-19 22:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.54 KB, patch)
2013-02-18 07:49 PST, Morten Stenshorne
benjamin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Morten Stenshorne 2013-02-18 06:13:54 PST
These methods are useful during debugging, to quickly figure out how deep you are in a DOM or render tree.
Comment 1 Morten Stenshorne 2013-02-18 07:49:43 PST
Created attachment 188888 [details]
Patch
Comment 2 Benjamin Poulain 2013-02-18 15:15:43 PST
Comment on attachment 188888 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        These methods are useful to call from the debugger, to quickly figure out
> +        how deep you are in a DOM or render tree.
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        No new tests. This is debugging code.

I am not sure to understand how does that help debugging?

I have the feeling this could also be done through the debugging helpers instead of in-code.
Comment 3 Morten Stenshorne 2013-02-19 04:08:09 PST
Ah... good point. I'm used to this kind of functionality from Presto, but sure, I can write something nice for gdb instead. :)
Comment 4 Benjamin Poulain 2013-02-19 10:54:20 PST
Comment on attachment 188888 [details]
Patch

Clearing the review flag.

This may be of interest to you: http://trac.webkit.org/wiki/GDB
You can also extend Tools/gdb/webkit.py with the tools you find useful.

A version has been started for LLDB: lldb_webkit.py
Comment 5 Morten Stenshorne 2013-02-19 22:36:45 PST
Thanks. I know about and use Tools/gdb/webkit.py and maybe I'll contribute some day, if I ever start to feel confident enough with my skills in Python and its gdb module. :) Never tried lldb, clang and that stuff at all, but maybe I should.