mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
parent
a9aa50683f
commit
5c408d2be9
39 changed files with 397 additions and 377 deletions
|
@ -417,8 +417,8 @@ impl ViewportConstraints {
|
|||
//
|
||||
// Note: DEVICE-ADAPT § 5. states that relative length values are
|
||||
// resolved against initial values
|
||||
let initial_viewport = Size2D(Au::from_f32_px(initial_viewport.width.get()),
|
||||
Au::from_f32_px(initial_viewport.height.get()));
|
||||
let initial_viewport = Size2D::new(Au::from_f32_px(initial_viewport.width.get()),
|
||||
Au::from_f32_px(initial_viewport.height.get()));
|
||||
|
||||
macro_rules! to_pixel_length {
|
||||
($value:ident, $dimension:ident) => {
|
||||
|
@ -496,7 +496,7 @@ impl ViewportConstraints {
|
|||
});
|
||||
|
||||
Some(ViewportConstraints {
|
||||
size: TypedSize2D(width.to_f32_px(), height.to_f32_px()),
|
||||
size: Size2D::typed(width.to_f32_px(), height.to_f32_px()),
|
||||
|
||||
// TODO: compute a zoom factor for 'auto' as suggested by DEVICE-ADAPT § 10.
|
||||
initial_zoom: ScaleFactor::new(initial_zoom.unwrap_or(1.)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue