aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/construct.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-04-10 17:11:08 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-05-03 14:18:30 -0400
commitdfdda0098a3f169a37c100b36d4dd36ec1d815aa (patch)
treeb4835f3c863c6e45849cf036faf5611925e10189 /src/components/main/layout/construct.rs
parentd7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1 (diff)
downloadservo-dfdda0098a3f169a37c100b36d4dd36ec1d815aa.tar.gz
servo-dfdda0098a3f169a37c100b36d4dd36ec1d815aa.zip
Remove JS::get/get_mut to enforce sound rooting practices.
Diffstat (limited to 'src/components/main/layout/construct.rs')
-rw-r--r--src/components/main/layout/construct.rs5
1 files changed, 2 insertions, 3 deletions
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<Text> = TextCast::to(self.get_jsmanaged()).unwrap();
- if !is_whitespace(text.get().characterdata.data) {
+ let text: JS<Text> = self.get_jsmanaged().transmute_copy();
+ if !is_whitespace((*text.unsafe_get()).characterdata.data) {
return false
}