mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Auto merge of #17204 - heycam:recascade-nac, r=emilio
style: always re-cascade in native anonymous subtrees From https://bugzilla.mozilla.org/show_bug.cgi?id=1345699. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17204) <!-- Reviewable:end -->
This commit is contained in:
commit
644773d492
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