gecko-dev/servo/components/malloc_size_of
Nicholas Nethercote 516e2b5d7c servo: Merge #18583 - Fix MallocSizeOf for TypedSize2D (from nnethercote:fix-TypedSize2D); r=mbrubeck
TypedSize2D's MallocSizeOf impl has two problems.

- It measures `width` twice, and `height` not at all.

- It erroneously asserts that `width` and `height` are scalars. This
  seems reasonable at first blush, but Stylo uses
  `BorderRadius<LengthAndPercentage>` which contains a
  `TypedSize2D<LengthAndPercentage, UnknownUnit>`, and
  `LengthAndPercentage` is non-scalar.

This patch fixes both of these problems, and also removes a low-value
`use` statement.

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

---
<!-- 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
- [ ] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1401692

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because tested on the Gecko side.

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: dfb80f07539298d5972c8ca108dda5f83d8e009f

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0706aaa344d99e8a575c79c57438b77e1d632ac6
2017-09-20 18:38:51 -05:00
..
Cargo.toml servo: Merge #18512 - Preserve sourceURL comment on style sheets (from tromey:preserve-style-sheet-source-url); r=SimonSapin 2017-09-15 12:44:03 -07:00
LICENSE-APACHE
LICENSE-MIT
lib.rs servo: Merge #18583 - Fix MallocSizeOf for TypedSize2D (from nnethercote:fix-TypedSize2D); r=mbrubeck 2017-09-20 18:38:51 -05:00