mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
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:
commit
4ebecc915a
11 changed files with 193 additions and 35 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue