mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
layout: Implement ordered lists, CSS counters, and quotes
per CSS 2.1
§ 12.3-12.5. Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases.
This commit is contained in:
parent
417a932e30
commit
30fd28d107
36 changed files with 1734 additions and 495 deletions
|
@ -13,7 +13,7 @@ use context::LayoutContext;
|
|||
use flow::{Flow, MutableFlowUtils};
|
||||
use flow::{PreorderFlowTraversal, PostorderFlowTraversal};
|
||||
use flow;
|
||||
use incremental::{RestyleDamage, BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW};
|
||||
use incremental::{self, BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage};
|
||||
use wrapper::{layout_node_to_unsafe_layout_node, LayoutNode};
|
||||
use wrapper::{PostorderNodeMutTraversal, ThreadSafeLayoutNode, UnsafeLayoutNode};
|
||||
use wrapper::{PreorderDomTraversal, PostorderDomTraversal};
|
||||
|
@ -171,7 +171,7 @@ impl<'a> PreorderDomTraversal for RecalcStyleForNode<'a> {
|
|||
&mut applicable_declarations,
|
||||
&mut shareable);
|
||||
} else {
|
||||
ThreadSafeLayoutNode::new(&node).set_restyle_damage(RestyleDamage::all())
|
||||
ThreadSafeLayoutNode::new(&node).set_restyle_damage(incremental::all())
|
||||
}
|
||||
|
||||
// Perform the CSS cascade.
|
||||
|
@ -376,3 +376,4 @@ impl<'a> PostorderFlowTraversal for BuildDisplayList<'a> {
|
|||
flow.build_display_list(self.layout_context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue