mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1627398 Part 5 - Support dumping frame trees in CSS pixels for gdb and lldb. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D69918 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
fc904d6c63
commit
b0af8afd5e
8
.gdbinit
8
.gdbinit
@ -187,8 +187,16 @@ define ft
|
||||
call $arg0->DumpFrameTree()
|
||||
end
|
||||
|
||||
define ftp
|
||||
call $arg0->DumpFrameTreeInCSSPixels()
|
||||
end
|
||||
|
||||
define ftl
|
||||
call $arg0->DumpFrameTreeLimited()
|
||||
end
|
||||
|
||||
define ftlp
|
||||
call $arg0->DumpFrameTreeLimitedInCSSPixels()
|
||||
end
|
||||
|
||||
source .gdbinit_python
|
||||
|
@ -8243,7 +8243,14 @@ void nsIFrame::DumpFrameTree() const {
|
||||
PresShell()->GetRootFrame()->List(stderr);
|
||||
}
|
||||
|
||||
void nsIFrame::DumpFrameTreeInCSSPixels() const {
|
||||
PresShell()->GetRootFrame()->List(stderr, "", ListFlag::DisplayInCSSPixels);
|
||||
}
|
||||
|
||||
void nsIFrame::DumpFrameTreeLimited() const { List(stderr); }
|
||||
void nsIFrame::DumpFrameTreeLimitedInCSSPixels() const {
|
||||
List(stderr, "", ListFlag::DisplayInCSSPixels);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -4762,11 +4762,13 @@ class nsIFrame : public nsQueryFrame {
|
||||
* Dump the frame tree beginning from the root frame.
|
||||
*/
|
||||
void DumpFrameTree() const;
|
||||
void DumpFrameTreeInCSSPixels() const;
|
||||
|
||||
/**
|
||||
* Dump the frame tree beginning from ourselves.
|
||||
*/
|
||||
void DumpFrameTreeLimited() const;
|
||||
void DumpFrameTreeLimitedInCSSPixels() const;
|
||||
|
||||
virtual nsresult GetFrameName(nsAString& aResult) const = 0;
|
||||
#endif
|
||||
|
@ -9,11 +9,22 @@ def frametree(debugger, command, result, dict):
|
||||
debugger.HandleCommand('expr (' + command + ')->DumpFrameTree()')
|
||||
|
||||
|
||||
def frametree_pixels(debugger, command, result, dict):
|
||||
"""Dumps the frame tree containing the given nsIFrame* in CSS pixels."""
|
||||
debugger.HandleCommand('expr (' + command + ')->DumpFrameTreeInCSSPixels()')
|
||||
|
||||
|
||||
def frametreelimited(debugger, command, result, dict):
|
||||
"""Dumps the subtree of a frame tree rooted at the given nsIFrame*."""
|
||||
debugger.HandleCommand('expr (' + command + ')->DumpFrameTreeLimited()')
|
||||
|
||||
|
||||
def frametreelimited_pixels(debugger, command, result, dict):
|
||||
"""Dumps the subtree of a frame tree rooted at the given nsIFrame*
|
||||
in CSS pixels."""
|
||||
debugger.HandleCommand('expr (' + command + ')->DumpFrameTreeLimitedInCSSPixels()')
|
||||
|
||||
|
||||
def pstate(debugger, command, result, dict):
|
||||
"""Displays a frame's state bits symbolically."""
|
||||
debugger.HandleCommand('expr mozilla::PrintFrameState(' + command + ')')
|
||||
@ -21,9 +32,16 @@ def pstate(debugger, command, result, dict):
|
||||
|
||||
def init(debugger):
|
||||
debugger.HandleCommand('command script add -f lldbutils.layout.frametree frametree')
|
||||
debugger.HandleCommand(
|
||||
'command script add -f lldbutils.layout.frametree_pixels frametree_pixels')
|
||||
debugger.HandleCommand(
|
||||
"command script add -f lldbutils.layout.frametreelimited frametreelimited"
|
||||
)
|
||||
debugger.HandleCommand(
|
||||
"command script add -f lldbutils.layout.frametreelimited_pixels frametreelimited_pixels"
|
||||
)
|
||||
debugger.HandleCommand('command alias ft frametree')
|
||||
debugger.HandleCommand('command alias ftp frametree_pixels')
|
||||
debugger.HandleCommand('command alias ftl frametreelimited')
|
||||
debugger.HandleCommand('command alias ftlp frametreelimited_pixels')
|
||||
debugger.HandleCommand('command script add -f lldbutils.layout.pstate pstate')
|
||||
|
Loading…
Reference in New Issue
Block a user