Move the entire servo CSS selection interface to css::styles

This commit is contained in:
Brian Anderson 2012-10-30 15:53:53 -07:00
parent fc3ca6738a
commit fbe17a1e36
4 changed files with 8 additions and 4 deletions

View file

@ -39,7 +39,7 @@ struct StyleApplicator {
} }
// TODO: normalize this into a normal preorder tree traversal function // TODO: normalize this into a normal preorder tree traversal function
fn apply_style(layout_ctx: &LayoutContext, node: Node) { pub fn apply_style(layout_ctx: &LayoutContext, node: Node) {
let applicator = StyleApplicator { let applicator = StyleApplicator {
node: node, node: node,
}; };

View file

@ -172,3 +172,7 @@ impl Node : StyleMethods {
self.match_css_style(get(styles)); self.match_css_style(get(styles));
} }
} }
fn apply_style(layout_ctx: &LayoutContext, node: Node) {
resolve::apply::apply_style(layout_ctx, node)
}

View file

@ -7,7 +7,7 @@ use au = gfx::geometry;
use au::Au; use au::Au;
use content::content_task; use content::content_task;
use core::dvec::DVec; use core::dvec::DVec;
use css::resolve::apply::apply_style; use css::styles::apply_style;
use newcss::values::Stylesheet; use newcss::values::Stylesheet;
use dl = gfx::display_list; use dl = gfx::display_list;
use dom::event::{Event, ReflowEvent}; use dom::event::{Event, ReflowEvent};

View file

@ -45,8 +45,8 @@ pub mod content {
} }
pub mod css { pub mod css {
mod styles; pub mod styles;
pub mod resolve { mod resolve {
pub mod apply; pub mod apply;
mod matching; mod matching;
} }