aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorJ. Ryan Stinnett <jryans@gmail.com>2017-06-13 12:51:37 -0500
committerJ. Ryan Stinnett <jryans@gmail.com>2017-06-22 15:47:32 -0500
commit2b5c56e6a8d9115194579efe6c21b330f7c41ca0 (patch)
tree1621e24985a20d743ac67fa8fe2809a343aadc8b /components/script/layout_wrapper.rs
parentc3b2a2f4de23255960357693f195aa4561286cc1 (diff)
downloadservo-2b5c56e6a8d9115194579efe6c21b330f7c41ca0.tar.gz
servo-2b5c56e6a8d9115194579efe6c21b330f7c41ca0.zip
Move match and cascade temporaries to CurrentElementInfo
Before this change, the `ComputedStyle` struct that is part of permanent style data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2 `Arc<ComputedValues>` (unvisited and visited). Both rule nodes and the visited values don't actually need to be here. This patch moves these 3 to new temporary storage in `CascadeInputs` on `CurrentElementInfo` during the match and cascade process. Rule nodes are pushed down inside the `ComputedValues` for later access after the cascade. (Visited values were already available there.) The permanent style data per element now has just the `Arc<ComputedValues>` for itself and eager pseudo-elements (plus the `RestyleHint`). MozReview-Commit-ID: 3wq52ERMpdi
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index d26493589c2..0875d437598 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -902,7 +902,7 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
fn parent_style(&self) -> Arc<ComputedValues> {
let parent = self.node.parent_node().unwrap().as_element().unwrap();
let parent_data = parent.get_data().unwrap().borrow();
- parent_data.styles().primary.values().clone()
+ parent_data.styles.primary().clone()
}
fn debug_id(self) -> usize {