auto merge of #1590 : pcwalton/servo/thread-safe-flow-construction, r=metajack

non-element children during the cascade.

Fetching them from the parent isn't thread-safe.

r? @metajack
This commit is contained in:
bors-servo 2014-01-30 14:04:18 -08:00
commit 34746359f0
6 changed files with 37 additions and 39 deletions

View file

@ -141,16 +141,16 @@ fn match_and_cascade_node(unsafe_layout_node: UnsafeLayoutNode,
// Perform the CSS selector matching.
let stylist: &Stylist = cast::transmute(layout_context.stylist);
node.match_node(stylist);
// Perform the CSS cascade.
let parent_opt = if OpaqueNode::from_layout_node(&node) == layout_context.reflow_root {
None
} else {
node.parent_node()
};
node.cascade_node(parent_opt);
}
// Perform the CSS cascade.
let parent_opt = if OpaqueNode::from_layout_node(&node) == layout_context.reflow_root {
None
} else {
node.parent_node()
};
node.cascade_node(parent_opt);
// Enqueue kids.
let mut child_count = 0;
for kid in node.children() {