aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/main/dom/node.rs14
-rw-r--r--src/components/main/layout/box.rs10
-rw-r--r--src/components/main/layout/box_builder.rs1
-rw-r--r--src/components/main/layout/debug.rs21
-rw-r--r--src/components/main/layout/flow.rs10
-rw-r--r--src/components/main/layout/inline.rs1
-rw-r--r--src/components/main/layout/layout_task.rs1
-rwxr-xr-xsrc/components/main/servo.rc1
8 files changed, 14 insertions, 45 deletions
diff --git a/src/components/main/dom/node.rs b/src/components/main/dom/node.rs
index 15c4149f5d1..98907787f7d 100644
--- a/src/components/main/dom/node.rs
+++ b/src/components/main/dom/node.rs
@@ -12,7 +12,6 @@ use dom::characterdata::CharacterData;
use dom::document::Document;
use dom::element::{Element, ElementTypeId, HTMLImageElement, HTMLImageElementTypeId};
use dom::element::{HTMLStyleElementTypeId};
-use layout::debug::DebugMethods;
use scripting::script_task::global_script_context;
use core::cast::transmute;
@@ -354,16 +353,14 @@ impl<View> AbstractNode<View> {
obj: raw
}
}
-}
-impl<View> DebugMethods for AbstractNode<View> {
- // Dumps the subtree rooted at this node, for debugging.
- fn dump(&self) {
+ /// Dumps the subtree rooted at this node, for debugging.
+ pub fn dump(&self) {
self.dump_indent(0);
}
- // Dumps the node tree, for debugging, with indentation.
- fn dump_indent(&self, indent: uint) {
+ /// Dumps the node tree, for debugging, with indentation.
+ pub fn dump_indent(&self, indent: uint) {
let mut s = ~"";
for uint::range(0u, indent) |_i| {
s += ~" ";
@@ -378,7 +375,8 @@ impl<View> DebugMethods for AbstractNode<View> {
}
}
- fn debug_str(&self) -> ~str {
+ /// Returns a string that describes this node.
+ pub fn debug_str(&self) -> ~str {
fmt!("%?", self.type_id())
}
}
diff --git a/src/components/main/layout/box.rs b/src/components/main/layout/box.rs
index 49444f03dc8..59e14d3c6fe 100644
--- a/src/components/main/layout/box.rs
+++ b/src/components/main/layout/box.rs
@@ -7,7 +7,6 @@
use css::node_style::StyledNode;
use dom::node::{AbstractNode, LayoutView};
use layout::context::LayoutContext;
-use layout::debug::DebugMethods;
use layout::display_list_builder::{DisplayListBuilder, ToGfxColor};
use layout::flow::FlowContext;
use layout::text;
@@ -795,15 +794,14 @@ pub impl RenderBox {
}
get_propagated_text_decoration(self.nearest_ancestor_element())
}
-}
-impl DebugMethods for RenderBox {
- fn dump(&self) {
+ /// Dumps this node, for debugging.
+ pub fn dump(&self) {
self.dump_indent(0);
}
/// Dumps a render box for debugging, with indentation.
- fn dump_indent(&self, indent: uint) {
+ pub fn dump_indent(&self, indent: uint) {
let mut string = ~"";
for uint::range(0u, indent) |_i| {
string += ~" ";
@@ -814,7 +812,7 @@ impl DebugMethods for RenderBox {
}
/// Returns a debugging string describing this box.
- fn debug_str(&self) -> ~str {
+ pub fn debug_str(&self) -> ~str {
let representation = match *self {
GenericRenderBoxClass(*) => ~"GenericRenderBox",
ImageRenderBoxClass(*) => ~"ImageRenderBox",
diff --git a/src/components/main/layout/box_builder.rs b/src/components/main/layout/box_builder.rs
index 5e7a067815d..d06dcb36daf 100644
--- a/src/components/main/layout/box_builder.rs
+++ b/src/components/main/layout/box_builder.rs
@@ -13,7 +13,6 @@ use layout::box::{GenericRenderBoxClass, ImageRenderBox, ImageRenderBoxClass, Re
use layout::box::{RenderBoxBase, RenderBoxType, RenderBox_Generic, RenderBox_Image};
use layout::box::{RenderBox_Text, UnscannedTextRenderBox, UnscannedTextRenderBoxClass};
use layout::context::LayoutContext;
-use layout::debug::{BoxedMutDebugMethods, DebugMethods};
use layout::flow::{AbsoluteFlow, BlockFlow, FloatFlow, Flow_Absolute, Flow_Block, Flow_Float};
use layout::flow::{Flow_Inline, Flow_InlineBlock, Flow_Root, Flow_Table, FlowContext};
use layout::flow::{FlowContextType, FlowData, InlineBlockFlow, InlineFlow, TableFlow};
diff --git a/src/components/main/layout/debug.rs b/src/components/main/layout/debug.rs
deleted file mode 100644
index cbee6b8cf26..00000000000
--- a/src/components/main/layout/debug.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-pub trait BoxedMutDebugMethods {
- fn dump(@mut self);
- fn dump_indent(@mut self, ident: uint);
- fn debug_str(@mut self) -> ~str;
-}
-
-pub trait BoxedDebugMethods {
- fn dump(@self);
- fn dump_indent(@self, ident: uint);
- fn debug_str(@self) -> ~str;
-}
-
-pub trait DebugMethods {
- fn dump(&self);
- fn dump_indent(&self, ident: uint);
- fn debug_str(&self) -> ~str;
-}
diff --git a/src/components/main/layout/flow.rs b/src/components/main/layout/flow.rs
index 5add5fb1cf9..c7dfc2252ad 100644
--- a/src/components/main/layout/flow.rs
+++ b/src/components/main/layout/flow.rs
@@ -29,7 +29,6 @@ use dom::node::{AbstractNode, LayoutView};
use layout::block::BlockFlowData;
use layout::box::RenderBox;
use layout::context::LayoutContext;
-use layout::debug::DebugMethods;
use layout::display_list_builder::DisplayListBuilder;
use layout::inline::{InlineFlowData};
@@ -372,15 +371,14 @@ impl<'self> FlowContext {
true
}
-}
-impl DebugMethods for FlowContext {
- fn dump(&self) {
+ /// Dumps the flow tree for debugging.
+ pub fn dump(&self) {
self.dump_indent(0);
}
/// Dumps the flow tree, for debugging, with indentation.
- fn dump_indent(&self, indent: uint) {
+ pub fn dump_indent(&self, indent: uint) {
let mut s = ~"|";
for uint::range(0, indent) |_i| {
s += ~"---- ";
@@ -395,7 +393,7 @@ impl DebugMethods for FlowContext {
}
}
- fn debug_str(&self) -> ~str {
+ pub fn debug_str(&self) -> ~str {
let repr = match *self {
InlineFlow(inline) => {
let mut s = inline.boxes.foldl(~"InlineFlow(children=", |s, box| {
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs
index afa1543ce4f..c077d065353 100644
--- a/src/components/main/layout/inline.rs
+++ b/src/components/main/layout/inline.rs
@@ -8,7 +8,6 @@ use dom::node::{AbstractNode, LayoutView};
use layout::box::{CannotSplit, GenericRenderBoxClass, ImageRenderBoxClass, RenderBox};
use layout::box::{SplitDidFit, SplitDidNotFit, TextRenderBoxClass, UnscannedTextRenderBoxClass};
use layout::context::LayoutContext;
-use layout::debug::{BoxedDebugMethods, BoxedMutDebugMethods, DebugMethods};
use layout::display_list_builder::DisplayListBuilder;
use layout::flow::{FlowContext, FlowData, InlineFlow};
use layout::text::{UnscannedMethods, adapt_textbox_with_range};
diff --git a/src/components/main/layout/layout_task.rs b/src/components/main/layout/layout_task.rs
index d23d377e244..f97ea51f211 100644
--- a/src/components/main/layout/layout_task.rs
+++ b/src/components/main/layout/layout_task.rs
@@ -12,7 +12,6 @@ use dom::node::{AbstractNode, LayoutView};
use layout::aux::{LayoutData, LayoutAuxMethods};
use layout::box_builder::LayoutTreeBuilder;
use layout::context::LayoutContext;
-use layout::debug::{BoxedMutDebugMethods, DebugMethods};
use layout::display_list_builder::{DisplayListBuilder, FlowDisplayListBuilderMethods};
use layout::flow::FlowContext;
use layout_interface::{AddStylesheetMsg, BuildData, BuildMsg, ContentBoxQuery, ContentBoxResponse};
diff --git a/src/components/main/servo.rc b/src/components/main/servo.rc
index 94692bfddfc..8c448b2d938 100755
--- a/src/components/main/servo.rc
+++ b/src/components/main/servo.rc
@@ -107,7 +107,6 @@ pub mod layout {
pub mod box;
pub mod box_builder;
pub mod context;
- pub mod debug;
pub mod display_list_builder;
pub mod flow;
pub mod layout_task;