mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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
|
@ -477,8 +477,8 @@ impl LayoutTask {
|
|||
for child in node.traverse_preorder() {
|
||||
if child.type_id() == ElementNodeTypeId(HTMLHtmlElementTypeId) ||
|
||||
child.type_id() == ElementNodeTypeId(HTMLBodyElementTypeId) {
|
||||
let element_bg_color = child.style().resolve_color(
|
||||
child.style().Background.background_color
|
||||
let element_bg_color = child.style().get().resolve_color(
|
||||
child.style().get().Background.background_color
|
||||
).to_gfx_color();
|
||||
match element_bg_color {
|
||||
color::rgba(0., 0., 0., 0.) => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue