Selector matching doesn't need a LayoutContext just now

This commit is contained in:
Brian Anderson 2012-10-31 19:32:02 -07:00
parent 0e94860305
commit d95b96185c
2 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ use layout::context::LayoutContext;
use select_handler::NodeSelectHandler;
trait MatchMethods {
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx);
fn restyle_subtree(select_ctx: &SelectCtx);
}
impl Node : MatchMethods {
@ -19,12 +19,12 @@ impl Node : MatchMethods {
* the node (the reader-auxiliary box in the COW model) with the
* computed style.
*/
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx) {
fn restyle_subtree(select_ctx: &SelectCtx) {
let mut i = 0u;
for NodeTree.each_child(&self) |kid| {
i = i + 1u;
kid.restyle_subtree(ctx, select_ctx);
kid.restyle_subtree(select_ctx);
}
let select_handler = NodeSelectHandler {

View file

@ -175,7 +175,7 @@ impl Layout {
// TODO: this is dumb. we don't need 2 separate traversals.
node.initialize_style_for_subtree(&self.layout_refs);
do self.css_select_ctx.borrow_imm |ctx| {
node.restyle_subtree(&layout_ctx, ctx);
node.restyle_subtree(ctx);
}
let builder = LayoutTreeBuilder::new();