From e3b6b787742777c656844f25e751e7d7c96a9e8d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 31 Oct 2012 19:30:54 -0700 Subject: [PATCH] servo: Rename css::styles to css::matching Source-Repo: https://github.com/servo/servo Source-Revision: 0e94860305b8e5dbc362dec8b7dd358e530203ef --- servo/src/servo/css/{styles.rs => matching.rs} | 10 +++++----- servo/src/servo/layout/layout_task.rs | 2 +- servo/src/servo/servo.rc | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename servo/src/servo/css/{styles.rs => matching.rs} (74%) diff --git a/servo/src/servo/css/styles.rs b/servo/src/servo/css/matching.rs similarity index 74% rename from servo/src/servo/css/styles.rs rename to servo/src/servo/css/matching.rs index c5d088f3fbc0..e1ea738a9a4b 100644 --- a/servo/src/servo/css/styles.rs +++ b/servo/src/servo/css/matching.rs @@ -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 { diff --git a/servo/src/servo/layout/layout_task.rs b/servo/src/servo/layout/layout_task.rs index b2e249c7a917..7971c4a6f710 100644 --- a/servo/src/servo/layout/layout_task.rs +++ b/servo/src/servo/layout/layout_task.rs @@ -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(); diff --git a/servo/src/servo/servo.rc b/servo/src/servo/servo.rc index 20f0be1778ad..d7ac15883ab7 100755 --- a/servo/src/servo/servo.rc +++ b/servo/src/servo/servo.rc @@ -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;