mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
servo: Rename css::styles to css::matching
Source-Repo: https://github.com/servo/servo Source-Revision: 0e94860305b8e5dbc362dec8b7dd358e530203ef
This commit is contained in:
parent
0450f05eea
commit
e3b6b78774
@ -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 {
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user