Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty print the flow tree #12675

Closed
shinglyu opened this issue Aug 1, 2016 · 49 comments
Closed

Pretty print the flow tree #12675

shinglyu opened this issue Aug 1, 2016 · 49 comments

Comments

@shinglyu
Copy link
Member

@shinglyu shinglyu commented Aug 1, 2016

When running ./mach run -Z dump-flow-tree, the output is not very human friendly:

│  │  │  ├─ block(7fbf47f05310) sc=stackingcontextid(140459643095216) pos=logicalrect(h ltr, i100px×b100px, @ (i8px,b18.783333333333335px)),  floatspec-in=l 0px r 0px, floatspec-out=l 0px r 0px, overflow=overflow { scroll: rect(100px×100px at (0px,0px)), paint: rect(100px×100px at (0px,0px)) }
│  │  │  │  └─ ↑↑ fragment for block: specificfragmentinfo::generic(4) [] border_box=logicalrect(h ltr, i100px×b100px, @ (i0px,b0px)) damage=store_overflow
│  │  │  ├─ flexflow { block_flow: block(7fbf47fe9310) sc=stackingcontextid(0) pos=logicalrect(h ltr, i10px×b100px, @ (i8px,b34.78333333333333px)),  floatspec-in=l 0px r 0px, ...

We can try to wrap the lines like

│  │  │  ├─ block(7fbf47f05310) sc=stackingcontextid(140459643095216) 
│  │  │  │  │                   pos=logicalrect(h ltr, i100px×b100px, @ (i8px,b18.783333333333335px)),  
│  │  │  │  │                   floatspec-in=l 0px r 0px, 
│  │  │  │  │                   floatspec-out=l 0px r 0px, 
│  │  │  │  │                   overflow=overflow { scroll: rect(100px×100px at (0px,0px)), 
│  │  │  │  │                   paint: rect(100px×100px at (0px,0px)) }
│  │  │  │  └─ ↑↑ fragment for block: specificfragmentinfo::generic(4) [] border_box=logicalrect(h ltr i100px×b100px, @ (i0px,b0px)) 
│  │  │  │                                                                damage=store_overflow

I'm not sure if we should hack the Debug::fmt trait or create a post-processor. The problem with Debug::fmt is that it's hard to keep the indentation level. But doing a post process will require us to keep the Debug::fmt and the post postprocessor format in sync.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 1, 2016

Or maybe we should make Debug::fmt print a machine readable format, then we add some formatter in the mach to print it out in plain text. This would help if we want to create GUI debugging tools for layout in the future.

@izgzhen
Copy link
Contributor

@izgzhen izgzhen commented Aug 1, 2016

+1 for post-processor. Or maybe render it into some HTML-formatted page? so we can let browser to handle indentation etc.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 12, 2016

@glennw Do you have any opinion on this? I heard that you are the last one who worked on this recently.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 17, 2016

Here are some survey of existing layout debugging tools:

Gecko's ./mach run -layoutdebug
selection_030

Frame Tree Dump format:

...
                line 7f0626777020: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:leftbr+rightbr,after:nobr[0xa108] {900,182899,0,0} <
                  TableWrapper(_moz_generated_content_after)(-1)@7f0626776240 {900,182899,0,0} [state=0000000000000240] [content=7f061aee8a10] [sc=7f06267764e8:-moz-table-wrapper^7f0628044cc8^7f061aef6778^7f061aef5240]<
                    Table(_moz_generated_content_after)(-1)@7f06267762c0 {0,0,0,0} [state=0000100000000040] [content=7f061aee8a10] [sc=7f0628044cc8:after^7f061aef6778^7f061aef5240^7f0627b11e48]<
                      TableRowGroup(_moz_generated_content_after)(-1)@7f06267763d0 {0,0,0,0} [state=0000000000000040] [content=7f061aee8a10] [sc=7f061e0d36d8:-moz-table-row-group]<
                        TableRow(_moz_generated_content_after)(-1)@7f0626776450 {0,0,0,0} [state=0000000000000040] [content=7f061aee8a10] [sc=7f061e0a9690:-moz-table-row]<
                          TableCell(_moz_generated_content_after)(-1)@7f0626776590 {0,0,0,0} [state=0000000080000040] [content=7f061aee8a10] [sc=7f061d940368:-moz-table-cell]<
                            Block(_moz_generated_content_after)(-1)@7f0626776940 {0,0,0,0} [state=0000000000d00040] [content=7f061aee8a10] [sc=7f0628068728:-moz-cell-content]<
                              line 7f0626776a48: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x300] {0,0,0,0} <
                                Text(0)" "@7f06267769d8 {0,0,0,0} [state=4000000028600040] [content=7f061aee8aa0] [sc=7f06240eda20:-moz-text^7f0628044cc8^7f061aef6778^7f061aef5240] [run=7f061bf88d00][0,1,T] 
                              >
                            >
                          >
                        >
                      >
                    >
                    ColGroupList 7f0626776398 <
                      TableColGroup(_moz_generated_content_after)(-1)@7f0626776b48 {0,0,0,0} [state=0000000080000040] [content=7f061aee8a10] [sc=7f06280b7e00:-moz-table-column-group]<
                        TableCol(_moz_generated_content_after)(-1)@7f0626776c70 {0,0,0,0} [state=0000000030000040] [content=7f061aee8a10] [sc=7f061e0a9bf8:-moz-table-column]
                      >
                    >
                  >
                >
              >
            >
          >
        >
      >
    >
  >
>
@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 17, 2016

WebKit has a specialized test client called DumpRenderTree, which is like a headless browser which dumps the render tree for layout testing.

The output looks like this:

Content-Type: text/plain
layer at (0,0) size 808x820
  RenderView at (0,0) size 800x600
layer at (0,0) size 800x820
  RenderBlock {HTML} at (0,0) size 800x820
    RenderBody {BODY} at (8,8) size 784x804
      RenderHTMLCanvas {CANVAS} at (0,0) size 800x800 [bgcolor=#808080]
      RenderText {#text} at (0,0) size 0x0
#EOF
#EOF

Ref: https://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree#

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 17, 2016

Both tools dumps the tree in plain text, which is console-friendly but not optimal for human reader or other tools to parse. I'll make it emit a JSON object and write a python (?) formatter and/or visualization tool.

I'd also want to create a debug tool that dumps the flow tree in every key stage in the layout process, and we can have a time slider to explore how the flow tree evolves during the layout process

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Aug 17, 2016

Thanks for taking this on, and a huge 👍 for dumping at key stages so that we can have a time slider to show how the flow tree evolves during layout. Visualizations always aid understanding, and layout is a somewhat opaque process to many developers.

I also agree that having JSON (or some other format that is SUPER easily parsed by off the shelf libraries) is a great strategy.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 18, 2016

I'm also considering YAML. YAML is more human readable, so before we build any fancy tool, developers can still look at the raw output and benefit from the improved readability

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 18, 2016

@nox points out that we can use rustc_serialize

I would probably keep the old Debug::fmt() and change the Flow::print() (i.e. the flow tree dump function) to use the json serialize function instead of Debug:fmt().

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 18, 2016

And as @nox said it would be even better to switch to serde_json from rustc_serialize

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 19, 2016

This looks exactly what we want: acedb16

But there is a bug in it so it always print an empty trace. I'll submit a patch for that right away.

They way to use it is ./mach run -d -Z trace-layout https://servo.org, and a layout_trace.json file will be created. We need to document this somewhere.

@shinglyu shinglyu mentioned this issue Aug 19, 2016
3 of 3 tasks complete
@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 19, 2016

@glennw , you mentioned some external tool for layout debugging in acedb16, may I ask where can I find the tool?

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 19, 2016

I found it, but looks like it was removed: #3350

Removed by:

commit e7510ab90c3482233ca8b188d748216901041970
Author: Matt Brubeck <mbrubeck@limpet.net>
Date:   Tue May 24 17:55:01 2016 -0700

    Remove the layout trace viewer

    It's unmaintained and hasn't worked for years, I think.

bors-servo added a commit that referenced this issue Aug 24, 2016
Fixed layout flow tree JSON serialization

<!-- Please describe your changes on the following line: -->
The second argument for the `emit_struct()` is the number of fields, if given `0`, the output JSON will always be empty.

This is used in `./mach run -d -Z trace-layout https://servo.org`, which will dump the layout flow tree into a `layout_trace.json` file for debugging.

This also unblocks #12675

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because its a debugging tool, not critical for normal code path

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12935)
<!-- Reviewable:end -->
yoyo930021 added a commit to yoyo930021/servo that referenced this issue Aug 28, 2016
@shinglyu shinglyu mentioned this issue Oct 13, 2016
4 of 5 tasks complete
bors-servo added a commit that referenced this issue Nov 2, 2016
Migrated -Z trace-layout to serde_json

<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13740)

<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 2, 2016
Migrated -Z trace-layout to serde_json

<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13740)

<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 4, 2016
Migrated -Z trace-layout to serde_json

<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13740)

<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 4, 2016
Migrated -Z trace-layout to serde_json

<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13740)

<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 4, 2016
Migrated -Z trace-layout to serde_json

<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13740)

<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 7, 2016
Migrated -Z trace-layout to serde_json

<!-- Please describe your changes on the following line: -->

Migrated the trace-layout code from old `rustc-serialize` to `serde_json`. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936.
---

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12936 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a relatively low risk debug tool

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13740)

<!-- Reviewable:end -->
@wafflespeanut
Copy link
Member

@wafflespeanut wafflespeanut commented Dec 28, 2016

Previous attempt and discussion: #13092

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Dec 28, 2016

Now I use -Z trace-layout (with /etc/layout_viewer/) most of the time, because it snapshot the flow tree at every layout step, so you can see how the flow tree evolves. But if someone still need the -Z dump-flow-tree in json, they can consider using the serde_json infrastructure I created. I'm willing to mentor.

@Ilphrin
Copy link

@Ilphrin Ilphrin commented Jan 10, 2017

Hi! I am a very noobie to Servo, but may I work on it with some help? (:

@jdm
Copy link
Member

@jdm jdm commented Jan 10, 2017

@Ilphrin That should be fine! Take a look at the previous discussion and attempt and ask questions about anything that's unclear!

@jdm jdm added the C-assigned label Jan 10, 2017
@KiChjang KiChjang removed the C-assigned label Apr 16, 2017
@KiChjang
Copy link
Member

@KiChjang KiChjang commented Apr 16, 2017

Unassigning due to lack of response.

@murarisumit
Copy link

@murarisumit murarisumit commented Apr 19, 2017

@KiChjang @jdm can i work on it ?

@jdm
Copy link
Member

@jdm jdm commented Apr 19, 2017

Please do!

@murarisumit
Copy link

@murarisumit murarisumit commented Apr 21, 2017

@shinglyu, i saw the flow of dump-flow-tree, so I've to make the all flow class(inheriting flow trait) serializable and then do serde_json::to_string(root_flow) ?

@KiChjang KiChjang added the C-assigned label Apr 21, 2017
@murarisumit
Copy link

@murarisumit murarisumit commented Apr 27, 2017

Hi @shinglyu , got the basic json running with help from @vernans code from his repo.

Can you please tell me which field from basic flow should I add ?

@murarisumit
Copy link

@murarisumit murarisumit commented Apr 27, 2017

@shinglyu please review the changes made in this tree: https://github.com/murarisumit/servo/tree/12675

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented May 8, 2017

@murarisumit Sorry for the delay, the code looks fine to me (master...murarisumit:12675)

Would you mind posting an example of the json output? Just want to make sure it's valid json and easily parsable.

@murarisumit
Copy link

@murarisumit murarisumit commented May 8, 2017

@shinglyu It's slightly large file, so sharing it via gist:

https://gist.github.com/murarisumit/63667a8376fe74099bb9bb5faedc369b

@jdm
Copy link
Member

@jdm jdm commented Jul 7, 2017

@shinglyu Did you look at the json output? Is this ready for a PR?

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 28, 2017

@murarisumit The JSON output looks nice. Feel free to open a PR.

@emilio
Copy link
Member

@emilio emilio commented Aug 28, 2017

cc @mihajlija, who was looking into something like this.

@murarisumit murarisumit mentioned this issue Aug 28, 2017
4 of 5 tasks complete
@murarisumit
Copy link

@murarisumit murarisumit commented Aug 28, 2017

hi @shinglyu, there are many changes since my last commit. My forked repo is around 3000 commit behind the master, and there are changes in master repo that I'm not aware of it.

I've merge it with the current master repo, let me know what next should I do next with it ?

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented Aug 31, 2017

@murarisumit So are you having trouble rebasing (taking in the master changes) or creating a PR?
If you are having trouble rebasing, check out my blog post.

Otherwise, push your code to your fork and go to servo/servo's Pull requests page, there is a button to create a pull request. We can then continue to review and test your code in the pull request page.

@nox
Copy link
Member

@nox nox commented Oct 4, 2017

Was this done, in the end?

@nox
Copy link
Member

@nox nox commented Oct 4, 2017

Never mind… #18266.

@KiChjang KiChjang removed the C-assigned label Nov 10, 2017
@KiChjang
Copy link
Member

@KiChjang KiChjang commented Nov 10, 2017

Latest attempt was at #18266, with a review comment that needs to be addressed.

@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Dec 21, 2017

I am going to do this

@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Dec 22, 2017

@highfive: assign me

@highfive highfive added the C-assigned label Dec 22, 2017
@highfive
Copy link

@highfive highfive commented Dec 22, 2017

Hey @tigercosmos! Thanks for your interest in working on this issue. It's now assigned to you!

@tigercosmos tigercosmos mentioned this issue Dec 22, 2017
3 of 5 tasks complete
bors-servo added a commit that referenced this issue Dec 25, 2017
pretty print tree

<!-- Please describe your changes on the following line: -->
```
│  │  │  │  │  │  │         floatspec-out=L 0px R 0px
│  │  │  │  │  │  │         overflow=Overflow { scroll: TypedRect(0px×0px at (0px,0px)), paint: TypedRect(0px×0px at (0px,0px)) }
│  │  │  │  │  │  │         damage=BUBBLE_ISIZES
│  │  │  │  │  │  │  └─ ↑↑ Fragment for block:
│  │  │  │  │  │  │  │         SpecificFragmentInfo::Table(2671) []
│  │  │  │  │  │  │  │         border_box=LogicalRect(H LTR, i0px×b0px, @ (i0px,b0px))
│  │  │  │  │  │  │  │         damage=REPOSITION | STORE_OVERFLOW | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW
│  │  │  │  ├─ Block(1268a9710)
│  │  │  │  │         sc=StackingContextId(0)
│  │  │  │  │         pos=LogicalRect(H LTR, i720px×b36px, @ (i152px,b2636.883333333333px))
│  │  │  │  │         floatspec-in=L 0px R 0px
│  │  │  │  │         floatspec-out=L 0px R 0px
│  │  │  │  │         overflow=Overflow { scroll: TypedRect(750px×36px at (-15px,0px)), paint: TypedRect(750px×36px at (-15px,0px)) }
│  │  │  │  │         children=1
│  │  │  │  │         damage=BUBBLE_ISIZES
│  │  │  │  │  ├─ ↑↑ Fragment for block:
│  │  │  │  │  │         SpecificFragmentInfo::Generic(2673) []
│  │  │  │  │  │         border_box=LogicalRect(H LTR, i720px×b36px, @ (i0px,b0px))
│  │  │  │  │  │         border_padding=LogicalMargin(H LTR, i:0px..0px b:6px..0px)
│  │  │  │  │  │         damage=REPOSITION | STORE_OVERFLOW
│  │  │  │  │  ├─ Block(128554f10)
│  │  │  │  │  │         sc=StackingContextId(0)
│  │  │  │  │  │         pos=LogicalRect(H LTR, i750px×b30px, @ (i0px,b6px))
│  │  │  │  │  │         floatspec-in=L 0px R 0px
│  │  │  │  │  │         floatspec-out=L 0px R 0px
│  │  │  │  │  │         overflow=Overflow { scroll: TypedRect(750px×30px at (-15px,0px)), paint: TypedRect(750px×30px at (-15px,0px)) }
│  │  │  │  │  │         children=6
│  │  │  │  │  │         damage=BUBBLE_ISIZES
│  │  │  │  │  │  ├─ ↑↑ Fragment for block:
│  │  │  │  │  │  │         SpecificFragmentInfo::Generic(2361) []
│  │  │  │  │  │  │         border_box=LogicalRect(H LTR, i750px×b30px, @ (i-15px,b0px))
│  │  │  │  │  │  │         margin=LogicalMargin(H LTR, i:-15px..-15px b:0px..0px)
│  │  │  │  │  │  │         damage=REPOSITION | STORE_OVERFLOW
│  │  │  │  │  │  ├─ TableWrapperFlow: Block(128555410)
│  │  │  │  │  │  │         sc=StackingContextId(0)
│  │  │  │  │  │  │         pos=LogicalRect(H LTR, i750px×b0px, @ (i-15px,b0px))
│  │  │  │  │  │  │         floatspec-in=L 0px R 0px
│  │  │  │  │  │  │         floatspec-out=L 0px R 0px
│  │  │  │  │  │  │         overflow=Overflow { scroll: TypedRect(0px×0px at (0px,0px)), paint: TypedRect(0px×0px at (0px,0px)) }
│  │  │  │  │  │  │         children=1
│  │  │  │  │  │  │         damage=BUBBLE_ISIZES
```

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12675 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19622)
<!-- Reviewable:end -->
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
… shinglyu:layout_json); r=glennw

