mirror of
https://github.com/servo/servo.git
synced 2025-06-18 22:34:30 +01:00
layout: Reference count ComputedValues
structures like Gecko does.
This has no difference in CSS selector matching performance and results in a 31% speedup in constraint solving on the rainbow page.
This commit is contained in:
parent
511d2b11d4
commit
4c8383c38b
8 changed files with 66 additions and 53 deletions
|
@ -472,7 +472,10 @@ impl<'self> PostorderNodeMutTraversal for FlowConstructor<'self> {
|
|||
fn process(&mut self, node: AbstractNode<LayoutView>) -> bool {
|
||||
// Get the `display` property for this node, and determine whether this node is floated.
|
||||
let (display, float) = match node.type_id() {
|
||||
ElementNodeTypeId(_) => (node.style().Box.display, node.style().Box.float),
|
||||
ElementNodeTypeId(_) => {
|
||||
let style = node.style().get();
|
||||
(style.Box.display, style.Box.float)
|
||||
}
|
||||
TextNodeTypeId => (display::inline, float::none),
|
||||
CommentNodeTypeId |
|
||||
DoctypeNodeTypeId |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue