diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-12-28 00:33:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-28 00:33:31 -0800 |
commit | 58fec2f05a21eb69899c8ec21e4b95000cfed2f2 (patch) | |
tree | 6baa8f06280ea298bfc877f065491c10b09f8f52 /components/layout/flex.rs | |
parent | 81ca858678953105ee97f482eb3900729fa4d696 (diff) | |
parent | 344ad61f2cbb0e18ca4fe80bf8b24ab3b05c42de (diff) | |
download | servo-58fec2f05a21eb69899c8ec21e4b95000cfed2f2.tar.gz servo-58fec2f05a21eb69899c8ec21e4b95000cfed2f2.zip |
Auto merge of #14124 - shinglyu:flexbox-trace, r=glennw
Flexbox trace
<!-- Please describe your changes on the following line: -->
This is a follow up for #13740, so r? @jdm
The first patch enables JSON serialization for flexbox flows, the second one fixed format incompatibilities for the layout viewer.
The 3rd and 4th patches are just layout viewer UI enhancements, we could split that to a spearate PR if you prefer.
---
<!-- 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 #13846 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a trivial 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/14124)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/flex.rs')
-rw-r--r-- | components/layout/flex.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/flex.rs b/components/layout/flex.rs index 7b8d694494c..c40c6a1b433 100644 --- a/components/layout/flex.rs +++ b/components/layout/flex.rs @@ -35,7 +35,7 @@ use style::values::computed::{LengthOrPercentageOrAutoOrContent, LengthOrPercent /// The size of an axis. May be a specified size, a min/max /// constraint, or an unlimited size -#[derive(Debug)] +#[derive(Debug, Serialize)] enum AxisSize { Definite(Au), MinMax(SizeConstraint), @@ -102,7 +102,7 @@ fn from_flex_basis(flex_basis: LengthOrPercentageOrAutoOrContent, /// Represents a child in a flex container. Most fields here are used in /// flex size resolving, and items are sorted by the 'order' property. -#[derive(Debug)] +#[derive(Debug, Serialize)] struct FlexItem { /// Main size of a flex item, used to store results of flexible length calcuation. pub main_size: Au, @@ -240,7 +240,7 @@ impl FlexItem { /// A line in a flex container. // TODO(stshine): More fields are required to handle collapsed items and baseline alignment. -#[derive(Debug)] +#[derive(Debug, Serialize)] struct FlexLine { /// Range of items belong to this line in 'self.items'. pub range: Range<usize>, @@ -330,7 +330,7 @@ impl FlexLine { } /// A block with the CSS `display` property equal to `flex`. -#[derive(Debug)] +#[derive(Debug, Serialize)] pub struct FlexFlow { /// Data common to all block flows. block_flow: BlockFlow, @@ -496,7 +496,7 @@ impl FlexFlow { inline_end_content_edge: Au, content_inline_size: Au) { let _scope = layout_debug_scope!("flex::block_mode_assign_inline_sizes"); - debug!("block_mode_assign_inline_sizes"); + debug!("flex::block_mode_assign_inline_sizes"); // FIXME (mbrubeck): Get correct mode for absolute containing block let containing_block_mode = self.block_flow.base.writing_mode; |