<!-- Please describe your changes on the following line: -->
The second argument for the `emit_struct()` is the number of fields, if given `0`, the output JSON will always be empty.

This is used in `./mach run -d -Z trace-layout https://servo.org`, which will dump the layout flow tree into a `layout_trace.json` file for debugging.

This also unblocks servo/servo#12675

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because its a debugging tool, not critical for normal code path

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3993fde90acf08fd2ec423ce0d1f60f3a69a4b37

UltraBlame original commit: 42cc8b34d9bfc3c6800f1d647f2109251a25a2f8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
… shinglyu:layout_json); r=glennw

<!-- Please describe your changes on the following line: -->
The second argument for the `emit_struct()` is the number of fields, if given `0`, the output JSON will always be empty.

This is used in `./mach run -d -Z trace-layout https://servo.org`, which will dump the layout flow tree into a `layout_trace.json` file for debugging.

This also unblocks servo/servo#12675

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because its a debugging tool, not critical for normal code path

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3993fde90acf08fd2ec423ce0d1f60f3a69a4b37

UltraBlame original commit: 42cc8b34d9bfc3c6800f1d647f2109251a25a2f8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
… shinglyu:layout_json); r=glennw

<!-- Please describe your changes on the following line: -->
The second argument for the `emit_struct()` is the number of fields, if given `0`, the output JSON will always be empty.

This is used in `./mach run -d -Z trace-layout https://servo.org`, which will dump the layout flow tree into a `layout_trace.json` file for debugging.

This also unblocks servo/servo#12675

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because its a debugging tool, not critical for normal code path

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 3993fde90acf08fd2ec423ce0d1f60f3a69a4b37

UltraBlame original commit: 42cc8b34d9bfc3c6800f1d647f2109251a25a2f8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

You can’t perform that action at this time.