Mozilla Layout Classes: nsIFrame class hierarchy

The Mozilla layout code uses frame objects to lay out the DOM on the screen. (These are entirely different from &lt:frame> nodes in the DOM). All Mozilla frames inherit from a single C++ abstract class nsIFrame. As part of a project I’m working on to separate the frame classes from XPCOM, I used dehydra to generate a graph of all the frame types in Mozilla.

See the graph in SVG format.

What I really want for Christmas is a web-based interactive graph viewer for this type of content. I’ve seen a couple closed-source things in Java, but nothing really exciting or hackable.

Note: Viewing this graph in Safari won’t work, because the image is much larger than a single screen, and Safari doesn’t provide scrollbars for SVG that overflows… feel free to download it and view in inkscape, though, or get Firefox!.

Atom Feed for Comments 5 Responses to “Mozilla Layout Classes: nsIFrame class hierarchy”

  1. AndersH Says:

    It seems as if multiple inheritance aren’t used, so why not just show the tree as a nested list? It would probably take up less space that way.

  2. NOSE Takafumi » nsIFrameを継承しているクラスの階層図 Says:

    […] Benjamin Smedberg氏のブログで、nsIFrameを継承したクラスの階層をSVGで表現した図が公開されている。WebKit系で大きなSVGを表示してもスクロールバーが出ないのね…。今はGoogle Chromeを常用しているので面喰った。 […]

  3. stelt Says:

    Opera also provides scrollbars on the SVG

  4. David Bolter Says:

    I agree, it would be super awesome to have some zoom-in zoom-out views of the sizeable mozilla codebase. BTW, I find these kinds of posts very helpful, keep ’em coming and thanks!

  5. Kjell Says:

    Have you tried graphviz? There are a lot of tools for transforming or viewing graphs. http://www.graphviz.org/Resources.php
    Especially webdot might be what you are looking for: http://www.graphviz.org/webdot/
    Also, if I remember correct, doxygen together with dot is able to generate graphs that expand or collapse when clicking on nodes.

Leave a Reply