mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Move the entire servo CSS selection interface to css::styles
This commit is contained in:
parent
fc3ca6738a
commit
fbe17a1e36
4 changed files with 8 additions and 4 deletions
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
|
@ -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)
|
||||||
|
}
|
|
@ -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};
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue