Sync Servo / Gecko image-orientation rounding; pass as enum.

Make Servo's rounding of image-orientation values agree with Gecko's,
and pass orientations directly as an enum instead of as angles.

Depends on a Gecko change to be subsequently landed in m-c.
This commit is contained in:
Jonathan Chan 2017-07-10 15:10:12 -07:00
parent 8e14d93602
commit c6a7f10182
4 changed files with 85 additions and 29 deletions

View file

@ -3851,9 +3851,9 @@ fn static_assert() {
bindings::Gecko_SetImageOrientationAsFromImage(&mut self.gecko);
}
},
T::AngleWithFlipped(ref angle, flipped) => {
T::AngleWithFlipped(ref orientation, flipped) => {
unsafe {
bindings::Gecko_SetImageOrientation(&mut self.gecko, angle.radians() as f64, flipped);
bindings::Gecko_SetImageOrientation(&mut self.gecko, *orientation as u8, flipped);
}
}
}