mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Selector matching doesn't need a LayoutContext just now
This commit is contained in:
parent
0e94860305
commit
d95b96185c
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ use layout::context::LayoutContext;
|
|||
use select_handler::NodeSelectHandler;
|
||||
|
||||
trait MatchMethods {
|
||||
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx);
|
||||
fn restyle_subtree(select_ctx: &SelectCtx);
|
||||
}
|
||||
|
||||
impl Node : MatchMethods {
|
||||
|
@ -19,12 +19,12 @@ impl Node : MatchMethods {
|
|||
* the node (the reader-auxiliary box in the COW model) with the
|
||||
* computed style.
|
||||
*/
|
||||
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx) {
|
||||
fn restyle_subtree(select_ctx: &SelectCtx) {
|
||||
let mut i = 0u;
|
||||
|
||||
for NodeTree.each_child(&self) |kid| {
|
||||
i = i + 1u;
|
||||
kid.restyle_subtree(ctx, select_ctx);
|
||||
kid.restyle_subtree(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.restyle_subtree(&layout_ctx, ctx);
|
||||
node.restyle_subtree(ctx);
|
||||
}
|
||||
|
||||
let builder = LayoutTreeBuilder::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue