From 6374d74d6edda7e5db5c2930432c8e3edec4d59d Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 6 Dec 2014 10:50:13 +0100 Subject: [PATCH] Simplify the content_changed call in ScriptTask::load. --- components/script/script_task.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 23ab04374c3..7972b2a378a 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -758,11 +758,7 @@ impl ScriptTask { // Kick off the initial reflow of the page. debug!("kicking off initial reflow of {}", url); - { - let document_js_ref = (&*document).clone(); - let document_as_node = NodeCast::from_ref(document_js_ref); - document.content_changed(document_as_node); - } + document.content_changed(NodeCast::from_ref(*document)); window.flush_layout(); {