mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
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:
commit
34746359f0
6 changed files with 37 additions and 39 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue