Bug 1959646 - Add zero-parameter overloads for dumping frame trees. r=layout-reviewers,emilio
This patch adds zero-parameter overloads for `DumpFrameTree()` and `DumpFrameTreeInCSSPixels()`, making it easier to call these functions in the debugger without having to pass `false` as an argument. Additionally, this patch reverts bug 1959538 since that change [1] is no longer needed with these new overloads. [1]https://hg.mozilla.org/mozilla-central/rev/7371d5813735 Differential Revision: https://phabricator.services.mozilla.com/D245155
This commit is contained in:
@@ -192,11 +192,11 @@ define ct
|
|||||||
end
|
end
|
||||||
|
|
||||||
define ft
|
define ft
|
||||||
call $arg0->DumpFrameTree(false)
|
call $arg0->DumpFrameTree()
|
||||||
end
|
end
|
||||||
|
|
||||||
define ftp
|
define ftp
|
||||||
call $arg0->DumpFrameTreeInCSSPixels(false)
|
call $arg0->DumpFrameTreeInCSSPixels()
|
||||||
end
|
end
|
||||||
|
|
||||||
define ftl
|
define ftl
|
||||||
|
|||||||
@@ -8954,6 +8954,8 @@ nsresult nsIFrame::MakeFrameName(const nsAString& aType,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nsIFrame::DumpFrameTree() const { DumpFrameTree(false); }
|
||||||
|
|
||||||
void nsIFrame::DumpFrameTree(bool aListOnlyDeterministic) const {
|
void nsIFrame::DumpFrameTree(bool aListOnlyDeterministic) const {
|
||||||
ListFlags flags;
|
ListFlags flags;
|
||||||
if (aListOnlyDeterministic) {
|
if (aListOnlyDeterministic) {
|
||||||
@@ -8962,6 +8964,10 @@ void nsIFrame::DumpFrameTree(bool aListOnlyDeterministic) const {
|
|||||||
PresShell()->GetRootFrame()->List(stderr, "", flags);
|
PresShell()->GetRootFrame()->List(stderr, "", flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nsIFrame::DumpFrameTreeInCSSPixels() const {
|
||||||
|
DumpFrameTreeInCSSPixels(false);
|
||||||
|
}
|
||||||
|
|
||||||
void nsIFrame::DumpFrameTreeInCSSPixels(bool aListOnlyDeterministic) const {
|
void nsIFrame::DumpFrameTreeInCSSPixels(bool aListOnlyDeterministic) const {
|
||||||
ListFlags flags{ListFlag::DisplayInCSSPixels};
|
ListFlags flags{ListFlag::DisplayInCSSPixels};
|
||||||
if (aListOnlyDeterministic) {
|
if (aListOnlyDeterministic) {
|
||||||
|
|||||||
@@ -5636,8 +5636,10 @@ class nsIFrame : public nsQueryFrame {
|
|||||||
/**
|
/**
|
||||||
* Dump the frame tree beginning from the root frame.
|
* Dump the frame tree beginning from the root frame.
|
||||||
*/
|
*/
|
||||||
void DumpFrameTree(bool aListOnlyDeterministic = false) const;
|
void DumpFrameTree() const;
|
||||||
void DumpFrameTreeInCSSPixels(bool aListOnlyDeterministic = false) const;
|
void DumpFrameTree(bool aListOnlyDeterministic) const;
|
||||||
|
void DumpFrameTreeInCSSPixels() const;
|
||||||
|
void DumpFrameTreeInCSSPixels(bool aListOnlyDeterministic) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dump the frame tree beginning from ourselves.
|
* Dump the frame tree beginning from ourselves.
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
def frametree(debugger, command, result, dict):
|
def frametree(debugger, command, result, dict):
|
||||||
"""Dumps the frame tree containing the given nsIFrame*."""
|
"""Dumps the frame tree containing the given nsIFrame*."""
|
||||||
debugger.HandleCommand("expr (" + command + ")->DumpFrameTree(false)")
|
debugger.HandleCommand("expr (" + command + ")->DumpFrameTree()")
|
||||||
|
|
||||||
|
|
||||||
def frametree_pixels(debugger, command, result, dict):
|
def frametree_pixels(debugger, command, result, dict):
|
||||||
"""Dumps the frame tree containing the given nsIFrame* in CSS pixels."""
|
"""Dumps the frame tree containing the given nsIFrame* in CSS pixels."""
|
||||||
debugger.HandleCommand("expr (" + command + ")->DumpFrameTreeInCSSPixels(false)")
|
debugger.HandleCommand("expr (" + command + ")->DumpFrameTreeInCSSPixels()")
|
||||||
|
|
||||||
|
|
||||||
def frametreelimited(debugger, command, result, dict):
|
def frametreelimited(debugger, command, result, dict):
|
||||||
|
|||||||
Reference in New Issue
Block a user