stylo: Stop using mStyleIfVisited in Servo

This commit is contained in:
Manish Goregaokar 2017-07-17 11:42:20 -07:00 committed by Manish Goregaokar
parent e78947f8b5
commit 2a49a73f91
5 changed files with 68 additions and 82 deletions

View file

@ -131,7 +131,7 @@ impl ComputedValuesInner {
writing_mode: writing_mode,
font_computation_data: FontComputationData::new(font_size_keyword),
rules: rules,
visited_style: visited_style,
visited_style: visited_style.map(|x| Arc::into_raw_offset(x)),
flags: flags,
% for style_struct in data.style_structs:
${style_struct.gecko_name}: Arc::into_raw_offset(${style_struct.ident}),
@ -250,7 +250,7 @@ impl ComputedValuesInner {
/// Clone the visited style. Used for inheriting parent styles in
/// StyleBuilder::for_inheritance.
pub fn clone_visited_style(&self) -> Option<Arc<ComputedValues>> {
self.visited_style.clone()
self.visited_style.as_ref().map(|x| x.clone_arc())
}
/// Gets a reference to the custom properties map (if one exists).