mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
layout: Perform aux initialization in parallel.
Brings aux initialization time down to essentially zero (!)
This commit is contained in:
parent
6c2e48f04d
commit
94ab4f5086
3 changed files with 19 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
use css::matching::MatchMethods;
|
||||
use layout::context::LayoutContext;
|
||||
use layout::extra::LayoutAuxMethods;
|
||||
use layout::flow::{Flow, FlowLeafSet, PostorderFlowTraversal};
|
||||
use layout::flow;
|
||||
use layout::layout_task::{AssignHeightsAndStoreOverflowTraversal, BubbleWidthsTraversal};
|
||||
|
@ -130,6 +131,12 @@ fn match_and_cascade_node(unsafe_layout_node: UnsafeLayoutNode,
|
|||
// Get a real layout node.
|
||||
let node: LayoutNode = cast::transmute(unsafe_layout_node);
|
||||
|
||||
// Initialize layout data.
|
||||
//
|
||||
// FIXME(pcwalton): Stop allocating here. Ideally this should just be done by the HTML
|
||||
// parser.
|
||||
node.initialize_layout_data(layout_context.layout_chan.clone());
|
||||
|
||||
if node.is_element() {
|
||||
// Perform the CSS selector matching.
|
||||
let stylist: &Stylist = cast::transmute(layout_context.stylist);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue