diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-01-17 02:18:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 02:18:15 -0800 |
commit | a70af60eec11fa0a19cfd889c56b09dc834b35af (patch) | |
tree | ce932f5d35ed2fef822a6f2baf0791657cc42ac0 /components/script/dom/htmlscriptelement.rs | |
parent | 363f590019e495fffab0cc0fa0464e05d2fc96e8 (diff) | |
parent | 3ac73edf6665342a3249a8b82f5ae572c46be1ed (diff) | |
download | servo-a70af60eec11fa0a19cfd889c56b09dc834b35af.tar.gz servo-a70af60eec11fa0a19cfd889c56b09dc834b35af.zip |
Auto merge of #15063 - Wafflespeanut:calc, r=heycam
Cleaning up CalcLengthOrPercentage
<!-- Please describe your changes on the following line: -->
We don't really need enum variants in `CalcLengthOrPercentage`. Given that we already have the information (whether it's `vw`, `ch`, etc.) in the struct fields, we could just store `Option<CSSFloat>` there, and modify our `ToCss` implementation a bit.
cc #15061
r? @Manishearth or anyone interested
---
<!-- 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 it's a refactor
<!-- 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/15063)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
0 files changed, 0 insertions, 0 deletions