mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Rewrite restyling to split between resolving styles and handling changes.
MozReview-Commit-ID: 4BzjbLbFebF
This commit is contained in:
parent
0ad2d39c30
commit
c6d5dbbb01
8 changed files with 485 additions and 1500 deletions
|
@ -2576,11 +2576,11 @@ pub fn cascade(device: &Device,
|
|||
flags: CascadeFlags,
|
||||
quirks_mode: QuirksMode)
|
||||
-> ComputedValues {
|
||||
debug_assert_eq!(parent_style.is_some(), layout_parent_style.is_some());
|
||||
debug_assert!(layout_parent_style.is_none() || parent_style.is_some());
|
||||
let (inherited_style, layout_parent_style) = match parent_style {
|
||||
Some(parent_style) => {
|
||||
(parent_style,
|
||||
layout_parent_style.unwrap())
|
||||
layout_parent_style.unwrap_or(parent_style))
|
||||
},
|
||||
None => {
|
||||
(device.default_computed_values(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue