diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-05-05 18:23:29 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-05-05 18:23:29 +0200 |
commit | 8b522f2e7d08aaf73429207cbbfd9da915f6d9a5 (patch) | |
tree | c4c7e7247ac5685aa4ec5048187132492b8eb6b9 /components/script/dom | |
parent | 32d5e24922e47322bf67c100fa4c178bc9b430f4 (diff) | |
download | servo-8b522f2e7d08aaf73429207cbbfd9da915f6d9a5.tar.gz servo-8b522f2e7d08aaf73429207cbbfd9da915f6d9a5.zip |
Rename Au methods with f32/f64 instead of frac32/frac/subpx
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/htmlanchorelement.rs | 4 | ||||
-rw-r--r-- | components/script/dom/window.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs index 4a46235756e..9ed6b5df5c7 100644 --- a/components/script/dom/htmlanchorelement.rs +++ b/components/script/dom/htmlanchorelement.rs @@ -135,8 +135,8 @@ impl<'a> Activatable for JSRef<'a, HTMLAnchorElement> { let target_node = NodeCast::to_ref(target).unwrap(); let rect = window_from_node(target_node).root().r().content_box_query(target_node.to_trusted_node_address()); ismap_suffix = Some( - format!("?{},{}", mouse_event.ClientX().to_f32().unwrap() - rect.origin.x.to_frac32_px(), - mouse_event.ClientY().to_f32().unwrap() - rect.origin.y.to_frac32_px()) + format!("?{},{}", mouse_event.ClientX().to_f32().unwrap() - rect.origin.x.to_f32_px(), + mouse_event.ClientY().to_f32().unwrap() - rect.origin.y.to_f32_px()) ) } } diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index e49f6a1a50e..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(clip_rect.origin.x.to_frac32_px(), - clip_rect.origin.y.to_frac32_px()), - Size2D(clip_rect.size.width.to_frac32_px(), - clip_rect.size.height.to_frac32_px())); + 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 |