mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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;
|
use select_handler::NodeSelectHandler;
|
||||||
|
|
||||||
trait MatchMethods {
|
trait MatchMethods {
|
||||||
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx);
|
fn restyle_subtree(select_ctx: &SelectCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Node : MatchMethods {
|
impl Node : MatchMethods {
|
||||||
|
@ -19,12 +19,12 @@ impl Node : MatchMethods {
|
||||||
* the node (the reader-auxiliary box in the COW model) with the
|
* the node (the reader-auxiliary box in the COW model) with the
|
||||||
* computed style.
|
* computed style.
|
||||||
*/
|
*/
|
||||||
fn restyle_subtree(ctx: &LayoutContext, select_ctx: &SelectCtx) {
|
fn restyle_subtree(select_ctx: &SelectCtx) {
|
||||||
let mut i = 0u;
|
let mut i = 0u;
|
||||||
|
|
||||||
for NodeTree.each_child(&self) |kid| {
|
for NodeTree.each_child(&self) |kid| {
|
||||||
i = i + 1u;
|
i = i + 1u;
|
||||||
kid.restyle_subtree(ctx, select_ctx);
|
kid.restyle_subtree(select_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
let select_handler = NodeSelectHandler {
|
let select_handler = NodeSelectHandler {
|
||||||
|
|
|
@ -175,7 +175,7 @@ impl Layout {
|
||||||
// TODO: this is dumb. we don't need 2 separate traversals.
|
// TODO: this is dumb. we don't need 2 separate traversals.
|
||||||
node.initialize_style_for_subtree(&self.layout_refs);
|
node.initialize_style_for_subtree(&self.layout_refs);
|
||||||
do self.css_select_ctx.borrow_imm |ctx| {
|
do self.css_select_ctx.borrow_imm |ctx| {
|
||||||
node.restyle_subtree(&layout_ctx, ctx);
|
node.restyle_subtree(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
let builder = LayoutTreeBuilder::new();
|
let builder = LayoutTreeBuilder::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue