From dfdda0098a3f169a37c100b36d4dd36ec1d815aa Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 10 Apr 2014 17:11:08 -0400 Subject: Remove JS::get/get_mut to enforce sound rooting practices. --- src/components/main/layout/construct.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/components/main/layout/construct.rs') diff --git a/src/components/main/layout/construct.rs b/src/components/main/layout/construct.rs index 72ce8e09b97..46f5c5ef287 100644 --- a/src/components/main/layout/construct.rs +++ b/src/components/main/layout/construct.rs @@ -45,7 +45,6 @@ use layout::wrapper::{Before, BeforeBlock, After, AfterBlock, Normal}; use gfx::display_list::OpaqueNode; use gfx::font_context::FontContext; -use script::dom::bindings::codegen::InheritTypes::TextCast; use script::dom::bindings::js::JS; use script::dom::element::{HTMLIFrameElementTypeId, HTMLImageElementTypeId}; use script::dom::element::{HTMLObjectElementTypeId}; @@ -1064,8 +1063,8 @@ impl<'ln> NodeUtils for ThreadSafeLayoutNode<'ln> { match self.type_id() { Some(TextNodeTypeId) => { unsafe { - let text: JS = TextCast::to(self.get_jsmanaged()).unwrap(); - if !is_whitespace(text.get().characterdata.data) { + let text: JS = self.get_jsmanaged().transmute_copy(); + if !is_whitespace((*text.unsafe_get()).characterdata.data) { return false } -- cgit v1.2.3