mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
layout: Add a new cascading mode that inherits all properties, even
non-inheritable ones. This works like the `modify_style_for_*` functions and will allow us to easily migrate from them to real cascading.
This commit is contained in:
parent
93e41ba4aa
commit
fb2d1e1020
6 changed files with 86 additions and 43 deletions
|
@ -265,9 +265,10 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + NodeInfo + PartialEq + Sized {
|
|||
.current_styles().pseudos.contains_key(&style_pseudo) {
|
||||
let mut data = self.get_style_data().unwrap().borrow_mut();
|
||||
let new_style =
|
||||
context.stylist
|
||||
.precomputed_values_for_pseudo(&style_pseudo,
|
||||
Some(&data.current_styles().primary));
|
||||
context.stylist.precomputed_values_for_pseudo(
|
||||
&style_pseudo,
|
||||
Some(&data.current_styles().primary),
|
||||
false);
|
||||
data.current_pseudos_mut()
|
||||
.insert(style_pseudo.clone(), new_style.unwrap());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue