diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-05-05 17:34:01 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-05-05 17:36:03 +0200 |
commit | 32d5e24922e47322bf67c100fa4c178bc9b430f4 (patch) | |
tree | 3015fe6c3b6ddd67016161c16505cace6de40696 /components/script/script_task.rs | |
parent | 49aed6555dbc008c1a378c5cbb303f5467232b6b (diff) | |
download | servo-32d5e24922e47322bf67c100fa4c178bc9b430f4.tar.gz servo-32d5e24922e47322bf67c100fa4c178bc9b430f4.zip |
Replace Au-related free functions in util::geometry with Au methods.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 5e776d4db0f..355b9d01210 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -70,7 +70,6 @@ use net_traits::LoadData as NetLoadData; use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask, ImageCacheResult}; use net_traits::storage_task::StorageTask; use string_cache::Atom; -use util::geometry::to_frac_px; use util::str::DOMString; use util::task::{spawn_named, spawn_named_with_send_on_failure}; use util::task_state; @@ -85,7 +84,6 @@ use js::rust::{Runtime, RtUtils}; use url::Url; use libc; -use num::ToPrimitive; use std::any::Any; use std::borrow::ToOwned; use std::cell::{Cell, RefCell}; @@ -1182,8 +1180,7 @@ impl ScriptTask { fn scroll_fragment_point(&self, pipeline_id: PipelineId, node: JSRef<Element>) { let node: JSRef<Node> = NodeCast::from_ref(node); let rect = node.get_bounding_content_box(); - let point = Point2D(to_frac_px(rect.origin.x).to_f32().unwrap(), - to_frac_px(rect.origin.y).to_f32().unwrap()); + let point = Point2D(rect.origin.x.to_frac32_px(), rect.origin.y.to_frac32_px()); // FIXME(#2003, pcwalton): This is pretty bogus when multiple layers are involved. // Really what needs to happen is that this needs to go through layout to ask which // layer the element belongs to, and have it send the scroll message to the |