Auto merge of #13401 - notriddle:master, r=pcwalton

Implement sequential fallback to float speculation

This shouldn't impact any pages that are already rendering correctly, but it is a very naive implementation of this pass.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13284 and fix #13223
- [X] There are tests for these changes

<!-- 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/13401)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-29 13:16:24 -05:00 committed by GitHub
commit 4ebecc915a
11 changed files with 193 additions and 35 deletions

View file

@ -44,3 +44,13 @@ pub fn servo_version() -> String {
None => format!("Servo {}", cargo_version),
}
}
pub fn clamp<T: Ord>(lo: T, mid: T, hi: T) -> T {
if mid < lo {
lo
} else if mid > hi {
hi
} else {
mid
}
}