Improve frame tree output for nsContainerFrame and nsBlockFrame
Categories
(Core :: Layout, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(5 files)
I notice this while debugging bug 1422908.
Given the following snippet,
<fieldset style="position: relative; display: flex">
<div style="position: absolute">
the frame tree output looks like:
FieldSet(fieldset)(8)@7f0e4dc6e508 parent=7f0e4dc6db88 ... <
FlexContainer(fieldset)(8)@7f0e4dc6e5c0 parent=7f0e4dc6e508 ... <
Placeholder(div)(1)@7f0e4dc6e738 parent=7f0e4dc6e5c0 ...
>
AbsoluteList 7f0e4c5eb940 <
Block(div)(1)@7f0e4dc6e670 parent=7f0e4dc6e5c0 ... <
>
>
>
The AbsoluteList
indentation makes the tree look as if Block
's parent is FieldSet
, but by looking at the parent pointer, its parent is FlexContainer
I think the frame tree can be easier to understand by tweaking the indentation as follows. This might help diagnose bugs related to the correctness of frame tree structure like bug 1422908.
FieldSet(fieldset)(8)@7f0e4dc6e508 parent=7f0e4dc6db88 ... <
FlexContainer(fieldset)(8)@7f0e4dc6e5c0 parent=7f0e4dc6e508 ... <
Placeholder(div)(1)@7f0e4dc6e738 parent=7f0e4dc6e5c0 ...
AbsoluteList 7f0e4c5eb940 <
Block(div)(1)@7f0e4dc6e670 parent=7f0e4dc6e5c0 ... <
>
>
>
>
Assignee | ||
Comment 1•4 years ago
|
||
ListChildLists
lives in nsContainerFrame because I'm going to use it
to improve nsContainerFrame::List() in a later patch.
Assignee | ||
Comment 2•4 years ago
|
||
Make the following tweak so that they are consistent with others.
-
Add a space before the open angle bracket. This is at the end of
Block(div)(1)@7f10e25de5d0 ... <
-
Tweak nsLineBox format.
line 7f10e25de808: count=1
becomesline@7f10e25de808 count=1
. -
Tweak child list format.
AbsoluteList 0x7f10e3c7e560
becomesAbsoluteList@7f10e3c7e560
Depends on D82602
Assignee | ||
Comment 3•4 years ago
|
||
This affects the output of flex, grid, fieldset, etc.
Given a snippet like the following.
<fieldset style="position: relative; display: flex">
<div style="position: absolute">
Currently, the frame tree output looks as if the AbsoluteList is under
the FieldSet, but it's actually under the FlexContainer.
FieldSet(fieldset)(8)@7f4ae9e73508 ... <
FlexContainer(fieldset)(8)@7f4ae9e735c0 ... <
Placeholder(div)(1)@7f4ae9e73738
>
AbsoluteList 7f4ae9dcb8c0 <
Block(div)(1)@7f4ae9e73670 ... <
>
>
>
After this patch, the frame tree looks like:
FieldSet(fieldset)(8)@7f4ae9e73508 ... <
FlexContainer(fieldset)(8)@7f4ae9e735c0 ... <
Placeholder(div)(1)@7f4ae9e73738
AbsoluteList 7f4ae9dcb8c0 <
Block(div)(1)@7f4ae9e73670 ... <
>
>
>
>
Another minor difference is that for a empty container, the end angle
bracket now on its own line, which is consistent with an empty block
frame's output.
This old output
FlexContainer(div)(4)@7f4ae9e73390<>
becomes
FlexContainer(div)(4)@7f4ae9e73390<
>
Depends on D82603
Assignee | ||
Comment 4•4 years ago
|
||
This is equivalent to aFrame->DumpFrameTreeLimited(). It appears only in
nsIFrame.cpp, I doubt it's actually used by developers.
Depends on D82604
Assignee | ||
Comment 5•4 years ago
|
||
Per discussion on matrix, printing mState in hex format is
indecipherable. Remove it to reduce the rate of wrapping of a long line.
Depends on D82605
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9e09edf99e06
https://hg.mozilla.org/mozilla-central/rev/370031d45dbe
https://hg.mozilla.org/mozilla-central/rev/79de4b2b113b
https://hg.mozilla.org/mozilla-central/rev/be12ad6f0206
https://hg.mozilla.org/mozilla-central/rev/c102a48a9911
Description
•