diff options
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r-- | components/script/dom/window.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 37d79625334..5256b975172 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -917,10 +917,10 @@ impl Window { } fn should_move_clip_rect(clip_rect: Rect<Au>, new_viewport: Rect<f32>) -> bool{ - let clip_rect = Rect(Point2D(geometry::to_frac_px(clip_rect.origin.x) as f32, - geometry::to_frac_px(clip_rect.origin.y) as f32), - Size2D(geometry::to_frac_px(clip_rect.size.width) as f32, - geometry::to_frac_px(clip_rect.size.height) as f32)); + let clip_rect = Rect(Point2D(clip_rect.origin.x.to_f32_px(), + clip_rect.origin.y.to_f32_px()), + Size2D(clip_rect.size.width.to_f32_px(), + clip_rect.size.height.to_f32_px())); // We only need to move the clip rect if the viewport is getting near the edge of // our preexisting clip rect. We use half of the size of the viewport as a heuristic |