diff options
author | bors-servo <release+servo@mozilla.com> | 2014-04-01 15:31:50 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-04-01 15:31:50 -0400 |
commit | e3bf08ea537366a1624a082999c3548fa07d4650 (patch) | |
tree | c4cce3fe40576c578ad568cc7d82537d7c729555 /src/components/script/script_task.rs | |
parent | 1c8ad2ce471019d621af22015a3cc82a58cbc303 (diff) | |
parent | d4d6fcb5f06a21091960bd809282c5eadf99caa2 (diff) | |
download | servo-e3bf08ea537366a1624a082999c3548fa07d4650.tar.gz servo-e3bf08ea537366a1624a082999c3548fa07d4650.zip |
auto merge of #2022 : lpy/servo/issue2019, r=jdm
see #2019
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r-- | src/components/script/script_task.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index 22a03a7b680..2fba7693687 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -929,13 +929,10 @@ impl ScriptTask { fn scroll_fragment_point(&self, pipeline_id: PipelineId, page: &Page, node: JS<Element>) { let (port, chan) = Chan::new(); let node: JS<Node> = NodeCast::from(&node); - match page.query_layout(ContentBoxQuery(node.to_trusted_node_address(), chan), port) { - ContentBoxResponse(rect) => { - let point = Point2D(to_frac_px(rect.origin.x).to_f32().unwrap(), - to_frac_px(rect.origin.y).to_f32().unwrap()); - self.compositor.scroll_fragment_point(pipeline_id, point); - } - } + let ContentBoxResponse(rect) = page.query_layout(ContentBoxQuery(node.to_trusted_node_address(), chan), port); + let point = Point2D(to_frac_px(rect.origin.x).to_f32().unwrap(), + to_frac_px(rect.origin.y).to_f32().unwrap()); + self.compositor.scroll_fragment_point(pipeline_id, point); } /// This is the main entry point for receiving and dispatching DOM events. |