Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMigrated -Z trace-layout to serde_json #13740
Conversation
highfive
commented
Oct 13, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 13, 2016
| script_layout_interface = {path = "../script_layout_interface"} | ||
| script_traits = {path = "../script_traits"} | ||
| selectors = "0.13" | ||
| serde = "0.8" | ||
| serde_json = "0.8" |
This comment has been minimized.
This comment has been minimized.
|
|
|
Just rebased to the latest master, @nox r? |
|
|
|
@nox @asajeffrey r? |
| FlowClass::TableRowGroup => to_value(f.as_table_rowgroup()), | ||
| FlowClass::TableRow => to_value(f.as_table_row()), | ||
| FlowClass::TableCell => to_value(f.as_table_cell()), | ||
| _ => { Value::Null } // TODO: Support captions |
This comment has been minimized.
This comment has been minimized.
| }) | ||
| impl Serialize for Fragment { | ||
| fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error>{ | ||
| let mut state = try!(serializer.serialize_struct("fragment", 3)); //change the length! |
This comment has been minimized.
This comment has been minimized.
| @@ -10,6 +10,9 @@ | |||
| #![feature(plugin)] | |||
| #![feature(raw)] | |||
| #![feature(step_by)] | |||
| #![feature(proc_macro)] | |||
This comment has been minimized.
This comment has been minimized.
| fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { | ||
| self.block_flow.encode(e) | ||
| impl Serialize for TableRowGroupFlow { | ||
| fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error>{ |
This comment has been minimized.
This comment has been minimized.
| fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { | ||
| self.bits().encode(e) | ||
| impl Serialize for BlockFlowFlags { | ||
| fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error>{ |
This comment has been minimized.
This comment has been minimized.
|
|
| #![feature(raw)] | ||
| #![feature(step_by)] | ||
| #![feature(structural_match)] | ||
| #![feature(rustc_attrs)] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
shinglyu
Nov 1, 2016
Author
Member
These are some features required by serde_json, but looks like they are no longer needed in rustc-1.14.0, I'll try removing them and see if it works.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
shinglyu
Nov 1, 2016
Author
Member
Oh we don't need that anymore, I can compile with rustc-1.14.0 with them removed.
| fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> { | ||
| self.block_flow.encode(e) | ||
| impl Serialize for TableRowFlow { | ||
| fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error>{ |
This comment has been minimized.
This comment has been minimized.
jdm
Oct 31, 2016
Member
nit: space before { (there are a bunch of other instances in this PR; search for >{)
|
@bors-servo: retry |
|
|
|
|
highfive
commented
Nov 4, 2016
|
|
|
|
@bors-servo: retry, r=jdm |
|
|
|
|
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 -->
|
|
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 -->
shinglyu commentedOct 13, 2016
•
edited by larsbergstrom
Migrated the trace-layout code from old
rustc-serializetoserde_json. This will help us iterate faster on the layout viewer (#13432), #13436, #12675 and fix #12936../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is