aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorClark Gaebel <cgaebel@mozilla.com>2014-10-28 10:14:12 -0700
committerClark Gaebel <cgaebel@mozilla.com>2014-10-28 10:14:12 -0700
commita8f80b89f419b32280ea57387d958177fa36c7d4 (patch)
treebd77a07e637e3df0cf53754c3409ac392d409db6 /components/layout/layout_task.rs
parent9e94ecf99cff7c57275ab39c7b11870e55756d63 (diff)
downloadservo-a8f80b89f419b32280ea57387d958177fa36c7d4.tar.gz
servo-a8f80b89f419b32280ea57387d958177fa36c7d4.zip
layout: Implement flow tree dumping with RUST_LOG=debug is on.
r? @pcwalton
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index db47f9e5801..749510c56d5 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -30,6 +30,7 @@ use gfx::render_task::{RenderInitMsg, RenderChan, RenderLayer};
use gfx::{render_task, color};
use layout_traits;
use layout_traits::{LayoutControlMsg, LayoutTaskFactory};
+use log;
use script::dom::bindings::js::JS;
use script::dom::node::{ElementNodeTypeId, LayoutDataRef, Node};
use script::dom::element::{HTMLBodyElementTypeId, HTMLHtmlElementTypeId};
@@ -566,7 +567,9 @@ impl LayoutTask {
debug!("layout: received layout request for: {:s}", data.url.serialize());
debug!("layout: parsed Node tree");
- debug!("{:?}", node.dump());
+ if log_enabled!(log::DEBUG) {
+ node.dump();
+ }
let mut rw_data = self.lock_rw_data(possibly_locked_rw_data);