mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: always re-cascade in native anonymous subtrees
This commit is contained in:
parent
f388c0ab1e
commit
a1093ea868
1 changed files with 6 additions and 0 deletions
|
@ -690,6 +690,12 @@ pub fn recalc_style_at<E, D>(traversal: &D,
|
||||||
ChildCascadeRequirement::CanSkipCascade => {}
|
ChildCascadeRequirement::CanSkipCascade => {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// We must always cascade native anonymous subtrees, since they inherit styles
|
||||||
|
// from their first non-NAC ancestor.
|
||||||
|
if element.is_native_anonymous() {
|
||||||
|
cascade_hint |= RECASCADE_SELF;
|
||||||
|
}
|
||||||
|
|
||||||
// If we're restyling this element to display:none, throw away all style
|
// If we're restyling this element to display:none, throw away all style
|
||||||
// data in the subtree, notify the caller to early-return.
|
// data in the subtree, notify the caller to early-return.
|
||||||
if data.styles().is_display_none() {
|
if data.styles().is_display_none() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue