Gecko:Debugging Tools: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(bz's notes on frame and reflow logs)
 
Line 13: Line 13:
<bz> That should work when called on any nsIFrame to dump the tree it belongs to
<bz> That should work when called on any nsIFrame to dump the tree it belongs to


== Printing nsIAtoms ==
  def satom
    p *((class nsStaticAtomWrapper*)$arg0)->mStaticAtom
  end
<bz> to be used as: ''satom content->Tag()'' or ''satom frame->GetType()''
<bz> for nsGkAtoms it'll work great


== Reflow Logs ==
== Reflow Logs ==


See [[http://www.mozilla.org/newlayout/doc/frame_reflow_debug.html Debugging Frame Reflow]]
See [[http://www.mozilla.org/newlayout/doc/frame_reflow_debug.html Debugging Frame Reflow]]

Revision as of 03:38, 14 July 2007

Frame Tree Dump

<bz> for a frame dump, you can use the layout debugger, or... if you're in a debugger and want to examine the tree, you can do

def frametree
  set $r = ($arg0)->PresContext()->GetPresShell()->GetRootFrame()
  if ($r)
    call ((class nsIFrameDebug*)(class ViewportFrame*)$r)->List(stderr, 2)
  end
end


<bz> That should work when called on any nsIFrame to dump the tree it belongs to


Printing nsIAtoms

 def satom
   p *((class nsStaticAtomWrapper*)$arg0)->mStaticAtom
 end

<bz> to be used as: satom content->Tag() or satom frame->GetType()

<bz> for nsGkAtoms it'll work great

Reflow Logs

See [Debugging Frame Reflow]