diff options
Diffstat (limited to 'src/servo/layout')
-rw-r--r-- | src/servo/layout/aux.rs | 8 | ||||
-rw-r--r-- | src/servo/layout/box_builder.rs | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/servo/layout/aux.rs b/src/servo/layout/aux.rs index b803a036bac..f56f204e0d1 100644 --- a/src/servo/layout/aux.rs +++ b/src/servo/layout/aux.rs @@ -2,12 +2,12 @@ * 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/. */ -/** -Code for managing the DOM aux pointer -*/ +//! Code for managing the layout data in the DOM. use dom::node::{AbstractNode, LayoutData}; +use servo_util::tree::TreeUtils; + pub trait LayoutAuxMethods { fn initialize_layout_data(self) -> Option<@mut LayoutData>; fn initialize_style_for_subtree(self, refs: &mut ~[@mut LayoutData]); @@ -36,5 +36,5 @@ impl LayoutAuxMethods for AbstractNode { } }; } - } + diff --git a/src/servo/layout/box_builder.rs b/src/servo/layout/box_builder.rs index d0fb0deb55d..8bc838b18d1 100644 --- a/src/servo/layout/box_builder.rs +++ b/src/servo/layout/box_builder.rs @@ -121,6 +121,8 @@ impl BoxGenerator { // depending on flow, make a box for this node. match self.flow { InlineFlow(inline) => { + use servo_util::tree::TreeUtils; // For `is_leaf()`. + let mut inline = &mut *inline; let node_range_start = inline.boxes.len(); self.range_stack.push(node_range_start); @@ -336,8 +338,12 @@ pub impl LayoutTreeBuilder { debug!("point b: %s", cur_node.debug_str()); // recurse on child nodes. - for cur_node.each_child |child_node| { - self.construct_recursively(layout_ctx, child_node, &mut this_ctx); + { + use servo_util::tree::TreeUtils; // For `each_child()`. + + for cur_node.each_child |child_node| { + self.construct_recursively(layout_ctx, child_node, &mut this_ctx); + } } this_ctx.default_collector.pop_node(layout_ctx, self, cur_node); |