Rename css::styles to css::matching

This commit is contained in:
Brian Anderson 2012-10-31 19:30:54 -07:00
parent bd9a9421d2
commit 0e94860305
3 changed files with 7 additions and 7 deletions

View file

@ -7,11 +7,11 @@ use newcss::{SelectCtx, SelectResults};
use layout::context::LayoutContext;
use select_handler::NodeSelectHandler;
trait StyleMethods {
fn recompute_style_for_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx);
trait MatchMethods {
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx);
}
impl Node : StyleMethods {
impl Node : MatchMethods {
/**
* Performs CSS selector matching on a subtree.
@ -19,12 +19,12 @@ impl Node : StyleMethods {
* the node (the reader-auxiliary box in the COW model) with the
* computed style.
*/
fn recompute_style_for_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx) {
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx) {
let mut i = 0u;
for NodeTree.each_child(&self) |kid| {
i = i + 1u;
kid.recompute_style_for_subtree(ctx, select_ctx);
kid.restyle_subtree(ctx, 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.recompute_style_for_subtree(&layout_ctx, ctx);
node.restyle_subtree(&layout_ctx, ctx);
}
let builder = LayoutTreeBuilder::new();

View file

@ -45,7 +45,7 @@ pub mod content {
}
pub mod css {
pub mod styles;
pub mod matching;
pub mod compute;
priv mod select_handler;
priv mod node_util;