aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-05-05 15:08:12 -0500
committerbors-servo <metajack+bors@gmail.com>2015-05-05 15:08:12 -0500
commit1721cf45ed59306a69f3ade08feca065804c3804 (patch)
tree803af0863b4917058f15d624004fb7941d880637 /components/script/script_task.rs
parente779e8905ba530eddf6777dfb7565131cfcd1830 (diff)
parent908be6abc2c32f5d6706f938bffb91f94c85d5d5 (diff)
downloadservo-1721cf45ed59306a69f3ade08feca065804c3804.tar.gz
servo-1721cf45ed59306a69f3ade08feca065804c3804.zip
Auto merge of #5951 - SimonSapin:au-cleanup, r=mbrubeck
Fix #5943. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5951) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 5efbb6a1deb..ddd314b7a3a 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_f32_px(), rect.origin.y.to_f32_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